lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Feb 2017 12:32:04 -0800
From:   Joe Perches <>
To:     simran singhal <>,
Subject: Re: [PATCH v2 5/9] staging: rtl8192u: Use min_t instead of min

On Wed, 2017-02-15 at 01:43 +0530, simran singhal wrote:
> Use min_t instead of min function in ieee80211/ieee80211_wx.c
> fixed warning:
> WARNING: min() should probably be min_t(u8, network->ssid_len, 32)
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
> @@ -80,7 +80,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
> = sizeof("<hidden>");
>  		start = iwe_stream_add_point(info, start, stop, &iwe, "<hidden>");
>  	} else {
> - = min(network->ssid_len, (u8)32);
> + = min_t(u8, network->ssid_len, 32);

Umm, no.  A checkpatch message that says
"probably", is not a reason to do what it says.

It's _maybe_ something that could be investigated.

ssid_len is size_t and is u16.
Why should it be truncated to a u8?

It'd be getter to remove the u8 cast altogether.

Powered by blists - more mailing lists