From 090504701605d627b4a8ddb0d584f00613ee41fe Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:58 +0100 Subject: [PATCH] Staging: wlan-ng: Remove wlan_max()/wlan_min() Replace wlan_min() with the generic min_t(), remove unused wlan_max(). Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211wext.c | 2 +- drivers/staging/wlan-ng/wlan_compat.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 76b7707f670e..4834ad07c246 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -1328,7 +1328,7 @@ wext_translate_bss(struct iw_request_info *info, char *current_ev, char essid[IW_ESSID_MAX_SIZE + 1]; int size; - size = wlan_min(IW_ESSID_MAX_SIZE, bss->ssid.data.len); + size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len); memset(&essid, 0, sizeof (essid)); memcpy(&essid, bss->ssid.data.data, size); WLAN_LOG_DEBUG(1, " essid size = %d\n", size); diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index a8abc42b95ef..42d8d0c95b60 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -86,9 +86,6 @@ typedef struct net_device netdevice_t; /*--- General Macros ------------------------------------------*/ /*=============================================================*/ -#define wlan_max(a, b) (((a) > (b)) ? (a) : (b)) -#define wlan_min(a, b) (((a) < (b)) ? (a) : (b)) - #define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f))) #define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a))) -- 2.34.1