From: Sascha Hauer <s.hauer@pengutronix.de>
To: Lucas Stach <dev@lynxeye.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] mtd: m25p80: explicitly cast name pointer
Date: Mon, 29 Jun 2015 07:17:31 +0200 [thread overview]
Message-ID: <20150629051731.GP18611@pengutronix.de> (raw)
In-Reply-To: <1435345163-16565-1-git-send-email-dev@lynxeye.de>
On Fri, Jun 26, 2015 at 08:59:20PM +0200, Lucas Stach wrote:
> Fixes:
> drivers/mtd/devices/m25p80.c: In function 'm25p_probe':
> drivers/mtd/devices/m25p80.c:271:14: warning:
> assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
> drivers/mtd/devices/m25p80.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index c941767..c2e481e 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -268,7 +268,7 @@ static int m25p_probe(struct device_d *dev)
> else if (data && data->name)
> flash_name = data->name;
> else if (dev->id_entry)
> - flash_name = dev->id_entry->name;
> + flash_name = (char *)dev->id_entry->name;
Rather than patching the warning away we should make the add_mtd_device
devname argument const, see the patch I just sent.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2015-06-29 5:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 18:59 Lucas Stach
2015-06-26 18:59 ` [PATCH 2/4] commands: digest: fix harmless warning Lucas Stach
2015-06-29 5:23 ` Sascha Hauer
2015-06-26 18:59 ` [PATCH 3/4] parameter: always build MAC dev param functions Lucas Stach
2015-06-26 18:59 ` [PATCH 4/4] mtd: spi-nor: depend on SPI Lucas Stach
2015-06-29 5:22 ` Sascha Hauer
2015-06-29 5:17 ` Sascha Hauer [this message]
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=20150629051731.GP18611@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=dev@lynxeye.de \
/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