Search Linux Wireless

Re: [PATCH] cfg80211: change function signature of cfg80211_get_p2p_attr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2012-11-25 at 19:13 +0100, Arend van Spriel wrote:
> The function cfg80211_get_p2p_attr() can fail and returns
> a negative error code. However, the return type is unsigned
> int. The largest positive number is determined by desired_len
> variable in the function, which is u16. So changing the return
> type to int to allow easy error checking. Also change the type
> for the attribute to enum for improved type checking.
> 
> Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
> ---
> Hi Johannes,
> 
> I decided to make use of cfg80211_get_p2p_attr() in brcmfmac
> and would like this minor change to it.
> 
> The only other "driver" using it is mac80211 and it seems it
> will not mind this change ;-)

Yeah, well, it actually uses an int as this should, thanks for fixing!

Applied, but I've fixed your indentation:

> +int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
> +				   enum ieee80211_p2p_attr_id attr_id,
> +				   u8 *buf, unsigned int bufsize)
>  {
> +	u8 attr = (u8)attr_id;

Also this isn't actually needed, you can compare a u8 to attr later :)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux