linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
@ 2015-11-06 21:59 Punit Vara
  2015-11-06 22:06 ` Dan Carpenter
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Punit Vara @ 2015-11-06 21:59 UTC (permalink / raw)
  To: gregkh; +Cc: glen.lee, linux-wireless, devel, linux-kernel, Punit Vara

This patch is to the linux_wlan.c file that fixes declaration of *wilc
to remove following error while building it.

make drivers/staging/wilc1000/linux_wlan.o
drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared

Signed-off-by: Punit Vara <punitvara@gmail.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 2a5b36f..0805050 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
 /*The 1st function called after module inserted*/
 static int __init init_wilc_driver(void)
 {
+	struct wilc *wilc;
 #ifdef WILC_SPI
 	struct wilc *wilc;
 #endif
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 21:59 [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error Punit Vara
@ 2015-11-06 22:06 ` Dan Carpenter
  2015-11-06 22:09 ` punit vara
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2015-11-06 22:06 UTC (permalink / raw)
  To: Punit Vara; +Cc: gregkh, devel, linux-wireless, linux-kernel

On Sat, Nov 07, 2015 at 03:29:23AM +0530, Punit Vara wrote:
> This patch is to the linux_wlan.c file that fixes declaration of *wilc
> to remove following error while building it.
> 
> make drivers/staging/wilc1000/linux_wlan.o
> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
> 

Which patch broke the build?  Use a Fixes tag.

> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 2a5b36f..0805050 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
>  /*The 1st function called after module inserted*/
>  static int __init init_wilc_driver(void)
>  {
> +	struct wilc *wilc;
>  #ifdef WILC_SPI
>  	struct wilc *wilc;
>  #endif

No that doesn't work at all.  You should be testing these patches better
so you don't introduce more build breakages when you fix a different
build breakage.  Sending this patch is a sign that something is wrong in
your test infrastructure.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 21:59 [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error Punit Vara
  2015-11-06 22:06 ` Dan Carpenter
@ 2015-11-06 22:09 ` punit vara
  2015-11-06 22:16   ` Dan Carpenter
  2015-11-06 22:17   ` punit vara
  2015-11-06 22:42 ` kbuild test robot
  2015-11-07  0:57 ` Greg KH
  3 siblings, 2 replies; 8+ messages in thread
From: punit vara @ 2015-11-06 22:09 UTC (permalink / raw)
  To: Greg KH; +Cc: glen.lee, linux-wireless, devel, linux-kernel, Punit Vara

On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara <punitvara@gmail.com> wrote:
> This patch is to the linux_wlan.c file that fixes declaration of *wilc
> to remove following error while building it.
>
> make drivers/staging/wilc1000/linux_wlan.o
> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
>
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 2a5b36f..0805050 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
>  /*The 1st function called after module inserted*/
>  static int __init init_wilc_driver(void)
>  {
> +       struct wilc *wilc;
>  #ifdef WILC_SPI
>         struct wilc *wilc;
>  #endif
> --
> 2.6.2
>
drivers/staging/wilc1000/linux_wlan.c: In function ‘wilc1000_wlan_init’:
drivers/staging/wilc1000/linux_wlan.c:1109:3: error: implicit
declaration of function ‘init_irq’
[-Werror=implicit-function-declaration]
   if (init_irq(dev)) {
   ^
drivers/staging/wilc1000/linux_wlan.c: In function ‘init_wilc_driver’:
drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’
undeclared (first use in this function)
  if (wilc_netdev_init(&wilc))
                        ^
drivers/staging/wilc1000/linux_wlan.c:1824:24: note: each undeclared
identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target
'drivers/staging/wilc1000/linux_wlan.o' failed
make[1]: *** [drivers/staging/wilc1000/linux_wlan.o] Error 1
Makefile:1526: recipe for target 'drivers/staging/wilc1000/linux_wlan.o' failed
make: *** [drivers/staging/wilc1000/linux_wlan.o] Error 2

There were two errors generated by make drivers/staging/wilc1000/linux_wlan.o
One error I have removed second one I will resolve tomorrow. Should I
remove function init_irq defination from #ifdef ? or any better
solution to remove this error?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 22:09 ` punit vara
@ 2015-11-06 22:16   ` Dan Carpenter
  2015-11-06 22:17   ` punit vara
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2015-11-06 22:16 UTC (permalink / raw)
  To: punit vara; +Cc: Greg KH, devel, linux-wireless, linux-kernel

Oh...  Sorry.  I got your email confused with someone else.

> > diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> > index 2a5b36f..0805050 100644
> > --- a/drivers/staging/wilc1000/linux_wlan.c
> > +++ b/drivers/staging/wilc1000/linux_wlan.c
> > @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
> >  /*The 1st function called after module inserted*/
> >  static int __init init_wilc_driver(void)
> >  {
> > +       struct wilc *wilc;
> >  #ifdef WILC_SPI
> >         struct wilc *wilc;
> >  #endif


The problem is that now if WILC_SPI is defined it's declared twice so
this patch is definitely wrong.  I haven't looked at it further than
that, sorry.

CC the atmel people with these patches.  Use ./scripts/get_maintainer.pl
to find the right maintainers.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 22:09 ` punit vara
  2015-11-06 22:16   ` Dan Carpenter
@ 2015-11-06 22:17   ` punit vara
  2015-11-06 22:21     ` punit vara
  1 sibling, 1 reply; 8+ messages in thread
From: punit vara @ 2015-11-06 22:17 UTC (permalink / raw)
  To: Greg KH; +Cc: glen.lee, linux-wireless, devel, linux-kernel, Punit Vara

On Sat, Nov 7, 2015 at 3:39 AM, punit vara <punitvara@gmail.com> wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara <punitvara@gmail.com> wrote:
>> This patch is to the linux_wlan.c file that fixes declaration of *wilc
>> to remove following error while building it.
>>
>> make drivers/staging/wilc1000/linux_wlan.o
>> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
>>
>> Signed-off-by: Punit Vara <punitvara@gmail.com>
>> ---
>>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
>> index 2a5b36f..0805050 100644
>> --- a/drivers/staging/wilc1000/linux_wlan.c
>> +++ b/drivers/staging/wilc1000/linux_wlan.c
>> @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
>>  /*The 1st function called after module inserted*/
>>  static int __init init_wilc_driver(void)
>>  {
>> +       struct wilc *wilc;
>>  #ifdef WILC_SPI
>>         struct wilc *wilc;
>>  #endif
>> --
>> 2.6.2
>>
> drivers/staging/wilc1000/linux_wlan.c: In function ‘wilc1000_wlan_init’:
> drivers/staging/wilc1000/linux_wlan.c:1109:3: error: implicit
> declaration of function ‘init_irq’
> [-Werror=implicit-function-declaration]
>    if (init_irq(dev)) {
>    ^
> drivers/staging/wilc1000/linux_wlan.c: In function ‘init_wilc_driver’:
> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’
> undeclared (first use in this function)
>   if (wilc_netdev_init(&wilc))
>                         ^
> drivers/staging/wilc1000/linux_wlan.c:1824:24: note: each undeclared
> identifier is reported only once for each function it appears in
> cc1: some warnings being treated as errors
> scripts/Makefile.build:258: recipe for target
> 'drivers/staging/wilc1000/linux_wlan.o' failed
> make[1]: *** [drivers/staging/wilc1000/linux_wlan.o] Error 1
> Makefile:1526: recipe for target 'drivers/staging/wilc1000/linux_wlan.o' failed
> make: *** [drivers/staging/wilc1000/linux_wlan.o] Error 2
>
> There were two errors generated by make drivers/staging/wilc1000/linux_wlan.o
> One error I have removed second one I will resolve tomorrow. Should I
> remove function init_irq defination from #ifdef ? or any better
> solution to remove this error?

Today I have fetched greg staging tree I have found

make drivers/staging/wilc1000/linux_wlan.o

build failed.

So I am just trying to fix it . I removed one error and send patch to
get some feedback about second error. I will be sending whole patch
fixing both errors.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 22:17   ` punit vara
@ 2015-11-06 22:21     ` punit vara
  0 siblings, 0 replies; 8+ messages in thread
From: punit vara @ 2015-11-06 22:21 UTC (permalink / raw)
  To: Greg KH; +Cc: glen.lee, linux-wireless, devel, linux-kernel, Punit Vara

On Sat, Nov 7, 2015 at 3:47 AM, punit vara <punitvara@gmail.com> wrote:
> On Sat, Nov 7, 2015 at 3:39 AM, punit vara <punitvara@gmail.com> wrote:
>> On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara <punitvara@gmail.com> wrote:
>>> This patch is to the linux_wlan.c file that fixes declaration of *wilc
>>> to remove following error while building it.
>>>
>>> make drivers/staging/wilc1000/linux_wlan.o
>>> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
>>>
>>> Signed-off-by: Punit Vara <punitvara@gmail.com>
>>> ---
>>>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
>>> index 2a5b36f..0805050 100644
>>> --- a/drivers/staging/wilc1000/linux_wlan.c
>>> +++ b/drivers/staging/wilc1000/linux_wlan.c
>>> @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
>>>  /*The 1st function called after module inserted*/
>>>  static int __init init_wilc_driver(void)
>>>  {
>>> +       struct wilc *wilc;
>>>  #ifdef WILC_SPI
>>>         struct wilc *wilc;
>>>  #endif
>>> --
>>> 2.6.2
>>>
>> drivers/staging/wilc1000/linux_wlan.c: In function ‘wilc1000_wlan_init’:
>> drivers/staging/wilc1000/linux_wlan.c:1109:3: error: implicit
>> declaration of function ‘init_irq’
>> [-Werror=implicit-function-declaration]
>>    if (init_irq(dev)) {
>>    ^
>> drivers/staging/wilc1000/linux_wlan.c: In function ‘init_wilc_driver’:
>> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’
>> undeclared (first use in this function)
>>   if (wilc_netdev_init(&wilc))
>>                         ^
>> drivers/staging/wilc1000/linux_wlan.c:1824:24: note: each undeclared
>> identifier is reported only once for each function it appears in
>> cc1: some warnings being treated as errors
>> scripts/Makefile.build:258: recipe for target
>> 'drivers/staging/wilc1000/linux_wlan.o' failed
>> make[1]: *** [drivers/staging/wilc1000/linux_wlan.o] Error 1
>> Makefile:1526: recipe for target 'drivers/staging/wilc1000/linux_wlan.o' failed
>> make: *** [drivers/staging/wilc1000/linux_wlan.o] Error 2
>>
>> There were two errors generated by make drivers/staging/wilc1000/linux_wlan.o
>> One error I have removed second one I will resolve tomorrow. Should I
>> remove function init_irq defination from #ifdef ? or any better
>> solution to remove this error?
>
> Today I have fetched greg staging tree I have found
>
> make drivers/staging/wilc1000/linux_wlan.o
>
> build failed.
>
> So I am just trying to fix it . I removed one error and send patch to
> get some feedback about second error. I will be sending whole patch
> fixing both errors.
okay :-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 21:59 [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error Punit Vara
  2015-11-06 22:06 ` Dan Carpenter
  2015-11-06 22:09 ` punit vara
@ 2015-11-06 22:42 ` kbuild test robot
  2015-11-07  0:57 ` Greg KH
  3 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2015-11-06 22:42 UTC (permalink / raw)
  To: Punit Vara
  Cc: kbuild-all, gregkh, devel, linux-wireless, Punit Vara, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

Hi Punit,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20151106]
[cannot apply to v4.3]

url:    https://github.com/0day-ci/linux/commits/Punit-Vara/Staging-wilc1000-Declare-wilc-in-init_wilc_driver-to-fix-build-error/20151107-060255
config: i386-allmodconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/wilc1000/linux_wlan.c: In function 'init_wilc_driver':
>> drivers/staging/wilc1000/linux_wlan.c:1794:15: warning: unused variable 'wilc' [-Wunused-variable]
     struct wilc *wilc;
                  ^

vim +/wilc +1794 drivers/staging/wilc1000/linux_wlan.c

  1778		#ifndef WILC_SDIO
  1779		if (!linux_spi_init(&g_linux_wlan->wilc_spidev)) {
  1780			PRINT_ER("Can't initialize SPI\n");
  1781			return -1; /* ERROR */
  1782		}
  1783		g_linux_wlan->wilc_spidev = wilc_spi_dev;
  1784		#else
  1785		g_linux_wlan->wilc_sdio_func = local_sdio_func;
  1786		#endif
  1787	
  1788		return 0;
  1789	}
  1790	
  1791	/*The 1st function called after module inserted*/
  1792	static int __init init_wilc_driver(void)
  1793	{
> 1794		struct wilc *wilc;
  1795	#ifdef WILC_SPI
  1796		struct wilc *wilc;
  1797	#endif
  1798	
  1799	#if defined(WILC_DEBUGFS)
  1800		if (wilc_debugfs_init() < 0) {
  1801			PRINT_D(GENERIC_DBG, "fail to create debugfs for wilc driver\n");
  1802			return -1;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 51752 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error
  2015-11-06 21:59 [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error Punit Vara
                   ` (2 preceding siblings ...)
  2015-11-06 22:42 ` kbuild test robot
@ 2015-11-07  0:57 ` Greg KH
  3 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2015-11-07  0:57 UTC (permalink / raw)
  To: Punit Vara; +Cc: devel, linux-wireless, linux-kernel

On Sat, Nov 07, 2015 at 03:29:23AM +0530, Punit Vara wrote:
> This patch is to the linux_wlan.c file that fixes declaration of *wilc
> to remove following error while building it.
> 
> make drivers/staging/wilc1000/linux_wlan.o
> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
> 
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 2a5b36f..0805050 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1780,6 +1780,7 @@ int wilc_netdev_init(struct wilc **wilc)
>  /*The 1st function called after module inserted*/
>  static int __init init_wilc_driver(void)
>  {
> +	struct wilc *wilc;
>  #ifdef WILC_SPI
>  	struct wilc *wilc;
>  #endif

Breaks the build :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-07  2:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06 21:59 [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error Punit Vara
2015-11-06 22:06 ` Dan Carpenter
2015-11-06 22:09 ` punit vara
2015-11-06 22:16   ` Dan Carpenter
2015-11-06 22:17   ` punit vara
2015-11-06 22:21     ` punit vara
2015-11-06 22:42 ` kbuild test robot
2015-11-07  0:57 ` Greg KH

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).