public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
	cyrille.pitchen@wedev4u.fr, dwmw2@infradead.org,
	computersforpeace@gmail.com, boris.brezillon@free-electrons.com,
	richard@nod.at
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: cqspi: make of_device_ids const
Date: Fri, 16 Jun 2017 12:27:03 +0200	[thread overview]
Message-ID: <4f604ebc-69a7-4e35-d682-cc4fa9e76c82@gmail.com> (raw)
In-Reply-To: <c4663aaa9e5753053f6ac12a3565e0e1995f3b55.1497605323.git.arvind.yadav.cs@gmail.com>

On 06/16/2017 11:35 AM, Arvind Yadav wrote:
> of_device_ids are not supposed to change at runtime. All functions
> working with of_device_ids provided by <linux/of.h> work with const
> of_device_ids. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Works for me
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>

> ---
>  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 9f8102d..1a25637 100644
> --- a/drivers/mtd/spi-nor/cadence-quadspi.c
> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c
> @@ -1277,7 +1277,7 @@ static int cqspi_resume(struct device *dev)
>  #define CQSPI_DEV_PM_OPS	NULL
>  #endif
>  
> -static struct of_device_id const cqspi_dt_ids[] = {
> +static const struct of_device_id const cqspi_dt_ids[] = {
>  	{.compatible = "cdns,qspi-nor",},
>  	{ /* end of table */ }
>  };
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-06-16 10:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  9:35 [PATCH] mtd: spi-nor: cqspi: make of_device_ids const Arvind Yadav
2017-06-16 10:27 ` Marek Vasut [this message]
2017-06-20 21:56   ` 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=4f604ebc-69a7-4e35-d682-cc4fa9e76c82@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=arvind.yadav.cs@gmail.com \
    --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