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>
/* 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;
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 =