diff mbox

[OPW,kernel,2/2] Staging: rtl8192u: use gfp_t instead of int

Message ID 1381956813-15884-3-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 16, 2013, 8:53 p.m. UTC
This patch fixes the following type of sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Oct. 17, 2013, 1:54 a.m. UTC | #1
On Wed, Oct 16, 2013 at 11:53:33PM +0300, Teodora Baluta wrote:
> This patch fixes the following type of sparse warnings:
> 
> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask

Very nice.  Now you can mark this function static, and do the same thing
for the other staging wireless driver that has this exact same function
in it, with the same errors.

Applied, thanks.

greg k-h
Teodora Baluta Oct. 18, 2013, 7:46 p.m. UTC | #2
On Thu, Oct 17, 2013 at 4:54 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Wed, Oct 16, 2013 at 11:53:33PM +0300, Teodora Baluta wrote:
>> This patch fixes the following type of sparse warnings:
>>
>> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
>> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
>> drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask
>
> Very nice.  Now you can mark this function static, and do the same thing
> for the other staging wireless driver that has this exact same function
> in it, with the same errors.
>
> Applied, thanks.
>
> greg k-h

Thank you for your help and feedback! I will send in another patch (or
patch series) with the fixes you recommended.

Teodora
diff mbox

Patch

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index d5dae74..682659a 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -238,7 +238,7 @@  void ieee80211_txb_free(struct ieee80211_txb *txb) {
 }
 
 struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
-					  int gfp_mask)
+					  gfp_t gfp_mask)
 {
 	struct ieee80211_txb *txb;
 	int i;