aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2014-02-25 12:12:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-03 15:35:54 -0500
commitc8e4955653a470ece7bf580c84fc88eb58cc9850 (patch)
tree0517b79659c4b4b0d83528dfc973d99c4de19770 /drivers/net/wireless/b43legacy
parent9ffd2e9a174769913dcce0fbc9223b58d2eb5526 (diff)
net: Replace min macro with min_t
Instead of an explicit cast, use the min_t macro. Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/main.c4
-rw-r--r--drivers/net/wireless/b43legacy/sysfs.c2
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 349c77605231..1aec2146a2bf 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -978,7 +978,7 @@ static void b43legacy_write_beacon_template(struct b43legacy_wldev *dev,
978 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(dev->wl->current_beacon); 978 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(dev->wl->current_beacon);
979 979
980 bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data); 980 bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data);
981 len = min((size_t)dev->wl->current_beacon->len, 981 len = min_t(size_t, dev->wl->current_beacon->len,
982 0x200 - sizeof(struct b43legacy_plcp_hdr6)); 982 0x200 - sizeof(struct b43legacy_plcp_hdr6));
983 rate = ieee80211_get_tx_rate(dev->wl->hw, info)->hw_value; 983 rate = ieee80211_get_tx_rate(dev->wl->hw, info)->hw_value;
984 984
@@ -1155,7 +1155,7 @@ static void b43legacy_write_probe_resp_template(struct b43legacy_wldev *dev,
1155 b43legacy_write_probe_resp_plcp(dev, 0x350, size, 1155 b43legacy_write_probe_resp_plcp(dev, 0x350, size,
1156 &b43legacy_b_ratetable[3]); 1156 &b43legacy_b_ratetable[3]);
1157 1157
1158 size = min((size_t)size, 1158 size = min_t(size_t, size,
1159 0x200 - sizeof(struct b43legacy_plcp_hdr6)); 1159 0x200 - sizeof(struct b43legacy_plcp_hdr6));
1160 b43legacy_write_template_common(dev, probe_resp_data, 1160 b43legacy_write_template_common(dev, probe_resp_data,
1161 size, ram_offset, 1161 size, ram_offset,
diff --git a/drivers/net/wireless/b43legacy/sysfs.c b/drivers/net/wireless/b43legacy/sysfs.c
index 57f8b089767c..2a1da15c913b 100644
--- a/drivers/net/wireless/b43legacy/sysfs.c
+++ b/drivers/net/wireless/b43legacy/sysfs.c
@@ -42,7 +42,7 @@ static int get_integer(const char *buf, size_t count)
42 42
43 if (count == 0) 43 if (count == 0)
44 goto out; 44 goto out;
45 count = min(count, (size_t)10); 45 count = min_t(size_t, count, 10);
46 memcpy(tmp, buf, count); 46 memcpy(tmp, buf, count);
47 ret = simple_strtol(tmp, NULL, 10); 47 ret = simple_strtol(tmp, NULL, 10);
48out: 48out:
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 86588c9ff0f2..34bf3f0b729f 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -254,7 +254,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
254 B43legacy_TX4_MAC_KEYALG_SHIFT) & 254 B43legacy_TX4_MAC_KEYALG_SHIFT) &
255 B43legacy_TX4_MAC_KEYALG; 255 B43legacy_TX4_MAC_KEYALG;
256 wlhdr_len = ieee80211_hdrlen(wlhdr->frame_control); 256 wlhdr_len = ieee80211_hdrlen(wlhdr->frame_control);
257 iv_len = min((size_t)info->control.hw_key->iv_len, 257 iv_len = min_t(size_t, info->control.hw_key->iv_len,
258 ARRAY_SIZE(txhdr->iv)); 258 ARRAY_SIZE(txhdr->iv));
259 memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); 259 memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len);
260 } else { 260 } else {