linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mtd@lists.infradead.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Boris Brezillon <bbrezillon@kernel.org>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: rawnand: constify elements of NAND_OP_PARSER(_PATTERN)
Date: Tue, 9 Apr 2019 11:54:12 +0200	[thread overview]
Message-ID: <20190409115412.48c758d3@collabora.com> (raw)
In-Reply-To: <20190409045332.5452-1-yamada.masahiro@socionext.com>

On Tue,  9 Apr 2019 13:53:32 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Currently, drivers are able to constify a nand_op_parser array,
> but not nand_op_parser_pattern and nand_op_parser_pattern_elem
> since they are instantiated by using the NAND_OP_PARSER(_PATTERN).
> 
> Add 'const' to them in order to move more driver data from .data to
> .rodata section.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

> ---
> 
>  include/linux/mtd/rawnand.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
> index b7445a44a814..ebde52088e4d 100644
> --- a/include/linux/mtd/rawnand.h
> +++ b/include/linux/mtd/rawnand.h
> @@ -805,7 +805,7 @@ struct nand_op_parser_pattern {
>  #define NAND_OP_PARSER_PATTERN(_exec, ...)							\
>  	{											\
>  		.exec = _exec,									\
> -		.elems = (struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ },		\
> +		.elems = (const struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ },		\
>  		.nelems = sizeof((struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ }) /	\
>  			  sizeof(struct nand_op_parser_pattern_elem),				\
>  	}
> @@ -831,7 +831,7 @@ struct nand_op_parser {
>  
>  #define NAND_OP_PARSER(...)									\
>  	{											\
> -		.patterns = (struct nand_op_parser_pattern[]) { __VA_ARGS__ },			\
> +		.patterns = (const struct nand_op_parser_pattern[]) { __VA_ARGS__ },		\
>  		.npatterns = sizeof((struct nand_op_parser_pattern[]) { __VA_ARGS__ }) /	\
>  			     sizeof(struct nand_op_parser_pattern),				\
>  	}


  reply	other threads:[~2019-04-09  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  4:53 [PATCH] mtd: rawnand: constify elements of NAND_OP_PARSER(_PATTERN) Masahiro Yamada
2019-04-09  9:54 ` Boris Brezillon [this message]
2019-04-18 16:21 ` Miquel Raynal

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=20190409115412.48c758d3@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.com \
    /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).