Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-10-26 Thread Lee Jones
On Thu, 15 Sep 2016, Arnd Bergmann wrote:

> On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> > It really is as simple as it sounds!
> > 
> 
> I seem to have one that you didn't find.

Applied, thanks.

> 8<
> From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann 
> Date: Thu, 4 Aug 2016 15:28:51 +0200
> Subject: [PATCH] mfd: tps65912: move regmap config into core driver
> 
> When building with extra warnings enabled, most files including
> linux/mfd/tps65912.h warn about a static variable defined in the
> header:
> 
> include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' 
> defined but not used [-Wunused-const-variable=]
> 
> We also duplicate the data structure between the i2c and spi front-end
> drivers. Moving it into the driver code avoids the warning and
> the duplication.
> 
> Signed-off-by: Arnd Bergmann 
> 
> diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
> index a88cfa80dbc4..f33567bc428d 100644
> --- a/drivers/mfd/tps65912-core.c
> +++ b/drivers/mfd/tps65912-core.c
> @@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
>   .init_ack_masked = true,
>  };
>  
> +static const struct regmap_range tps65912_yes_ranges[] = {
> + regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> +};
> +
> +static const struct regmap_access_table tps65912_volatile_table = {
> + .yes_ranges = tps65912_yes_ranges,
> + .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> +};
> +
> +const struct regmap_config tps65912_regmap_config = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .cache_type = REGCACHE_RBTREE,
> + .volatile_table = _volatile_table,
> +};
> +EXPORT_SYMBOL_GPL(tps65912_regmap_config);
> +
>  int tps65912_device_init(struct tps65912 *tps)
>  {
>   int ret;
> diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
> index 1a603701550e..b25d0297ba88 100644
> --- a/include/linux/mfd/tps65912.h
> +++ b/include/linux/mfd/tps65912.h
> @@ -319,21 +319,7 @@ struct tps65912 {
>   struct regmap_irq_chip_data *irq_data;
>  };
>  
> -static const struct regmap_range tps65912_yes_ranges[] = {
> - regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> -};
> -
> -static const struct regmap_access_table tps65912_volatile_table = {
> - .yes_ranges = tps65912_yes_ranges,
> - .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> -};
> -
> -static const struct regmap_config tps65912_regmap_config = {
> - .reg_bits = 8,
> - .val_bits = 8,
> - .cache_type = REGCACHE_RBTREE,
> - .volatile_table = _volatile_table,
> -};
> +extern const struct regmap_config tps65912_regmap_config;
>  
>  int tps65912_device_init(struct tps65912 *tps);
>  int tps65912_device_exit(struct tps65912 *tps);
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-10-26 Thread Lee Jones
On Thu, 15 Sep 2016, Arnd Bergmann wrote:

> On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> > It really is as simple as it sounds!
> > 
> 
> I seem to have one that you didn't find.

Applied, thanks.

> 8<
> From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann 
> Date: Thu, 4 Aug 2016 15:28:51 +0200
> Subject: [PATCH] mfd: tps65912: move regmap config into core driver
> 
> When building with extra warnings enabled, most files including
> linux/mfd/tps65912.h warn about a static variable defined in the
> header:
> 
> include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' 
> defined but not used [-Wunused-const-variable=]
> 
> We also duplicate the data structure between the i2c and spi front-end
> drivers. Moving it into the driver code avoids the warning and
> the duplication.
> 
> Signed-off-by: Arnd Bergmann 
> 
> diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
> index a88cfa80dbc4..f33567bc428d 100644
> --- a/drivers/mfd/tps65912-core.c
> +++ b/drivers/mfd/tps65912-core.c
> @@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
>   .init_ack_masked = true,
>  };
>  
> +static const struct regmap_range tps65912_yes_ranges[] = {
> + regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> +};
> +
> +static const struct regmap_access_table tps65912_volatile_table = {
> + .yes_ranges = tps65912_yes_ranges,
> + .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> +};
> +
> +const struct regmap_config tps65912_regmap_config = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .cache_type = REGCACHE_RBTREE,
> + .volatile_table = _volatile_table,
> +};
> +EXPORT_SYMBOL_GPL(tps65912_regmap_config);
> +
>  int tps65912_device_init(struct tps65912 *tps)
>  {
>   int ret;
> diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
> index 1a603701550e..b25d0297ba88 100644
> --- a/include/linux/mfd/tps65912.h
> +++ b/include/linux/mfd/tps65912.h
> @@ -319,21 +319,7 @@ struct tps65912 {
>   struct regmap_irq_chip_data *irq_data;
>  };
>  
> -static const struct regmap_range tps65912_yes_ranges[] = {
> - regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> -};
> -
> -static const struct regmap_access_table tps65912_volatile_table = {
> - .yes_ranges = tps65912_yes_ranges,
> - .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> -};
> -
> -static const struct regmap_config tps65912_regmap_config = {
> - .reg_bits = 8,
> - .val_bits = 8,
> - .cache_type = REGCACHE_RBTREE,
> - .volatile_table = _volatile_table,
> -};
> +extern const struct regmap_config tps65912_regmap_config;
>  
>  int tps65912_device_init(struct tps65912 *tps);
>  int tps65912_device_exit(struct tps65912 *tps);
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Linus Walleij
On Thu, Sep 15, 2016 at 12:45 PM, Lee Jones  wrote:

> It really is as simple as it sounds!
>
> Lee Jones (7):
>   mfd: max8997-irq: 'inline' should be at the beginning of the
> declaration
>   mfd: ab8500-debugfs: Prevent initialised field from being over-written
>   mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
>   mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
>   mfd: ab8500-debugfs: Remove 'weak' function
> suspend_test_wake_cause_interrupt_is_mine()
>   mfd: omap-usb-host: Return value is not 'const int'
>   mfd: cros_ec_spi: Remove unused variable 'request'

Acked-by: Linus Walleij 

For all the ab8500 and db8500 stuff.

Yours,
Linus Walleij


Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Linus Walleij
On Thu, Sep 15, 2016 at 12:45 PM, Lee Jones  wrote:

> It really is as simple as it sounds!
>
> Lee Jones (7):
>   mfd: max8997-irq: 'inline' should be at the beginning of the
> declaration
>   mfd: ab8500-debugfs: Prevent initialised field from being over-written
>   mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
>   mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
>   mfd: ab8500-debugfs: Remove 'weak' function
> suspend_test_wake_cause_interrupt_is_mine()
>   mfd: omap-usb-host: Return value is not 'const int'
>   mfd: cros_ec_spi: Remove unused variable 'request'

Acked-by: Linus Walleij 

For all the ab8500 and db8500 stuff.

Yours,
Linus Walleij


Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Arnd Bergmann
On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> It really is as simple as it sounds!
> 

I seem to have one that you didn't find.

Arnd

8<
>From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
From: Arnd Bergmann 
Date: Thu, 4 Aug 2016 15:28:51 +0200
Subject: [PATCH] mfd: tps65912: move regmap config into core driver

When building with extra warnings enabled, most files including
linux/mfd/tps65912.h warn about a static variable defined in the
header:

include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' defined 
but not used [-Wunused-const-variable=]

We also duplicate the data structure between the i2c and spi front-end
drivers. Moving it into the driver code avoids the warning and
the duplication.

Signed-off-by: Arnd Bergmann 

diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
index a88cfa80dbc4..f33567bc428d 100644
--- a/drivers/mfd/tps65912-core.c
+++ b/drivers/mfd/tps65912-core.c
@@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
.init_ack_masked = true,
 };
 
+static const struct regmap_range tps65912_yes_ranges[] = {
+   regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
+};
+
+static const struct regmap_access_table tps65912_volatile_table = {
+   .yes_ranges = tps65912_yes_ranges,
+   .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
+};
+
+const struct regmap_config tps65912_regmap_config = {
+   .reg_bits = 8,
+   .val_bits = 8,
+   .cache_type = REGCACHE_RBTREE,
+   .volatile_table = _volatile_table,
+};
+EXPORT_SYMBOL_GPL(tps65912_regmap_config);
+
 int tps65912_device_init(struct tps65912 *tps)
 {
int ret;
diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
index 1a603701550e..b25d0297ba88 100644
--- a/include/linux/mfd/tps65912.h
+++ b/include/linux/mfd/tps65912.h
@@ -319,21 +319,7 @@ struct tps65912 {
struct regmap_irq_chip_data *irq_data;
 };
 
-static const struct regmap_range tps65912_yes_ranges[] = {
-   regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
-};
-
-static const struct regmap_access_table tps65912_volatile_table = {
-   .yes_ranges = tps65912_yes_ranges,
-   .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
-};
-
-static const struct regmap_config tps65912_regmap_config = {
-   .reg_bits = 8,
-   .val_bits = 8,
-   .cache_type = REGCACHE_RBTREE,
-   .volatile_table = _volatile_table,
-};
+extern const struct regmap_config tps65912_regmap_config;
 
 int tps65912_device_init(struct tps65912 *tps);
 int tps65912_device_exit(struct tps65912 *tps);



Re: [PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Arnd Bergmann
On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> It really is as simple as it sounds!
> 

I seem to have one that you didn't find.

Arnd

8<
>From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
From: Arnd Bergmann 
Date: Thu, 4 Aug 2016 15:28:51 +0200
Subject: [PATCH] mfd: tps65912: move regmap config into core driver

When building with extra warnings enabled, most files including
linux/mfd/tps65912.h warn about a static variable defined in the
header:

include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' defined 
but not used [-Wunused-const-variable=]

We also duplicate the data structure between the i2c and spi front-end
drivers. Moving it into the driver code avoids the warning and
the duplication.

Signed-off-by: Arnd Bergmann 

diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
index a88cfa80dbc4..f33567bc428d 100644
--- a/drivers/mfd/tps65912-core.c
+++ b/drivers/mfd/tps65912-core.c
@@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
.init_ack_masked = true,
 };
 
+static const struct regmap_range tps65912_yes_ranges[] = {
+   regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
+};
+
+static const struct regmap_access_table tps65912_volatile_table = {
+   .yes_ranges = tps65912_yes_ranges,
+   .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
+};
+
+const struct regmap_config tps65912_regmap_config = {
+   .reg_bits = 8,
+   .val_bits = 8,
+   .cache_type = REGCACHE_RBTREE,
+   .volatile_table = _volatile_table,
+};
+EXPORT_SYMBOL_GPL(tps65912_regmap_config);
+
 int tps65912_device_init(struct tps65912 *tps)
 {
int ret;
diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
index 1a603701550e..b25d0297ba88 100644
--- a/include/linux/mfd/tps65912.h
+++ b/include/linux/mfd/tps65912.h
@@ -319,21 +319,7 @@ struct tps65912 {
struct regmap_irq_chip_data *irq_data;
 };
 
-static const struct regmap_range tps65912_yes_ranges[] = {
-   regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
-};
-
-static const struct regmap_access_table tps65912_volatile_table = {
-   .yes_ranges = tps65912_yes_ranges,
-   .n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
-};
-
-static const struct regmap_config tps65912_regmap_config = {
-   .reg_bits = 8,
-   .val_bits = 8,
-   .cache_type = REGCACHE_RBTREE,
-   .volatile_table = _volatile_table,
-};
+extern const struct regmap_config tps65912_regmap_config;
 
 int tps65912_device_init(struct tps65912 *tps);
 int tps65912_device_exit(struct tps65912 *tps);



[PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Lee Jones
It really is as simple as it sounds!

Lee Jones (7):
  mfd: max8997-irq: 'inline' should be at the beginning of the
declaration
  mfd: ab8500-debugfs: Prevent initialised field from being over-written
  mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
  mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
  mfd: ab8500-debugfs: Remove 'weak' function
suspend_test_wake_cause_interrupt_is_mine()
  mfd: omap-usb-host: Return value is not 'const int'
  mfd: cros_ec_spi: Remove unused variable 'request'

 drivers/mfd/ab8500-debugfs.c  | 114 --
 drivers/mfd/cros_ec_spi.c |   2 -
 drivers/mfd/db8500-prcmu.c|  19 ---
 drivers/mfd/max8997-irq.c |   2 +-
 drivers/mfd/omap-usb-host.c   |   2 +-
 include/linux/mfd/abx500/ab8500.h |   2 +
 include/linux/mfd/db8500-prcmu.h  |   6 --
 include/linux/mfd/dbx500-prcmu.h  |   9 ---
 8 files changed, 26 insertions(+), 130 deletions(-)

-- 
2.9.3



[PATCH 0/7] mfd: Fix all W=1 warnings

2016-09-15 Thread Lee Jones
It really is as simple as it sounds!

Lee Jones (7):
  mfd: max8997-irq: 'inline' should be at the beginning of the
declaration
  mfd: ab8500-debugfs: Prevent initialised field from being over-written
  mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls
  mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem()
  mfd: ab8500-debugfs: Remove 'weak' function
suspend_test_wake_cause_interrupt_is_mine()
  mfd: omap-usb-host: Return value is not 'const int'
  mfd: cros_ec_spi: Remove unused variable 'request'

 drivers/mfd/ab8500-debugfs.c  | 114 --
 drivers/mfd/cros_ec_spi.c |   2 -
 drivers/mfd/db8500-prcmu.c|  19 ---
 drivers/mfd/max8997-irq.c |   2 +-
 drivers/mfd/omap-usb-host.c   |   2 +-
 include/linux/mfd/abx500/ab8500.h |   2 +
 include/linux/mfd/db8500-prcmu.h  |   6 --
 include/linux/mfd/dbx500-prcmu.h  |   9 ---
 8 files changed, 26 insertions(+), 130 deletions(-)

-- 
2.9.3