linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] i2c: gpio/algo-bit: clean up headers
@ 2019-01-19 12:16 Wolfram Sang
  2019-01-19 12:16 ` [PATCH 1/3] i2c: algo-bit: include main i2c header Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Wolfram Sang @ 2019-01-19 12:16 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

I wanted to sort headers in the i2c-gpio driver which produced a compile error.
So, I had to fix i2c-algo-bit a little, too. Since there is a dependency
between these patches, here is a small series.

Wolfram Sang (3):
  i2c: algo-bit: include main i2c header
  i2c: algo-bit: convert to SPDX header
  i2c: gpio: sort includes

 drivers/i2c/algos/i2c-algo-bit.c | 25 ++++++++-----------------
 drivers/i2c/busses/i2c-gpio.c    | 10 +++++-----
 include/linux/i2c-algo-bit.h     | 33 ++++++++++-----------------------
 3 files changed, 23 insertions(+), 45 deletions(-)

-- 
2.11.0


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

* [PATCH 1/3] i2c: algo-bit: include main i2c header
  2019-01-19 12:16 [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
@ 2019-01-19 12:16 ` Wolfram Sang
  2019-01-23 10:23   ` Simon Horman
  2019-01-19 12:16 ` [PATCH 2/3] i2c: algo-bit: convert to SPDX header Wolfram Sang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2019-01-19 12:16 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

We are using symbols from it, so we should include it directly. Found
after sorting includes in a driver.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 include/linux/i2c-algo-bit.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index 63904ba6887e..d64cebc6e65a 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -25,6 +25,8 @@
 #ifndef _LINUX_I2C_ALGO_BIT_H
 #define _LINUX_I2C_ALGO_BIT_H
 
+#include <linux/i2c.h>
+
 /* --- Defines for bit-adapters ---------------------------------------	*/
 /*
  * This struct contains the hw-dependent functions of bit-style adapters to
-- 
2.11.0


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

* [PATCH 2/3] i2c: algo-bit: convert to SPDX header
  2019-01-19 12:16 [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
  2019-01-19 12:16 ` [PATCH 1/3] i2c: algo-bit: include main i2c header Wolfram Sang
@ 2019-01-19 12:16 ` Wolfram Sang
  2019-01-23 10:20   ` Simon Horman
  2019-01-19 12:16 ` [PATCH 3/3] i2c: gpio: sort includes Wolfram Sang
  2019-02-05 13:04 ` [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
  3 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2019-01-19 12:16 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

And use kernel style for the remaining comments in the header.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/algos/i2c-algo-bit.c | 25 ++++++++-----------------
 include/linux/i2c-algo-bit.h     | 31 ++++++++-----------------------
 2 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index c33dcfb87993..5e5990a83da5 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -1,21 +1,12 @@
-/* -------------------------------------------------------------------------
- * i2c-algo-bit.c i2c driver algorithms for bit-shift adapters
- * -------------------------------------------------------------------------
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * i2c-algo-bit.c: i2c driver algorithms for bit-shift adapters
+ *
  *   Copyright (C) 1995-2000 Simon G. Vogl
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    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.
- * ------------------------------------------------------------------------- */
-
-/* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
-   <kmalkki@cc.hut.fi> and Jean Delvare <jdelvare@suse.de> */
+ *
+ * With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
+ * <kmalkki@cc.hut.fi> and Jean Delvare <jdelvare@suse.de>
+ */
 
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index d64cebc6e65a..69045df78e2d 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -1,26 +1,11 @@
-/* ------------------------------------------------------------------------- */
-/* i2c-algo-bit.h i2c driver algorithms for bit-shift adapters               */
-/* ------------------------------------------------------------------------- */
-/*   Copyright (C) 1995-99 Simon G. Vogl
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    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 Street, Fifth Floor, Boston,
-    MA 02110-1301 USA.							     */
-/* ------------------------------------------------------------------------- */
-
-/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
-   Frodo Looijaard <frodol@dds.nl> */
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * i2c-algo-bit.h: i2c driver algorithms for bit-shift adapters
+ *
+ *   Copyright (C) 1995-99 Simon G. Vogl
+ * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
+ * Frodo Looijaard <frodol@dds.nl>
+ */
 
 #ifndef _LINUX_I2C_ALGO_BIT_H
 #define _LINUX_I2C_ALGO_BIT_H
