From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend@broadcom.com>
Cc: Linux Wireless List <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] cfg80211: change function signature of cfg80211_get_p2p_attr()
Date: Mon, 26 Nov 2012 11:27:03 +0100 [thread overview]
Message-ID: <1353925623.9488.8.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1353867208-11429-1-git-send-email-arend@broadcom.com>
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@broadcom.com>
> ---
> 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
next prev parent reply other threads:[~2012-11-26 10:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 18:13 [PATCH] cfg80211: change function signature of cfg80211_get_p2p_attr() Arend van Spriel
2012-11-26 10:27 ` Johannes Berg [this message]
2012-11-26 10:29 ` Johannes Berg
2012-11-26 11:36 ` Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353925623.9488.8.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).