From patchwork Thu Sep 15 11:35:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9333249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47B1E6077A for ; Thu, 15 Sep 2016 11:36:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31416293F8 for ; Thu, 15 Sep 2016 11:36:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2162C295F0; Thu, 15 Sep 2016 11:36:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB699293F8 for ; Thu, 15 Sep 2016 11:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760356AbcIOLf7 (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 Received: from wuerfel.localnet ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0Mg7O9-1bPxIc2ZSH-00NP3l; Thu, 15 Sep 2016 13:35:31 +0200 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 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);