diff mbox

bcm47xx: fix build regression

Message ID 20170530112027.3983554-1-arnd@arndb.de (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Arnd Bergmann May 30, 2017, 11:20 a.m. UTC
An unknown change in the kernel headers caused a build regression
in an MTD partition driver:

In file included from drivers/mtd/bcm47xxpart.c:12:0:
include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first use in this function)

Clearly we want to include linux/errno.h here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/bcm47xx_nvram.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Boris BREZILLON May 31, 2017, 9:15 a.m. UTC | #1
On Tue, 30 May 2017 13:20:12 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> An unknown change in the kernel headers caused a build regression
> in an MTD partition driver:
> 
> In file included from drivers/mtd/bcm47xxpart.c:12:0:
> include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
> include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first use in this function)
> 
> Clearly we want to include linux/errno.h here.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  include/linux/bcm47xx_nvram.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h
> index 2793652fbf66..a414a2b53e41 100644
> --- a/include/linux/bcm47xx_nvram.h
> +++ b/include/linux/bcm47xx_nvram.h
> @@ -8,6 +8,7 @@
>  #ifndef __BCM47XX_NVRAM_H
>  #define __BCM47XX_NVRAM_H
>  
> +#include <linux/errno.h>
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/vmalloc.h>
Arend van Spriel May 31, 2017, 9:43 a.m. UTC | #2
On 5/30/2017 1:20 PM, Arnd Bergmann wrote:
> An unknown change in the kernel headers caused a build regression
> in an MTD partition driver:
> 
> In file included from drivers/mtd/bcm47xxpart.c:12:0:
> include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
> include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first use in this function)
> 
> Clearly we want to include linux/errno.h here.

unfortunate that you did not find the commit that caused this build 
regression. You could produce preprocessor output when it was working to 
see where errno.h got implicitly included and start looking there for 
git history.

Regards,
Arend

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   include/linux/bcm47xx_nvram.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h
> index 2793652fbf66..a414a2b53e41 100644
> --- a/include/linux/bcm47xx_nvram.h
> +++ b/include/linux/bcm47xx_nvram.h
> @@ -8,6 +8,7 @@
>   #ifndef __BCM47XX_NVRAM_H
>   #define __BCM47XX_NVRAM_H
>   
> +#include <linux/errno.h>
>   #include <linux/types.h>
>   #include <linux/kernel.h>
>   #include <linux/vmalloc.h>
>
Arnd Bergmann May 31, 2017, 10:21 a.m. UTC | #3
On Wed, May 31, 2017 at 11:43 AM, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 5/30/2017 1:20 PM, Arnd Bergmann wrote:
>>
>> An unknown change in the kernel headers caused a build regression
>> in an MTD partition driver:
>>
>> In file included from drivers/mtd/bcm47xxpart.c:12:0:
>> include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
>> include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first
>> use in this function)
>>
>> Clearly we want to include linux/errno.h here.
>
>
> unfortunate that you did not find the commit that caused this build
> regression. You could produce preprocessor output when it was working to see
> where errno.h got implicitly included and start looking there for git
> history.

I did a 'git bisect run make drivers/mtd/bcm47xxpart.o' now, which pointed to
0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h").

That commit seems reasonable, it was just bad luck that it caused this
regression. The commit is currently in the rcu/rcu/next branch of tip.git,
so Paul could merge the patch there.

       Arnd
Paul E. McKenney May 31, 2017, 1:12 p.m. UTC | #4
On Wed, May 31, 2017 at 12:21:10PM +0200, Arnd Bergmann wrote:
> On Wed, May 31, 2017 at 11:43 AM, Arend van Spriel
> <arend.vanspriel@broadcom.com> wrote:
> > On 5/30/2017 1:20 PM, Arnd Bergmann wrote:
> >>
> >> An unknown change in the kernel headers caused a build regression
> >> in an MTD partition driver:
> >>
> >> In file included from drivers/mtd/bcm47xxpart.c:12:0:
> >> include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
> >> include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first
> >> use in this function)
> >>
> >> Clearly we want to include linux/errno.h here.
> >
> >
> > unfortunate that you did not find the commit that caused this build
> > regression. You could produce preprocessor output when it was working to see
> > where errno.h got implicitly included and start looking there for git
> > history.
> 
> I did a 'git bisect run make drivers/mtd/bcm47xxpart.o' now, which pointed to
> 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h").
> 
> That commit seems reasonable, it was just bad luck that it caused this
> regression. The commit is currently in the rcu/rcu/next branch of tip.git,
> so Paul could merge the patch there.

Apologies for the inconvenience, not sure why 0day test robot didn't
find this.  Probably because it cannot test each and every driver.  ;-)

This patch, correct?

	https://lkml.org/lkml/2017/5/30/348

							Thanx, Paul
Arnd Bergmann May 31, 2017, 1:34 p.m. UTC | #5
On Wed, May 31, 2017 at 3:12 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> On Wed, May 31, 2017 at 12:21:10PM +0200, Arnd Bergmann wrote:
>> On Wed, May 31, 2017 at 11:43 AM, Arend van Spriel
>> <arend.vanspriel@broadcom.com> wrote:
>> > On 5/30/2017 1:20 PM, Arnd Bergmann wrote:
>> >>
>> >> An unknown change in the kernel headers caused a build regression
>> >> in an MTD partition driver:
>> >>
>> >> In file included from drivers/mtd/bcm47xxpart.c:12:0:
>> >> include/linux/bcm47xx_nvram.h: In function 'bcm47xx_nvram_init_from_mem':
>> >> include/linux/bcm47xx_nvram.h:27:10: error: 'ENOTSUPP' undeclared (first
>> >> use in this function)
>> >>
>> >> Clearly we want to include linux/errno.h here.
>> >
>> >
>> > unfortunate that you did not find the commit that caused this build
>> > regression. You could produce preprocessor output when it was working to see
>> > where errno.h got implicitly included and start looking there for git
>> > history.
>>
>> I did a 'git bisect run make drivers/mtd/bcm47xxpart.o' now, which pointed to
>> 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h").
>>
>> That commit seems reasonable, it was just bad luck that it caused this
>> regression. The commit is currently in the rcu/rcu/next branch of tip.git,
>> so Paul could merge the patch there.
>
> Apologies for the inconvenience, not sure why 0day test robot didn't
> find this.  Probably because it cannot test each and every driver.  ;-)

No worries.

> This patch, correct?
>
>         https://lkml.org/lkml/2017/5/30/348

Right, I should have included the link.

      Arnd
diff mbox

Patch

diff --git a/include/linux/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h
index 2793652fbf66..a414a2b53e41 100644
--- a/include/linux/bcm47xx_nvram.h
+++ b/include/linux/bcm47xx_nvram.h
@@ -8,6 +8,7 @@ 
 #ifndef __BCM47XX_NVRAM_H
 #define __BCM47XX_NVRAM_H
 
+#include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>