linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: cqspi: remove duplicate const
Date: Tue, 27 Jun 2017 18:11:41 +0200	[thread overview]
Message-ID: <77950900-a78b-b5b7-5baf-1df7075fc6d3@gmail.com> (raw)
In-Reply-To: <20170627153508.1329697-1-arnd@arndb.de>

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 <arnd@arndb.de>
> ---
>  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

  reply	other threads:[~2017-06-27 16:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 15:34 [PATCH] mtd: spi-nor: cqspi: remove duplicate const Arnd Bergmann
2017-06-27 16:11 ` Marek Vasut [this message]
2017-06-27 19:48   ` Cyrille Pitchen
2017-06-27 19:51     ` Marek Vasut
2017-06-27 20:21       ` Cyrille Pitchen
2017-06-27 20:53         ` Marek Vasut
2017-06-27 22:08           ` Cyrille Pitchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77950900-a78b-b5b7-5baf-1df7075fc6d3@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).