linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
@ 2016-12-20 21:18 Paul Gortmaker
  2016-12-21 15:19 ` Hauke Mehrtens
  2016-12-21 23:27 ` kbuild test robot
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Gortmaker @ 2016-12-20 21:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Hauke Mehrtens, Boris Brezillon, Linus Walleij,
	Alexandre Courbot, linux-gpio

In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
include module.h in shared driver header") we fixed a bunch of
implicit includes and then did what the shortlog says -- remove
module.h from a gpio header.

In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
("mtd: nand: xway: convert to normal platform driver") added new
modular function calls to a file that now became relying on the
above module.h presence in the gpio header, since it did not
explicitly include module.h header for them as part of the change.

The problem only appears when the two dev streams are merged.

Since the file is tristate, the fix is obvious -- it needs an
explicit include of module.h header.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[Resending with all Cc: enabled/added this time ...   :-(  ]

 drivers/mtd/nand/xway_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
index 1f2948c0c458..00168d633bcf 100644
--- a/drivers/mtd/nand/xway_nand.c
+++ b/drivers/mtd/nand/xway_nand.c
@@ -7,6 +7,7 @@
  *  Copyright © 2016 Hauke Mehrtens <hauke@hauke-m.de>
  */
 
+#include <linux/module.h>
 #include <linux/mtd/nand.h>
 #include <linux/of_gpio.h>
 #include <linux/of_platform.h>
-- 
2.11.0

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-20 21:18 [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c Paul Gortmaker
@ 2016-12-21 15:19 ` Hauke Mehrtens
  2016-12-21 17:44   ` Paul Gortmaker
  2016-12-22  9:01   ` Boris Brezillon
  2016-12-21 23:27 ` kbuild test robot
  1 sibling, 2 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2016-12-21 15:19 UTC (permalink / raw)
  To: Paul Gortmaker, linux-kernel
  Cc: Boris Brezillon, Linus Walleij, Alexandre Courbot, linux-gpio



On 12/20/2016 10:18 PM, Paul Gortmaker wrote:
> In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
> include module.h in shared driver header") we fixed a bunch of
> implicit includes and then did what the shortlog says -- remove
> module.h from a gpio header.
> 
> In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
> ("mtd: nand: xway: convert to normal platform driver") added new
> modular function calls to a file that now became relying on the
> above module.h presence in the gpio header, since it did not
> explicitly include module.h header for them as part of the change.
> 
> The problem only appears when the two dev streams are merged.
> 
> Since the file is tristate, the fix is obvious -- it needs an
> explicit include of module.h header.

Hi Paul,

the xway nand driver does not build as a module, so I made it bool, this
patch:
http://lists.infradead.org/pipermail/linux-mtd/2016-December/070800.html
And then made it use the non module versions here:
http://lists.infradead.org/pipermail/linux-mtd/2016-December/070801.html

In the beginning I also came up with the same patch as you, but the mtd
people suggested to do it differently. I hope my two patches are on
their way into Linus tree.

Hauke

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-21 15:19 ` Hauke Mehrtens
@ 2016-12-21 17:44   ` Paul Gortmaker
  2016-12-22  9:01   ` Boris Brezillon
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Gortmaker @ 2016-12-21 17:44 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: linux-kernel, Boris Brezillon, Linus Walleij, Alexandre Courbot,
	linux-gpio

[Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c] On 21/12/2016 (Wed 16:19) Hauke Mehrtens wrote:

> 
> 
> On 12/20/2016 10:18 PM, Paul Gortmaker wrote:
> > In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
> > include module.h in shared driver header") we fixed a bunch of
> > implicit includes and then did what the shortlog says -- remove
> > module.h from a gpio header.
> > 
> > In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
> > ("mtd: nand: xway: convert to normal platform driver") added new
> > modular function calls to a file that now became relying on the
> > above module.h presence in the gpio header, since it did not
> > explicitly include module.h header for them as part of the change.
> > 
> > The problem only appears when the two dev streams are merged.
> > 
> > Since the file is tristate, the fix is obvious -- it needs an
> > explicit include of module.h header.
> 
> Hi Paul,
> 
> the xway nand driver does not build as a module, so I made it bool, this
> patch:
> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070800.html
> And then made it use the non module versions here:
> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070801.html
> 
> In the beginning I also came up with the same patch as you, but the mtd
> people suggested to do it differently. I hope my two patches are on
> their way into Linus tree.

Yes, if it makes no sense to be modular, then using the non module
versions is the way to go.  Odd that the kbuild test robot decided to
start complaining about it this week...  both of the commits I mentioned
above have been in linux-next for months.

Paul.
--

> 
> Hauke
> 

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-20 21:18 [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c Paul Gortmaker
  2016-12-21 15:19 ` Hauke Mehrtens
@ 2016-12-21 23:27 ` kbuild test robot
  2016-12-24 17:19   ` Hauke Mehrtens
  1 sibling, 1 reply; 8+ messages in thread
From: kbuild test robot @ 2016-12-21 23:27 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: kbuild-all, linux-kernel, Paul Gortmaker, Hauke Mehrtens,
	Boris Brezillon, Linus Walleij, Alexandre Courbot, linux-gpio

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

Hi Paul,

[auto build test ERROR on mtd/master]
[also build test ERROR on v4.9 next-20161221]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Paul-Gortmaker/mtd-nand-fix-implicit-module-h-usage-in-xway_nand-c/20161221-115714
base:   git://git.infradead.org/linux-mtd.git master
config: mips-xway_defconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/built-in.o: In function `vpe_run':
>> (.text+0x148f0): undefined reference to `physical_memsize'
   arch/mips/built-in.o: In function `vpe_run':
   (.text+0x148f4): undefined reference to `physical_memsize'

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 15824 bytes --]

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-21 15:19 ` Hauke Mehrtens
  2016-12-21 17:44   ` Paul Gortmaker
@ 2016-12-22  9:01   ` Boris Brezillon
  2016-12-24 17:18     ` Hauke Mehrtens
  1 sibling, 1 reply; 8+ messages in thread
From: Boris Brezillon @ 2016-12-22  9:01 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: Paul Gortmaker, linux-kernel, Linus Walleij, Alexandre Courbot,
	linux-gpio, Brian Norris

+Brian

On Wed, 21 Dec 2016 16:19:00 +0100
Hauke Mehrtens <hauke@hauke-m.de> wrote:

> On 12/20/2016 10:18 PM, Paul Gortmaker wrote:
> > In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
> > include module.h in shared driver header") we fixed a bunch of
> > implicit includes and then did what the shortlog says -- remove
> > module.h from a gpio header.
> > 
> > In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
> > ("mtd: nand: xway: convert to normal platform driver") added new
> > modular function calls to a file that now became relying on the
> > above module.h presence in the gpio header, since it did not
> > explicitly include module.h header for them as part of the change.
> > 
> > The problem only appears when the two dev streams are merged.
> > 
> > Since the file is tristate, the fix is obvious -- it needs an
> > explicit include of module.h header.  
> 
> Hi Paul,
> 
> the xway nand driver does not build as a module, so I made it bool, this
> patch:
> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070800.html
> And then made it use the non module versions here:
> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070801.html
> 
> In the beginning I also came up with the same patch as you, but the mtd
> people suggested to do it differently. I hope my two patches are on
> their way into Linus tree.

Yep. Just waiting for Linus to release 4.10-rc1 to rebase my nand/next
branch and start applying new patches. It should be queued for 4.11 and
backported to all previous release (thanks to the Cc-stable + Fixes
tags).

I didn't plan to take these fixes in one of the 4.10-rc fixes PR, since
this bug is here for several releases, and no-one complained before.
Let me know if you think otherwise, I'll add my ack and ask Brian to
take it in the MTD tree.

Regards,

Boris

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-22  9:01   ` Boris Brezillon
@ 2016-12-24 17:18     ` Hauke Mehrtens
  0 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2016-12-24 17:18 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Paul Gortmaker, linux-kernel, Linus Walleij, Alexandre Courbot,
	linux-gpio, Brian Norris



On 12/22/2016 10:01 AM, Boris Brezillon wrote:
> +Brian
> 
> On Wed, 21 Dec 2016 16:19:00 +0100
> Hauke Mehrtens <hauke@hauke-m.de> wrote:
> 
>> On 12/20/2016 10:18 PM, Paul Gortmaker wrote:
>>> In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
>>> include module.h in shared driver header") we fixed a bunch of
>>> implicit includes and then did what the shortlog says -- remove
>>> module.h from a gpio header.
>>>
>>> In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
>>> ("mtd: nand: xway: convert to normal platform driver") added new
>>> modular function calls to a file that now became relying on the
>>> above module.h presence in the gpio header, since it did not
>>> explicitly include module.h header for them as part of the change.
>>>
>>> The problem only appears when the two dev streams are merged.
>>>
>>> Since the file is tristate, the fix is obvious -- it needs an
>>> explicit include of module.h header.  
>>
>> Hi Paul,
>>
>> the xway nand driver does not build as a module, so I made it bool, this
>> patch:
>> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070800.html
>> And then made it use the non module versions here:
>> http://lists.infradead.org/pipermail/linux-mtd/2016-December/070801.html
>>
>> In the beginning I also came up with the same patch as you, but the mtd
>> people suggested to do it differently. I hope my two patches are on
>> their way into Linus tree.
> 
> Yep. Just waiting for Linus to release 4.10-rc1 to rebase my nand/next
> branch and start applying new patches. It should be queued for 4.11 and
> backported to all previous release (thanks to the Cc-stable + Fixes
> tags).
> 
> I didn't plan to take these fixes in one of the 4.10-rc fixes PR, since
> this bug is here for several releases, and no-one complained before.
> Let me know if you think otherwise, I'll add my ack and ask Brian to
> take it in the MTD tree.

The difference is that the NAND driver built when build in kernel till
4.9 because the module.h header file was included indirectly. This broke
by the combination of the two commits mentioned by Paul.

Hauke

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

* Re: [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
  2016-12-21 23:27 ` kbuild test robot
@ 2016-12-24 17:19   ` Hauke Mehrtens
  0 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2016-12-24 17:19 UTC (permalink / raw)
  To: kbuild test robot, Paul Gortmaker
  Cc: kbuild-all, linux-kernel, Boris Brezillon, Linus Walleij,
	Alexandre Courbot, linux-gpio, linux-mips



On 12/22/2016 12:27 AM, kbuild test robot wrote:
> Hi Paul,
> 
> [auto build test ERROR on mtd/master]
> [also build test ERROR on v4.9 next-20161221]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Paul-Gortmaker/mtd-nand-fix-implicit-module-h-usage-in-xway_nand-c/20161221-115714
> base:   git://git.infradead.org/linux-mtd.git master
> config: mips-xway_defconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=mips 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/mips/built-in.o: In function `vpe_run':
>>> (.text+0x148f0): undefined reference to `physical_memsize'
>    arch/mips/built-in.o: In function `vpe_run':
>    (.text+0x148f4): undefined reference to `physical_memsize'
Let me look into this, it is probably caused by activating a "bad"
config option and not related to GPIO at all.

Hauke

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

* [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c
@ 2016-12-20 21:16 Paul Gortmaker
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Gortmaker @ 2016-12-20 21:16 UTC (permalink / raw)
  To: linux-kernel

In commit d47529b2e9fe0ec2eb1f072afad8849f52e385c4 ("gpio: don't
include module.h in shared driver header") we fixed a bunch of
implicit includes and then did what the shortlog says -- remove
module.h from a gpio header.

In parallel, commit 024366750c2e04fdcda8bca685194ef0196b35fe
("mtd: nand: xway: convert to normal platform driver") added new
modular function calls to a file that now became relying on the
above module.h presence in the gpio header, since it did not
explicitly include module.h header for them as part of the change.

The problem only appears when the two dev streams are merged.

Since the file is tristate, the fix is obvious -- it needs an
explicit include of module.h header.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/mtd/nand/xway_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
index 1f2948c0c458..00168d633bcf 100644
--- a/drivers/mtd/nand/xway_nand.c
+++ b/drivers/mtd/nand/xway_nand.c
@@ -7,6 +7,7 @@
  *  Copyright © 2016 Hauke Mehrtens <hauke@hauke-m.de>
  */
 
+#include <linux/module.h>
 #include <linux/mtd/nand.h>
 #include <linux/of_gpio.h>
 #include <linux/of_platform.h>
-- 
2.11.0

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

end of thread, other threads:[~2016-12-24 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 21:18 [PATCH] mtd: nand: fix implicit module.h usage in xway_nand.c Paul Gortmaker
2016-12-21 15:19 ` Hauke Mehrtens
2016-12-21 17:44   ` Paul Gortmaker
2016-12-22  9:01   ` Boris Brezillon
2016-12-24 17:18     ` Hauke Mehrtens
2016-12-21 23:27 ` kbuild test robot
2016-12-24 17:19   ` Hauke Mehrtens
  -- strict thread matches above, loose matches on Subject: below --
2016-12-20 21:16 Paul Gortmaker

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