Skip to contentSkip to conversation

bcm47xx: fix build regression

PATCH In review Arnd Bergmann 4 participants 9 messages May 30, 2017 – Jun 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm47xx: fix build regression

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.

---
 include/linux/bcm47xx_nvram.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Tue, 30 May 2017 13:20:12 +0200 Arnd Bergmann <[email protected]> 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.

Quoted 16 lines
---
 include/linux/bcm47xx_nvram.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>
#2 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

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

Quoted 18 lines
---
  include/linux/bcm47xx_nvram.h | 1 +
  1 file changed, 1 insertion(+)
include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>
#3 lore raw
Quoted 10 lines · Arend van Spriel
Quoted 9 lines · Arnd Bergmann

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)

Quoted 7 lines
Quoted 1 line

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

#4 lore raw
Quoted 20 lines · Arnd Bergmann
Quoted 10 lines · Arend van Spriel
Quoted 9 lines · Arnd Bergmann

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)

Quoted 7 lines
Quoted 1 line

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.

Quoted 6 lines

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
#5 lore raw
Quoted 24 lines · Paul E. McKenney
Quoted 23 lines · Arnd Bergmann
Quoted 10 lines · Arend van Spriel
Quoted 9 lines · Arnd Bergmann

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)

Quoted 7 lines
Quoted 1 line

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

Quoted 6 lines
Quoted 3 lines

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.

Quoted 3 lines

This patch, correct?

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

Right, I should have included the link.

Arnd

#6 lore raw
Quoted 33 lines · Arnd Bergmann
Quoted 24 lines · Paul E. McKenney
Quoted 23 lines · Arnd Bergmann
Quoted 10 lines · Arend van Spriel
Quoted 9 lines · Arnd Bergmann

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)

Quoted 7 lines
Quoted 1 line

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

Quoted 6 lines
Quoted 3 lines

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

Quoted 7 lines

No worries.

Quoted 3 lines

This patch, correct?

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

Right, I should have included the link.

And my turn to say "no worries". ;-)

I reworked the commit log to tell the full story as shown below. Anything I misstated or otherwise missed?

Thanx, Paul

------------------------------------------------------------------------

commit ff278071dce9af9da2b5e2b33f682710a855d266

Author: Arnd Bergmann <[email protected]>
Date:   Wed May 31 09:26:07 2017 -0700

bcm47xx: fix build regression

Commit 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h") 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)

The rcupdate.h file has no particular need for linux/errno.h, so this commit includes linux/errno.h into bcm47xx_nvram.h.

include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>
#7 lore raw
Quoted 24 lines · Paul E. McKenney
Quoted 23 lines · Arnd Bergmann
Quoted 21 lines · Paul E. McKenney
Quoted 20 lines · Arnd Bergmann
Quoted 17 lines · Arend van Spriel
Quoted 10 lines · Arnd Bergmann

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.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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,

Thanks for digging a bit further. I am a sucker for telling the whole story.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

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.

Quoted 2 lines

This patch, correct?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line
        https://lkml.org/lkml/2017/5/30/348

Right, I should have included the link.

And my turn to say "no worries". ;-)

I reworked the commit log to tell the full story as shown below. Anything I misstated or otherwise missed?

Maybe add the 'Fixes:' tag, ie.:

Fixes 0bc2d534708b ("rcu: Refactor #includes from

include/linux/rcupdate.h")

Seems a bit redundant given that you mentioned it in the commit message, but it might be looked for in kernel-stats scripts.

Regards,
Arend

Quoted 36 lines

Thanx, Paul

------------------------------------------------------------------------

commit ff278071dce9af9da2b5e2b33f682710a855d266

Author: Arnd Bergmann <[email protected]>
Date:   Wed May 31 09:26:07 2017 -0700

bcm47xx: fix build regression

Commit 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h") 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)

The rcupdate.h file has no particular need for linux/errno.h, so this commit includes linux/errno.h into bcm47xx_nvram.h.

include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>
#8 lore raw
Quoted 53 lines · Arend van Spriel
Quoted 24 lines · Paul E. McKenney
Quoted 23 lines · Arnd Bergmann
Quoted 21 lines · Paul E. McKenney
Quoted 20 lines · Arnd Bergmann
Quoted 17 lines · Arend van Spriel
Quoted 10 lines · Arnd Bergmann

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.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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,

Thanks for digging a bit further. I am a sucker for telling the whole story.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

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.

Quoted 2 lines

This patch, correct?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line
        https://lkml.org/lkml/2017/5/30/348

Right, I should have included the link.

And my turn to say "no worries". ;-)

I reworked the commit log to tell the full story as shown below. Anything I misstated or otherwise missed?

Quoted 7 lines

Maybe add the 'Fixes:' tag, ie.:

Fixes 0bc2d534708b ("rcu: Refactor #includes from

include/linux/rcupdate.h")

Seems a bit redundant given that you mentioned it in the commit message, but it might be looked for in kernel-stats scripts.

Had to rebase anyway for other reasons, so why not?

Thanx, Paul

Quoted 40 lines

Regards,
Arend

Quoted 36 lines

Thanx, Paul

------------------------------------------------------------------------

commit ff278071dce9af9da2b5e2b33f682710a855d266

Author: Arnd Bergmann <[email protected]>
Date:   Wed May 31 09:26:07 2017 -0700

bcm47xx: fix build regression

Commit 0bc2d534708b ("rcu: Refactor #includes from include/linux/rcupdate.h") 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)

The rcupdate.h file has no particular need for linux/errno.h, so this commit includes linux/errno.h into bcm47xx_nvram.h.

include/linux/bcm47xx_nvram.h +1 -0
index 2793652fbf66..a414a2b53e41 100644
@@ -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>