All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Mallon <rmallon@gmail.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: "axel.lin@gmail.com" <axel.lin@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Mundt <lethal@linux-sh.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH] video: ep93xx-fb: add missing include of linux/module.h
Date: Mon, 22 Aug 2011 23:48:03 +0000	[thread overview]
Message-ID: <4E52EAB3.4090201@gmail.com> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F001F388575258@AUSP01VMBX24.collaborationhost.net>

On 23/08/11 02:40, H Hartley Sweeten wrote:
> On Sunday, August 21, 2011 5:31 PM, Ryan Mallon wrote:
>> On 22/08/11 10:06, Axel Lin wrote:
>>> 2011/8/22 Ryan Mallon<rmallon@gmail.com>:
>>>> On 22/08/11 09:41, Ryan Mallon wrote:
>>>>> On 22/08/11 00:39, Axel Lin wrote:
>>>>>> ep93xx-fb.c uses interfaces from linux/module.h,
>>>>>> so it should include that file.  This patch fixes below build errors.
>>>>> What actually changed to make these files broken? Did some other header
>>>>> previously include module.h for us? How many other drivers are broken?
>>>>>
>>>>> Anyway, the change is okay.
>>>>>
>>>>> Acked-by: Ryan Mallon<rmallon@gmail.com>
>>>> Actually, having a second look at this it does not look right.
>>>>
>>>> drivers/video/ep93xx-fb.c includes linux/platform.h (as its first include),
>>>> which includes linux/driver.h, which includes linux/module.h.
>>>>
>>>> Just tested on Linus' latest tree and both this driver and the ep93xx
>>>> backlight driver build fine. What kernel version are you using?
>>>>
>>>> ~Ryan
>>> hi Ryan,
>>>
>>> The patch is against linux-next tree.
>>> I got build error for ep93xx-fb.c and ep93xx_bl.c on linux-next tree.
>>> ( next-20110819 )
>> Ok, I see now. The change which caused the breakage is fdb697c:
>> "include: replace linux/module.h with "struct module" wherever
>> possible". How many other drivers got broken now that device.h does not
>> include module.h?
> Probably a lot...  Which is one of the reasons linux-next exists.. . ;-)

Does anybody know how we can quickly determine which drivers are broken 
short of doing an allyesconfig? I tried to do some quick tricks by 
passing files which contain THIS_MODULE/MODULE_* through cpp, but I get 
loads of errors in headers files because I'm missing some config 
includes. Is there an easy way to get the kbuild arguments for the 
current .config so I can pass them to cpp?

> Actually, Paul Gortmaker caused this breakage with the commit.  He should
> take a deeper look and see what it broke.  From his commit:
>
>      Most of the implicit dependencies on module.h being present by
>      these headers pulling it in have been now weeded out, so we can
>      finally make this change with hopefully minimal breakage.

Quick glance:

ryanm@kiwi:linux-2.6$ grep -lR "^MODULE_" drivers/  | xargs grep -L 
"linux/module.h\|linux/moduleloader.h\|linux/miscdevice.h\|linux/regmap.h\|linux/irq.h"  
| wc -l
579

ryanm@kiwi:linux-2.6$ grep -lR "THIS_MODULE" drivers/ | xargs grep -L 
"linux/module.h\|linux/moduleloader.h\|linux/miscdevice.h\|linux/regmap.h\|linux/irq.h\|linux/export.h\|acpi/platform/aclinux.h\|xen/xenbus.h"   
| wc -l
399

Not sure how many of those are really broken though since there may be a 
few other ways to include module.h/export.h. I would also think there 
would be a lot more build failure reports if all of those were broken :-).

~Ryan




WARNING: multiple messages have this Message-ID (diff)
From: Ryan Mallon <rmallon@gmail.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: "axel.lin@gmail.com" <axel.lin@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Mundt <lethal@linux-sh.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH] video: ep93xx-fb: add missing include of linux/module.h
Date: Tue, 23 Aug 2011 09:48:03 +1000	[thread overview]
Message-ID: <4E52EAB3.4090201@gmail.com> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F001F388575258@AUSP01VMBX24.collaborationhost.net>