-- 
2.11.0


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

* [PATCH 3/3] i2c: gpio: sort includes
  2019-01-19 12:16 [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
  2019-01-19 12:16 ` [PATCH 1/3] i2c: algo-bit: include main i2c header Wolfram Sang
  2019-01-19 12:16 ` [PATCH 2/3] i2c: algo-bit: convert to SPDX header Wolfram Sang
@ 2019-01-19 12:16 ` Wolfram Sang
  2019-01-23 10:22   ` Simon Horman
  2019-02-05 13:04 ` [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
  3 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2019-01-19 12:16 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

Less risk for duplications when adding new ones.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-gpio.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index b9d43bc2853f..d8205b56f243 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -9,15 +9,15 @@
  */
 #include <linux/debugfs.h>
 #include <linux/delay.h>
-#include <linux/i2c.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c-algo-bit.h>
-#include <linux/platform_data/i2c-gpio.h>
+#include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-#include <linux/gpio/consumer.h>
 #include <linux/of.h>
+#include <linux/platform_data/i2c-gpio.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
 
 struct i2c_gpio_private_data {
 	struct gpio_desc *sda;
-- 
2.11.0


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

* Re: [PATCH 2/3] i2c: algo-bit: convert to SPDX header
  2019-01-19 12:16 ` [PATCH 2/3] i2c: algo-bit: convert to SPDX header Wolfram Sang
@ 2019-01-23 10:20   ` Simon Horman
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2019-01-23 10:20 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

On Sat, Jan 19, 2019 at 01:16:54PM +0100, Wolfram Sang wrote:
> And use kernel style for the remaining comments in the header.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/i2c/algos/i2c-algo-bit.c | 25 ++++++++-----------------
>  include/linux/i2c-algo-bit.h     | 31 ++++++++-----------------------
>  2 files changed, 16 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
> index c33dcfb87993..5e5990a83da5 100644
> --- a/drivers/i2c/algos/i2c-algo-bit.c
> +++ b/drivers/i2c/algos/i2c-algo-bit.c
> @@ -1,21 +1,12 @@
> -/* -------------------------------------------------------------------------
> - * i2c-algo-bit.c i2c driver algorithms for bit-shift adapters
> - * -------------------------------------------------------------------------
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * i2c-algo-bit.c: i2c driver algorithms for bit-shift adapters
> + *
>   *   Copyright (C) 1995-2000 Simon G. Vogl
> -
> -    This program is free software; you can redistribute it and/or modify
> -    it under the terms of the GNU General Public License as published by
> -    the Free Software Foundation; either version 2 of the License, or
> -    (at your option) any later version.
> -
> -    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.
> - * ------------------------------------------------------------------------- */
> -
> -/* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
> -   <kmalkki@cc.hut.fi> and Jean Delvare <jdelvare@suse.de> */
> + *
> + * With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
> + * <kmalkki@cc.hut.fi> and Jean Delvare <jdelvare@suse.de>
> + */
>  
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
> index d64cebc6e65a..69045df78e2d 100644
> --- a/include/linux/i2c-algo-bit.h
> +++ b/include/linux/i2c-algo-bit.h
> @@ -1,26 +1,11 @@
> -/* ------------------------------------------------------------------------- */
> -/* i2c-algo-bit.h i2c driver algorithms for bit-shift adapters               */
> -/* ------------------------------------------------------------------------- */
> -/*   Copyright (C) 1995-99 Simon G. Vogl
> -
> -    This program is free software; you can redistribute it and/or modify
> -    it under the terms of the GNU General Public License as published by
> -    the Free Software Foundation; either version 2 of the License, or
> -    (at your option) any later version.
> -
> -    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 Street, Fifth Floor, Boston,
> -    MA 02110-1301 USA.							     */
> -/* ------------------------------------------------------------------------- */
> -
> -/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
> -   Frodo Looijaard <frodol@dds.nl> */
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * i2c-algo-bit.h: i2c driver algorithms for bit-shift adapters
> + *
> + *   Copyright (C) 1995-99 Simon G. Vogl
> + * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
> + * Frodo Looijaard <frodol@dds.nl>
> + */
>  
>  #ifndef _LINUX_I2C_ALGO_BIT_H
>  #define _LINUX_I2C_ALGO_BIT_H
> -- 
> 2.11.0
> 

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

* Re: [PATCH 3/3] i2c: gpio: sort includes
  2019-01-19 12:16 ` [PATCH 3/3] i2c: gpio: sort includes Wolfram Sang
@ 2019-01-23 10:22   ` Simon Horman
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2019-01-23 10:22 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

On Sat, Jan 19, 2019 at 01:16:55PM +0100, Wolfram Sang wrote:
> Less risk for duplications when adding new ones.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/i2c/busses/i2c-gpio.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> index b9d43bc2853f..d8205b56f243 100644
> --- a/drivers/i2c/busses/i2c-gpio.c
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -9,15 +9,15 @@
>   */
>  #include <linux/debugfs.h>
>  #include <linux/delay.h>
> -#include <linux/i2c.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/i2c-algo-bit.h>
> -#include <linux/platform_data/i2c-gpio.h>
> +#include <linux/i2c.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
> -#include <linux/slab.h>
> -#include <linux/platform_device.h>
> -#include <linux/gpio/consumer.h>
>  #include <linux/of.h>
> +#include <linux/platform_data/i2c-gpio.h>
> +#include <linux/platform_device.h>
> +#include <linux/slab.h>
>  
>  struct i2c_gpio_private_data {
>  	struct gpio_desc *sda;
> -- 
> 2.11.0
> 

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

* Re: [PATCH 1/3] i2c: algo-bit: include main i2c header
  2019-01-19 12:16 ` [PATCH 1/3] i2c: algo-bit: include main i2c header Wolfram Sang
@ 2019-01-23 10:23   ` Simon Horman
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2019-01-23 10:23 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

On Sat, Jan 19, 2019 at 01:16:53PM +0100, Wolfram Sang wrote:
> We are using symbols from it, so we should include it directly. Found
> after sorting includes in a driver.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 0/3] i2c: gpio/algo-bit: clean up headers
  2019-01-19 12:16 [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
                   ` (2 preceding siblings ...)
  2019-01-19 12:16 ` [PATCH 3/3] i2c: gpio: sort includes Wolfram Sang
@ 2019-02-05 13:04 ` Wolfram Sang
  3 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2019-02-05 13:04 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

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

On Sat, Jan 19, 2019 at 01:16:52PM +0100, Wolfram Sang wrote:
> I wanted to sort headers in the i2c-gpio driver which produced a compile error.
> So, I had to fix i2c-algo-bit a little, too. Since there is a dependency
> between these patches, here is a small series.
> 
> Wolfram Sang (3):
>   i2c: algo-bit: include main i2c header
>   i2c: algo-bit: convert to SPDX header
>   i2c: gpio: sort includes

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2019-02-05 13:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-19 12:16 [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang
2019-01-19 12:16 ` [PATCH 1/3] i2c: algo-bit: include main i2c header Wolfram Sang
2019-01-23 10:23   ` Simon Horman
2019-01-19 12:16 ` [PATCH 2/3] i2c: algo-bit: convert to SPDX header Wolfram Sang
2019-01-23 10:20   ` Simon Horman
2019-01-19 12:16 ` [PATCH 3/3] i2c: gpio: sort includes Wolfram Sang
2019-01-23 10:22   ` Simon Horman
2019-02-05 13:04 ` [PATCH 0/3] i2c: gpio/algo-bit: clean up headers Wolfram Sang

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