From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <alex.aring@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mtd-core: fix compiler warning
Date: Thu, 17 Jan 2013 08:14:00 +0100 [thread overview]
Message-ID: <20130117071400.GA1906@pengutronix.de> (raw)
In-Reply-To: <1358370395-9089-1-git-send-email-alex.aring@gmail.com>
On Wed, Jan 16, 2013 at 10:06:35PM +0100, Alexander Aring wrote:
> Got this compile warning if MTD_WRITE support isn't set.
>
> drivers/mtd/core.c: In function 'mtd_ioctl':
> drivers/mtd/core.c:117:26: warning: unused variable 'ei' [-Wunused-variable]
>
> Add a #ifdef to declaration of variable 'ei' to solve it.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Applied, thanks
Sascha
> ---
> drivers/mtd/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
> index af6e195..070fda6 100644
> --- a/drivers/mtd/core.c
> +++ b/drivers/mtd/core.c
> @@ -114,7 +114,9 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
> struct mtd_ecc_stats *ecc = buf;
> #endif
> struct region_info_user *reg = buf;
> +#ifdef CONFIG_MTD_WRITE
> struct erase_info_user *ei = buf;
> +#endif
> loff_t *offset = buf;
>
> switch (request) {
> --
> 1.8.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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:[~2013-01-17 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 21:06 Alexander Aring
2013-01-17 7:14 ` 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=20130117071400.GA1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=alex.aring@gmail.com \
--cc=barebox@lists.infradead.org \
/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