* [PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
@ 2012-01-12 3:25 Fabio Estevam
2012-01-14 15:18 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2012-01-12 3:25 UTC (permalink / raw)
To: linux-mtd; +Cc: Fabio Estevam, artem.bityutskiy, dwmw2, Fabio Estevam
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
Fix the following build warning:
drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’
This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mtd/mtdcore.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 6ae9ca0..b265188 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -107,7 +107,7 @@ static LIST_HEAD(mtd_notifiers);
*/
static void mtd_release(struct device *dev)
{
- struct mtd_info *mtd = dev_get_drvdata(dev);
+ struct mtd_info __maybe_unused *mtd = dev_get_drvdata(dev);
dev_t index = MTD_DEVT(mtd->index);
/* remove /dev/mtdXro node if needed */
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
2012-01-12 3:25 [PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined Fabio Estevam
@ 2012-01-14 15:18 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2012-01-14 15:18 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, dwmw2, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
On Thu, 2012-01-12 at 01:25 -0200, Fabio Estevam wrote:
> Fix the following build warning:
>
> drivers/mtd/mtdcore.c: In function ‘mtd_release’:
> drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’
>
> This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-14 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 3:25 [PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined Fabio Estevam
2012-01-14 15:18 ` Artem Bityutskiy
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).