* [PATCH] mtd: replace VMLINUX_SYMBOL_STR() with string literal
@ 2018-06-23 15:35 Masahiro Yamada
2018-06-28 7:29 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2018-06-23 15:35 UTC (permalink / raw)
To: linux-mtd, Boris Brezillon
Cc: Masahiro Yamada, linux-kernel, Marek Vasut, Brian Norris,
Richard Weinberger, David Woodhouse
With the special case handling for Blackfin and Metag was removed by
commit 94e58e0ac312 ("export.h: remove code for prefixing symbols with
underscore"), VMLINUX_SYMBOL_STR() can be replaced with string literal.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/mtd/chips/gen_probe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index b57ceea..879bebf 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -202,10 +202,10 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
struct cfi_private *cfi = map->fldrv_priv;
__u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID;
#ifdef CONFIG_MODULES
- char probename[sizeof(VMLINUX_SYMBOL_STR(cfi_cmdset_%4.4X))];
+ char probename[sizeof("cfi_cmdset_%4.4X")];
cfi_cmdset_fn_t *probe_function;
- sprintf(probename, VMLINUX_SYMBOL_STR(cfi_cmdset_%4.4X), type);
+ sprintf(probename, "cfi_cmdset_%4.4X", type);
probe_function = __symbol_get(probename);
if (!probe_function) {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: replace VMLINUX_SYMBOL_STR() with string literal
2018-06-23 15:35 [PATCH] mtd: replace VMLINUX_SYMBOL_STR() with string literal Masahiro Yamada
@ 2018-06-28 7:29 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-06-28 7:29 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-mtd, linux-kernel, Marek Vasut, Brian Norris,
Richard Weinberger, David Woodhouse
On Sun, 24 Jun 2018 00:35:42 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> With the special case handling for Blackfin and Metag was removed by
> commit 94e58e0ac312 ("export.h: remove code for prefixing symbols with
> underscore"), VMLINUX_SYMBOL_STR() can be replaced with string literal.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied.
Thanks,
Boris
> ---
>
> drivers/mtd/chips/gen_probe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
> index b57ceea..879bebf 100644
> --- a/drivers/mtd/chips/gen_probe.c
> +++ b/drivers/mtd/chips/gen_probe.c
> @@ -202,10 +202,10 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
> struct cfi_private *cfi = map->fldrv_priv;
> __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID;
> #ifdef CONFIG_MODULES
> - char probename[sizeof(VMLINUX_SYMBOL_STR(cfi_cmdset_%4.4X))];
> + char probename[sizeof("cfi_cmdset_%4.4X")];
> cfi_cmdset_fn_t *probe_function;
>
> - sprintf(probename, VMLINUX_SYMBOL_STR(cfi_cmdset_%4.4X), type);
> + sprintf(probename, "cfi_cmdset_%4.4X", type);
>
> probe_function = __symbol_get(probename);
> if (!probe_function) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-28 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-23 15:35 [PATCH] mtd: replace VMLINUX_SYMBOL_STR() with string literal Masahiro Yamada
2018-06-28 7:29 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox