From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933179AbcIOLf7 (ORCPT ); Thu, 15 Sep 2016 07:35:59 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:59351 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756202AbcIOLf6 (ORCPT ); Thu, 15 Sep 2016 07:35:58 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Lee Jones , linus.walleij@linaro.org, tony@atomide.com, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] mfd: Fix all W=1 warnings Date: Thu, 15 Sep 2016 13:35:30 +0200 Message-ID: <5506538.euWBouSNJd@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160915104521.14286-1-lee.jones@linaro.org> References: <20160915104521.14286-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9XtN/xTDeu7ODq7k6ymi9qTUhZa6Kvi8oUEU4XA8P0aS4rsRtBO 4bbyc3IiuTleg7Fn6KIPjv1OlTjUiIMEV9qMnBOwQ4fwM9BIsuSla3JnGpj4DbiZKVXQcK2 2oeWX/98wa8HzAgOZs2+//f/P8dgNfc8o0cI8HMNMl55TqgOgT1jQ9Xk1X/XLkDHtyg7M/Y M1Ofm0mJ+F0ANx8ugr1QA== X-UI-Out-Filterresults: notjunk:1;V01:K0:/hJuhkWuNz8=:KhGFUz9TP60a0CEqi2TvQ+ ko1ksG5AD47ILP0YxL2mwOTs7ZM7xVcHBtrTK1l4LwwlHytkxbIOb2a6VWb1CfaSnw6aPSEMk CdOFDgDNFeArpXqKugTM89iYbaO+AO0Po0711N/2Jc6WZ81PT3qnyDlDLhGt7UPc6RmOzUkO/ /Pbuv7ZrWJBydnA5FxXJzGLv4VPtTNuAy0d3p6zdq/coW0Dp5up7duAse67ltAgznfRHo+KzU /8UY6mklFvjMr+GNXNVam+PBjoJ+TJuUtJbOVrYs2us8AviTFcw8GjKH6GbccMXOtVJxruDPX TV344G5Emli+TsY4O9DKQJGoOkfJXqyG02pzkxUXcqrjBlZ1EyFIuB/S4GQrXIZnbMnp33EHG CRS81gQ9vEA2XLYLDRQZKrk48/xkjmnjka9Pz8ZZNQHbZdzA8YaesySejkasL//EF7wpBY0VE +acpJr8NZ0bA3lYxofyWjeVzs1Dao1owWoUeoVreL6sjRToyoLzUCtF3sBa/T8t862FvnlYup oG0N7DjtNC1V+565Rjr+OW3FobwgBz1pxNrTDmzVrHcgHq8zV6uLS0undPtBWpxX09EkT4hs+ A7fb2sguKanalA919aNcop2Nk9ZkApWUD/ImfXQeR+VogpFwF+P9TE8MXQdFmaD2sQArqdAeZ BAeiHq9ka6cMd91yb/ocvWT16by9yyDgwVPXA+Rm19RejRD1eh1XWLyIxagIrVth62wqmup7j 4lew+giSXIoLHSeP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = &tps65912_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 = &tps65912_volatile_table, -}; +extern const struct regmap_config tps65912_regmap_config; int tps65912_device_init(struct tps65912 *tps); int tps65912_device_exit(struct tps65912 *tps); From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 15 Sep 2016 13:35:30 +0200 Subject: [PATCH 0/7] mfd: Fix all W=1 warnings In-Reply-To: <20160915104521.14286-1-lee.jones@linaro.org> References: <20160915104521.14286-1-lee.jones@linaro.org> Message-ID: <5506538.euWBouSNJd@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 = &tps65912_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 = &tps65912_volatile_table, -}; +extern const struct regmap_config tps65912_regmap_config; int tps65912_device_init(struct tps65912 *tps); int tps65912_device_exit(struct tps65912 *tps);