mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h
@ 2015-05-15 13:02 Masahiro Yamada
  2015-05-17 15:47 ` Antony Pavlov
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2015-05-15 13:02 UTC (permalink / raw)
  To: barebox

In the latest Linux coding style, <linux/io.h> should be included
rather than <asm/io.h>.  To follow this standard also in barebox,
add include/linux/io.h.  Currently, it just includes <asm/io.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v2:
  - Fix a type s/introcude/introduce/

 include/linux/io.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 include/linux/io.h

diff --git a/include/linux/io.h b/include/linux/io.h
new file mode 100644
index 0000000..548b245
--- /dev/null
+++ b/include/linux/io.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2006 PathScale, Inc.  All Rights Reserved.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _LINUX_IO_H
+#define _LINUX_IO_H
+
+#include <asm/io.h>
+
+#endif /* _LINUX_IO_H */
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h
  2015-05-15 13:02 [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h Masahiro Yamada
@ 2015-05-17 15:47 ` Antony Pavlov
  2015-05-18  1:48   ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Antony Pavlov @ 2015-05-17 15:47 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Fri, 15 May 2015 22:02:47 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> In the latest Linux coding style, <linux/io.h> should be included
> rather than <asm/io.h>.  To follow this standard also in barebox,
> add include/linux/io.h.  Currently, it just includes <asm/io.h>.

Hmmm. Barebox already has include/io.h for the same purpose.
And include/io.h is actively used:

~/barebox.git$ git grep "include <io.h>" | wc -l
474



> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> Changes in v2:
>   - Fix a type s/introcude/introduce/
> 
>  include/linux/io.h | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 include/linux/io.h
> 
> diff --git a/include/linux/io.h b/include/linux/io.h
> new file mode 100644
> index 0000000..548b245
> --- /dev/null
> +++ b/include/linux/io.h
> @@ -0,0 +1,23 @@
> +/*
> + * Copyright 2006 PathScale, Inc.  All Rights Reserved.
> + *
> + * This file is free software; you can redistribute it and/or modify
> + * it under the terms of version 2 of the GNU General Public License
> + * as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software Foundation,
> + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
> + */
> +
> +#ifndef _LINUX_IO_H
> +#define _LINUX_IO_H
> +
> +#include <asm/io.h>
> +
> +#endif /* _LINUX_IO_H */
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h
  2015-05-17 15:47 ` Antony Pavlov
@ 2015-05-18  1:48   ` Masahiro Yamada
  2015-05-18 12:29     ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2015-05-18  1:48 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

2015-05-18 0:47 GMT+09:00 Antony Pavlov <antonynpavlov@gmail.com>:
> On Fri, 15 May 2015 22:02:47 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
>> In the latest Linux coding style, <linux/io.h> should be included
>> rather than <asm/io.h>.  To follow this standard also in barebox,
>> add include/linux/io.h.  Currently, it just includes <asm/io.h>.
>
> Hmmm. Barebox already has include/io.h for the same purpose.
> And include/io.h is actively used:
>
> ~/barebox.git$ git grep "include <io.h>" | wc -l
> 474
>

We can replace all of them with sed easily.

Moreover, cpu_read{b,w,l} and cpu_write{b,w,l} turned out unnecessary after all.
Most of C sources use __raw_*.



-- 
Best Regards
Masahiro Yamada

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h
  2015-05-18  1:48   ` Masahiro Yamada
@ 2015-05-18 12:29     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-05-18 12:29 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Mon, May 18, 2015 at 10:48:30AM +0900, Masahiro Yamada wrote:
> 2015-05-18 0:47 GMT+09:00 Antony Pavlov <antonynpavlov@gmail.com>:
> > On Fri, 15 May 2015 22:02:47 +0900
> > Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> >
> >> In the latest Linux coding style, <linux/io.h> should be included
> >> rather than <asm/io.h>.  To follow this standard also in barebox,
> >> add include/linux/io.h.  Currently, it just includes <asm/io.h>.
> >
> > Hmmm. Barebox already has include/io.h for the same purpose.
> > And include/io.h is actively used:
> >
> > ~/barebox.git$ git grep "include <io.h>" | wc -l
> > 474
> >
> 
> We can replace all of them with sed easily.

I'm with Antony here. I think we can afford our own version of <io.h>.

> 
> Moreover, cpu_read{b,w,l} and cpu_write{b,w,l} turned out unnecessary after all.
> Most of C sources use __raw_*.

Agreed, these could be removed.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2015-05-18 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 13:02 [PATCH v2] include: introduce include/linux/io.h as a wrapper of asm/io.h Masahiro Yamada
2015-05-17 15:47 ` Antony Pavlov
2015-05-18  1:48   ` Masahiro Yamada
2015-05-18 12:29     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox