linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rojhalat Ibrahim <imr@rtschenk.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	Olliver Schinagl <oliver@schinagl.nl>
Subject: Re: [PATCH] gpio: fix constconst in devres
Date: Wed, 11 Mar 2015 13:22:19 +0100	[thread overview]
Message-ID: <5364467.g0vMANFLvB@pcimr> (raw)
In-Reply-To: <1426073078-25029-1-git-send-email-linus.walleij@linaro.org>

On Wednesday 11 March 2015 12:24:38 Linus Walleij wrote:
> Commit 1feb57a245a4910b03202a814ffc51a900bd4aca
> "gpio: add parameter to allow the use named gpios"
> includes a double-conted array. Fix this.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Cc: Olliver Schinagl <oliver@schinagl.nl>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/gpio/devres.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
> index ec24da2418b3..0bd060bf7151 100644
> --- a/drivers/gpio/devres.c
> +++ b/drivers/gpio/devres.c
> @@ -135,7 +135,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
>  					    const char *con_id,
>  					    struct fwnode_handle *child)
>  {
> -	static const char const *suffixes[] = { "gpios", "gpio" };
> +	static const char *suffixes[] = { "gpios", "gpio" };
>  	char prop_name[32]; /* 32 is max size of property name */
>  	struct gpio_desc **dr;
>  	struct gpio_desc *desc;
> 

Shouldn't it be const char * const suffixes[], as in a const pointer to const data?

Wouldn't it be better to add an #include "gpiolib.h" to devres.c and use
the gpio_suffixes array defined in gliolib.h?



  reply	other threads:[~2015-03-11 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 11:24 [PATCH] gpio: fix constconst in devres Linus Walleij
2015-03-11 12:22 ` Rojhalat Ibrahim [this message]
2015-03-11 12:48   ` Olliver Schinagl
2015-03-11 14:23     ` Rojhalat Ibrahim
2015-03-12  9:00       ` Olliver Schinagl

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=5364467.g0vMANFLvB@pcimr \
    --to=imr@rtschenk.de \
    --cc=acourbot@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=oliver@schinagl.nl \
    /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).