* [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
@ 2007-08-19 22:19 Joe Perches
2007-08-19 22:34 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2007-08-19 22:19 UTC (permalink / raw)
To: kernel-janitors, linux-kernel; +Cc: Greg Kroah-Hartman, Markus Rechberger
(untested)
There are several files that
#include "linux/file" not #include <linux/file>
#include "asm/file" not #include <asm/file>
Here's a little script that converts them:
egrep -i -r -l --include=*.[ch] \
"^[[:space:]]*\#[[:space:]]*include[[:space:]]*\"(linux|asm)/(.*)\"" * \
| xargs sed -i -e 's/^[[:space:]]*#[[:space:]]*include[[:space:]]*"\(linux\|asm\)\/\(.*\)"/#include <\1\/\2>/g'
This one is probably wrong.
It should likely keep firmware.h in
the same directory as firmware.c
Signed-off-by: Joe Perches <joe@perches.com>
diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c
index 6865cbe..754ded2 100644
--- a/Documentation/firmware_class/firmware_sample_driver.c
+++ b/Documentation/firmware_class/firmware_sample_driver.c
@@ -13,7 +13,7 @@
#include <linux/device.h>
#include <linux/string.h>
-#include "linux/firmware.h"
+#include "firmware.h"
static struct device ghost_device = {
.bus_id = "ghost0",
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
2007-08-19 22:19 [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...> Joe Perches
@ 2007-08-19 22:34 ` Randy Dunlap
2007-08-19 22:31 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2007-08-19 22:34 UTC (permalink / raw)
To: Joe Perches
Cc: kernel-janitors, linux-kernel, Greg Kroah-Hartman,
Markus Rechberger
On Sun, 19 Aug 2007 15:19:32 -0700 Joe Perches wrote:
> (untested)
>
> There are several files that
> #include "linux/file" not #include <linux/file>
> #include "asm/file" not #include <asm/file>
>
> Here's a little script that converts them:
>
> egrep -i -r -l --include=*.[ch] \
> "^[[:space:]]*\#[[:space:]]*include[[:space:]]*\"(linux|asm)/(.*)\"" * \
> | xargs sed -i -e 's/^[[:space:]]*#[[:space:]]*include[[:space:]]*"\(linux\|asm\)\/\(.*\)"/#include <\1\/\2>/g'
>
> This one is probably wrong.
>
> It should likely keep firmware.h in
> the same directory as firmware.c
>
> Signed-off-by: Joe Perches <joe@perches.com>
>
> diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c
> index 6865cbe..754ded2 100644
> --- a/Documentation/firmware_class/firmware_sample_driver.c
> +++ b/Documentation/firmware_class/firmware_sample_driver.c
> @@ -13,7 +13,7 @@
> #include <linux/device.h>
> #include <linux/string.h>
>
> -#include "linux/firmware.h"
> +#include "firmware.h"
I believe that it should be <linux/firmware.h>.
> static struct device ghost_device = {
> .bus_id = "ghost0",
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
2007-08-19 22:34 ` Randy Dunlap
@ 2007-08-19 22:31 ` Joe Perches
2007-08-19 22:41 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2007-08-19 22:31 UTC (permalink / raw)
To: Randy Dunlap
Cc: kernel-janitors, linux-kernel, Greg Kroah-Hartman,
Markus Rechberger
On Sun, 2007-08-19 at 15:34 -0700, Randy Dunlap wrote:
> > -#include "linux/firmware.h"
> > +#include "firmware.h"
> I believe that it should be <linux/firmware.h>.
OK.
That's not my taste though, especially if only
included by files in the firmware_class directory.
Less pollution/namespace collision in include/linux
cheers, Joe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
2007-08-19 22:31 ` Joe Perches
@ 2007-08-19 22:41 ` Randy Dunlap
2007-08-19 22:41 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2007-08-19 22:41 UTC (permalink / raw)
To: Joe Perches
Cc: kernel-janitors, linux-kernel, Greg Kroah-Hartman,
Markus Rechberger
On Sun, 19 Aug 2007 15:31:57 -0700 Joe Perches wrote:
> On Sun, 2007-08-19 at 15:34 -0700, Randy Dunlap wrote:
> > > -#include "linux/firmware.h"
> > > +#include "firmware.h"
> > I believe that it should be <linux/firmware.h>.
>
> OK.
>
> That's not my taste though, especially if only
> included by files in the firmware_class directory.
> Less pollution/namespace collision in include/linux
It's not only included in that directory.
I find it included in 88 source files throughout the kernel tree.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
2007-08-19 22:41 ` Randy Dunlap
@ 2007-08-19 22:41 ` Joe Perches
0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2007-08-19 22:41 UTC (permalink / raw)
To: Randy Dunlap
Cc: kernel-janitors, linux-kernel, Greg Kroah-Hartman,
Markus Rechberger
On Sun, 2007-08-19 at 15:41 -0700, Randy Dunlap wrote:
> It's not only included in that directory.
> I find it included in 88 source files throughout the kernel tree.
I see, sorry. I didn't read the file.
I thought it was a sample driver with a binary blob.
cheers, Joe
Signed-off-by: Joe Perches <joe@perches.com>
diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c
index 6865cbe..754ded2 100644
--- a/Documentation/firmware_class/firmware_sample_driver.c
+++ b/Documentation/firmware_class/firmware_sample_driver.c
@@ -13,7 +13,7 @@
#include <linux/device.h>
#include <linux/string.h>
-#include "linux/firmware.h"
+#include <linux/firmware.h>
static struct device ghost_device = {
.bus_id = "ghost0",
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-19 22:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-19 22:19 [PATCH 4/5] Documentation/firmware/... convert #include "linux/..." to #include <linux/...> Joe Perches
2007-08-19 22:34 ` Randy Dunlap
2007-08-19 22:31 ` Joe Perches
2007-08-19 22:41 ` Randy Dunlap
2007-08-19 22:41 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox