diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-08 12:28:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-08 12:28:02 -0700 |
commit | a300ce95e49fe079d4ca77370c23ce75db176218 (patch) | |
tree | ad18e3b2c864687d18fe02d234a4d50f6b436a98 | |
parent | 697d600d8fa9d383626041a8dde86555fb758b76 (diff) |
Staging: brcm80211: sys: fix some comparison warnings
Use min_t() instead of min() in some places to make the
comparison explicit and resolve some compiler warnings.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_channel.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_mac80211.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_channel.c b/drivers/staging/brcm80211/sys/wlc_channel.c index 1c3c043afbd5..f92ff9712d7f 100644 --- a/drivers/staging/brcm80211/sys/wlc_channel.c +++ b/drivers/staging/brcm80211/sys/wlc_channel.c @@ -1376,7 +1376,7 @@ wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, /* Keep OFDM lmit below CCK limit */ if (BAND_2G(band->bandtype)) - maxpwr = min(maxpwr, txpwr->cck[0]); + maxpwr = min_t(int, maxpwr, txpwr->cck[0]); for (i = 0; i < WLC_NUM_RATES_OFDM; i++) { txpwr->ofdm[i] = (u8) maxpwr; diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index 6ffbb02ad17d..a5f7b9cdfa92 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c @@ -4806,7 +4806,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, bool override; /* Remove override bit and clip to max qdbm value */ - qdbm = (u8)min((int_val & ~WL_TXPWR_OVERRIDE), 0xff); + qdbm = (u8)min_t(u32, (int_val & ~WL_TXPWR_OVERRIDE), 0xff); /* Extract override setting */ override = (int_val & WL_TXPWR_OVERRIDE) ? TRUE : FALSE; err = |