From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbdF0QLv (ORCPT ); Tue, 27 Jun 2017 12:11:51 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33747 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbdF0QLo (ORCPT ); Tue, 27 Jun 2017 12:11:44 -0400 Subject: Re: [PATCH] mtd: spi-nor: cqspi: remove duplicate const To: Arnd Bergmann , Cyrille Pitchen , David Woodhouse , Brian Norris , Boris Brezillon , Richard Weinberger References: <20170627153508.1329697-1-arnd@arndb.de> Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org From: Marek Vasut Message-ID: <77950900-a78b-b5b7-5baf-1df7075fc6d3@gmail.com> Date: Tue, 27 Jun 2017 18:11:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170627153508.1329697-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/27/2017 05:34 PM, Arnd Bergmann wrote: > The variable was already marked 'const' before the previous > patch, but the qualifier was in an unusual place, and now the > extra 'const' causes a harmless warning: > > drivers/mtd/spi-nor/cadence-quadspi.c:1286:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] > > This removes the other 'const' instead. Isn't that const array const elements , thus two consts ? IMO the original code is correct. > Fixes: f993c123b461 ("mtd: spi-nor: cqspi: make of_device_ids const") > Signed-off-by: Arnd Bergmann > --- > drivers/mtd/spi-nor/cadence-quadspi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c > index d315c326e72f..53c7d8e0327a 100644 > --- a/drivers/mtd/spi-nor/cadence-quadspi.c > +++ b/drivers/mtd/spi-nor/cadence-quadspi.c > @@ -1283,7 +1283,7 @@ static const struct dev_pm_ops cqspi__dev_pm_ops = { > #define CQSPI_DEV_PM_OPS NULL > #endif > > -static const struct of_device_id const cqspi_dt_ids[] = { > +static const struct of_device_id cqspi_dt_ids[] = { > {.compatible = "cdns,qspi-nor",}, > { /* end of table */ } > }; > -- Best regards, Marek Vasut