* [PATCH] mtd: cfi_cmdset_0002: Fix compilation warnings introduced by PPB patch
@ 2013-02-02 10:26 Stefan Roese
2013-02-04 6:57 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2013-02-02 10:26 UTC (permalink / raw)
To: linux-mtd; +Cc: Artem Bityutskiy, Stephen Rothwell
This patch fixes the compilation warnings introduced with this patch:
"mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking":
In file included from drivers/mtd/chips/cfi_cmdset_0002.c:36:0:
include/linux/of_platform.h:107:13: warning: 'struct of_device_id' declared inside parameter list [enabled by default]
include/linux/of_platform.h:107:13: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/of_platform.h:107:13: warning: 'struct device_node' declared inside parameter list [enabled by default]
drivers/mtd/chips/cfi_cmdset_0002.c: In function 'cfi_cmdset_0002':
drivers/mtd/chips/cfi_cmdset_0002.c:504:22: warning: unused variable 'np' [-Wunused-variable]
drivers/mtd/chips/cfi_cmdset_0002.c: At top level:
drivers/mtd/chips/cfi_cmdset_0002.c:2279:12: warning: 'cfi_ppb_lock' defined but not used [-Wunused-function]
drivers/mtd/chips/cfi_cmdset_0002.c:2285:12: warning: 'cfi_ppb_unlock' defined but not used [-Wunused-function]
drivers/mtd/chips/cfi_cmdset_0002.c:2382:12: warning: 'cfi_ppb_is_locked' defined but not used [-Wunused-function]
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 5d5ed93..fff665d 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -33,6 +33,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
@@ -501,7 +502,7 @@ static void cfi_fixup_m29ew_delay_after_resume(struct cfi_private *cfi)
struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
{
struct cfi_private *cfi = map->fldrv_priv;
- struct device_node *np = map->device_node;
+ struct device_node __maybe_unused *np = map->device_node;
struct mtd_info *mtd;
int i;
@@ -2205,8 +2206,9 @@ struct ppb_lock {
#define DO_XXLOCK_ONEBLOCK_UNLOCK ((void *)2)
#define DO_XXLOCK_ONEBLOCK_GETLOCK ((void *)3)
-static int do_ppb_xxlock(struct map_info *map, struct flchip *chip,
- unsigned long adr, int len, void *thunk)
+static int __maybe_unused do_ppb_xxlock(struct map_info *map,
+ struct flchip *chip,
+ unsigned long adr, int len, void *thunk)
{
struct cfi_private *cfi = map->fldrv_priv;
unsigned long timeo;
@@ -2276,13 +2278,15 @@ static int do_ppb_xxlock(struct map_info *map, struct flchip *chip,
return ret;
}
-static int cfi_ppb_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+static int __maybe_unused cfi_ppb_lock(struct mtd_info *mtd, loff_t ofs,
+ uint64_t len)
{
return cfi_varsize_frob(mtd, do_ppb_xxlock, ofs, len,
DO_XXLOCK_ONEBLOCK_LOCK);
}
-static int cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs,
+ uint64_t len)
{
struct mtd_erase_region_info *regions = mtd->eraseregions;
struct map_info *map = mtd->priv;
@@ -2379,7 +2383,8 @@ static int cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
return ret;
}
-static int cfi_ppb_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+static int __maybe_unused cfi_ppb_is_locked(struct mtd_info *mtd, loff_t ofs,
+ uint64_t len)
{
return cfi_varsize_frob(mtd, do_ppb_xxlock, ofs, len,
DO_XXLOCK_ONEBLOCK_GETLOCK) ? 1 : 0;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: cfi_cmdset_0002: Fix compilation warnings introduced by PPB patch
2013-02-02 10:26 [PATCH] mtd: cfi_cmdset_0002: Fix compilation warnings introduced by PPB patch Stefan Roese
@ 2013-02-04 6:57 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-02-04 6:57 UTC (permalink / raw)
To: Stefan Roese; +Cc: Stephen Rothwell, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Sat, 2013-02-02 at 11:26 +0100, Stefan Roese wrote:
> This patch fixes the compilation warnings introduced with this patch:
>
> "mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB)
> locking":
>
Folded this into the original patch, 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:[~2013-02-04 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02 10:26 [PATCH] mtd: cfi_cmdset_0002: Fix compilation warnings introduced by PPB patch Stefan Roese
2013-02-04 6:57 ` Artem Bityutskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.