All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Pelaez Jorge <joelpelaez@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeremiah Mahler <jmmahler@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Teodora Baluta <teobaluta@gmail.com>,
	Andrea Merello <andrea.merello@gmail.com>,
	Bob Copeland <me@bobcopeland.com>, Joe Perches <joe@perches.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Himangi Saraogi <himangi774@gmail.com>
Subject: Re: [PATCH] staging: rtl8192u/ieee80211: Fix sparse ieee80211_debug_init/_exit not declared warning
Date: Mon, 11 Aug 2014 22:11:13 -0500	[thread overview]
Message-ID: <53E985D1.9050503@gmail.com> (raw)
In-Reply-To: <20140811223206.GB9475@kroah.com>

El 11/08/14 a las 17:32, Greg Kroah-Hartman escibió:
> On Mon, Aug 11, 2014 at 03:15:54PM -0700, Jeremiah Mahler wrote:
>> A sparse warning is generated about 'ieee80211_debug_init' and
>> 'ieee80211_debug_exit' not being declared.
>>
>>   drivers/staging/rtl8192u/ieee80211/ieee80211_module.c:275:12: warning:
>>   symbol 'ieee80211_debug_init' was not declared. Should it be static?
>>   drivers/staging/rtl8192u/ieee80211/ieee80211_module.c:297:13: warning:
>>   symbol 'ieee80211_debug_exit' was not declared. Should it be static?
>>
>> These functions are used outside of this file so using static will not
>> work.  Fix the warning by declaring the functions in the header file,
>> ieee80211.h
>>
>> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Teodora Baluta <teobaluta@gmail.com>
>> Cc: Andrea Merello <andrea.merello@gmail.com>
>> Cc: Joel Pelaez Jorge <joelpelaez@gmail.com>
>> Cc: Bob Copeland <me@bobcopeland.com>
>> Cc: Joe Perches <joe@perches.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Himangi Saraogi <himangi774@gmail.com>
>> ---
>>  drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
>> index 1040bab..9cbda69 100644
>> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
>> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
>> @@ -2485,6 +2485,12 @@ extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_reques
>>  extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
>>  			     union iwreq_data *wrqu, char *b);
>>  
>> +/* ieee80211_module.c */
>> +#ifdef CONFIG_IEEE80211_DEBUG
>> +extern int __init ieee80211_debug_init(void);
>> +extern void __exit ieee80211_debug_exit(void);
>> +#endif /* CONFIG_IEEE80211_DEBUG */
>> +
> 
> As it's a header file, why not always have them here, no need for the
> ifdef.
> 
> And __init and __exit don't belong in a .h function prototype.
> 
> thanks,
> 
> greg k-h
> 
The symbol ieee80211_debug_init(void) and ieee80211_debug_exit(void) are declared as prototype in r8192U_core.c, this cause a double function prototype. It is only a comment, it not affect anything. Check it to next time.

	- Joel

  parent reply	other threads:[~2014-08-12  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 22:15 [PATCH] staging: rtl8192u/ieee80211: Fix sparse ieee80211_debug_init/_exit not declared warning Jeremiah Mahler
2014-08-11 22:32 ` Greg Kroah-Hartman
2014-08-12  1:49   ` [PATCH v2] " Jeremiah Mahler
2014-08-12  3:11   ` Joel Pelaez Jorge [this message]
2014-08-12  4:17     ` [PATCH] " Jeremiah Mahler
2014-08-12  7:03       ` [PATCH v3] " Jeremiah Mahler

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=53E985D1.9050503@gmail.com \
    --to=joelpelaez@gmail.com \
    --cc=andrea.merello@gmail.com \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himangi774@gmail.com \
    --cc=jmmahler@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@bobcopeland.com \
    --cc=teobaluta@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.