On 23/08/11 02:40, H Hartley Sweeten wrote:
> On Sunday, August 21, 2011 5:31 PM, Ryan Mallon wrote:
>> On 22/08/11 10:06, Axel Lin wrote:
>>> 2011/8/22 Ryan Mallon<rmallon@gmail.com>:
>>>> On 22/08/11 09:41, Ryan Mallon wrote:
>>>>> On 22/08/11 00:39, Axel Lin wrote:
>>>>>> ep93xx-fb.c uses interfaces from linux/module.h,
>>>>>> so it should include that file.  This patch fixes below build errors.
>>>>> What actually changed to make these files broken? Did some other header
>>>>> previously include module.h for us? How many other drivers are broken?
>>>>>
>>>>> Anyway, the change is okay.
>>>>>
>>>>> Acked-by: Ryan Mallon<rmallon@gmail.com>
>>>> Actually, having a second look at this it does not look right.
>>>>
>>>> drivers/video/ep93xx-fb.c includes linux/platform.h (as its first include),
>>>> which includes linux/driver.h, which includes linux/module.h.
>>>>
>>>> Just tested on Linus' latest tree and both this driver and the ep93xx
>>>> backlight driver build fine. What kernel version are you using?
>>>>
>>>> ~Ryan
>>> hi Ryan,
>>>
>>> The patch is against linux-next tree.
>>> I got build error for ep93xx-fb.c and ep93xx_bl.c on linux-next tree.
>>> ( next-20110819 )
>> Ok, I see now. The change which caused the breakage is fdb697c:
>> "include: replace linux/module.h with "struct module" wherever
>> possible". How many other drivers got broken now that device.h does not
>> include module.h?
> Probably a lot...  Which is one of the reasons linux-next exists.. . ;-)

Does anybody know how we can quickly determine which drivers are broken 
short of doing an allyesconfig? I tried to do some quick tricks by 
passing files which contain THIS_MODULE/MODULE_* through cpp, but I get 
loads of errors in headers files because I'm missing some config 
includes. Is there an easy way to get the kbuild arguments for the 
current .config so I can pass them to cpp?

> Actually, Paul Gortmaker caused this breakage with the commit.  He should
> take a deeper look and see what it broke.  From his commit:
>
>      Most of the implicit dependencies on module.h being present by
>      these headers pulling it in have been now weeded out, so we can
>      finally make this change with hopefully minimal breakage.

Quick glance:

ryanm@kiwi:linux-2.6$ grep -lR "^MODULE_" drivers/  | xargs grep -L 
"linux/module.h\|linux/moduleloader.h\|linux/miscdevice.h\|linux/regmap.h\|linux/irq.h"  
| wc -l
579

ryanm@kiwi:linux-2.6$ grep -lR "THIS_MODULE" drivers/ | xargs grep -L 
"linux/module.h\|linux/moduleloader.h\|linux/miscdevice.h\|linux/regmap.h\|linux/irq.h\|linux/export.h\|acpi/platform/aclinux.h\|xen/xenbus.h"   
| wc -l
399

Not sure how many of those are really broken though since there may be a 
few other ways to include module.h/export.h. I would also think there 
would be a lot more build failure reports if all of those were broken :-).

~Ryan




  reply	other threads:[~2011-08-22 23:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 14:39 [PATCH] video: ep93xx-fb: add missing include of linux/module.h Axel Lin
2011-08-21 14:39 ` Axel Lin
2011-08-21 23:41 ` Ryan Mallon
2011-08-21 23:41   ` Ryan Mallon
2011-08-21 23:54   ` Ryan Mallon
2011-08-21 23:54     ` Ryan Mallon
2011-08-22  0:06     ` Axel Lin
2011-08-22  0:06       ` Axel Lin
2011-08-22  0:31       ` Ryan Mallon
2011-08-22  0:31         ` Ryan Mallon
2011-08-22 16:40         ` H Hartley Sweeten
2011-08-22 16:40           ` H Hartley Sweeten
2011-08-22 23:48           ` Ryan Mallon [this message]
2011-08-22 23:48             ` Ryan Mallon
2011-08-24 13:39             ` Paul Gortmaker
2011-08-24 13:39               ` Paul Gortmaker
2011-08-22 16:36 ` H Hartley Sweeten
2011-08-22 16:36   ` H Hartley Sweeten

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=4E52EAB3.4090201@gmail.com \
    --to=rmallon@gmail.com \
    --cc=axel.lin@gmail.com \
    --cc=hartleys@visionengravers.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.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.