misc: sram: remove useless #ifdef
Arnd Bergmann
maintainerPATCH 1/1 misc: sram: remove useless #ifdef
A recent patch added a new function that is now unused whenever CONFIG_OF is disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]
There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without CONFIG_OF, and there is no compile-time dependency.
Removing that #ifdef and the respective of_match_ptr() avoids the warning and simplifies the driver slightly.
--- drivers/misc/sram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/misc/sram.c +1 -3
@@ -353,13 +353,11 @@ static int atmel_securam_wait(void) 10000, 500000); } -#ifdef CONFIG_OF static const struct of_device_id sram_dt_ids[] = { { .compatible ="mmio-sram" }, { .compatible ="atmel,sama5d2-securam" , .data = atmel_securam_wait }, {} }; -#endif static int sram_probe (struct platform_device *pdev) {
@@ -443,7 +441,7 @@ static int sram_remove(struct platform_device *pdev)static struct platform_driver sram_driver = { .driver = { .name ="sram" , - .of_match_table =of_match_ptr (sram_dt_ids), + .of_match_table = sram_dt_ids, }, .probe = sram_probe, .remove = sram_remove,
Signature · 1 line
2.9.0
Hi Arnd,
Quoted 5 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]
Quoted 8 lines
There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")
I can not find the referenced commit on Torvald's branch, won't it be rebased and get a changed commit hash after merge?
Quoted 2 lines
Signed-off-by Arnd Bergmann <[email protected]>---
The change itself is good, thank you for the fix.
--
Best wishes,
Vladimir
Hi,
Quoted 12 lines · Vladimir Zapolskiy
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.
Quoted 8 lines
Quoted 4 lines
Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")I can not find the referenced commit on Torvald's branch, won't it be rebased and get a changed commit hash after merge?
No, it won't be rebased, the merge will keep the commit ID.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Arnd Bergmann
maintainerQuoted 19 lines · CET Vladimir Zapolskiy
Quoted 5 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]Quoted 8 lines
There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")I can not find the referenced commit on Torvald's branch, won't it be rebased and get a changed commit hash after merge?
Quoted 7 lines
Quoted 2 lines
Signed-off-by Arnd Bergmann <[email protected]>---
The change itself is good, thank you for the fix.
Reviewed-by Vladimir Zapolskiy <[email protected]>
Applied on arm-soc/next/drivers now, thanks.
Arnd
Greg Kroah-Hartman
maintainerQuoted 5 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]
Quoted 8 lines
There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")
What tree is this commit in? I can't seem to find it in one of mine, am I just missing it somewhere?
thanks,
greg "I have too many git trees" k-h
Quoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.
Quoted 8 lines
Quoted 4 lines
Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")What tree is this commit in? I can't seem to find it in one of mine, am I just missing it somewhere?
It is in arm-soc (it went through the mach-at91 tree)
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Greg Kroah-Hartman
maintainerQuoted 14 lines · Alexandre Belloni
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")What tree is this commit in? I can't seem to find it in one of mine, am I just missing it somewhere?
It is in arm-soc (it went through the mach-at91 tree)
Ah, ok, nothing I can do about it then, nice!
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Alexandre Belloni
Quoted 15 lines · Greg Kroah-Hartman
Quoted 13 lines · Arnd Bergmann
A recent patch added a new function that is now unused whenever
CONFIG_OFis disabled:
drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function]There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without
CONFIG_OF, and there is no compile-time dependency.Removing that #ifdef and the respective
of_match_ptr()avoids the warning and simplifies the driver slightly.Fixes 2ae2e28852f2 ("misc: sram: add Atmel securam support")
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
What tree is this commit in? I can't seem to find it in one of mine, am I just missing it somewhere?
It is in arm-soc (it went through the mach-at91 tree)
Ah, ok, nothing I can do about it then, nice!
Yeah, I was thinking Arnd would take it directly.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com