diff mbox

mtd: sm_ftl: Remove unused kthread stuff

Message ID 1352565322-8731-1-git-send-email-elezegarcia@gmail.com
State Superseded
Headers show

Commit Message

Ezequiel Garcia Nov. 10, 2012, 4:35 p.m. UTC
This driver uses workqueues, not kthreads.
Remove kthread header and thread related comment.

Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
The removed comment seems deprecated, but I can't be entirely sure;
so -of course- feel free to keep that.

 drivers/mtd/sm_ftl.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Artem Bityutskiy Nov. 21, 2012, 3:05 p.m. UTC | #1
On Sat, 2012-11-10 at 13:35 -0300, Ezequiel Garcia wrote:
> This driver uses workqueues, not kthreads.
> Remove kthread header and thread related comment.
> 
> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>

Aiaiai [1]! 

Aiaiai found out that this breaks the build!

drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]

Include <linux/err.h> instead, I guess.

[1] git://git.infradead.org/users/dedekind/maintaining.git
    git://git.infradead.org/users/dedekind/aiaiai.git
Ezequiel Garcia Nov. 22, 2012, 11:02 p.m. UTC | #2
On Wed, Nov 21, 2012 at 12:05 PM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Sat, 2012-11-10 at 13:35 -0300, Ezequiel Garcia wrote:
>> This driver uses workqueues, not kthreads.
>> Remove kthread header and thread related comment.
>>
>> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
>> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
>
> Aiaiai [1]!
>
> Aiaiai found out that this breaks the build!
>
> drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
> drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
>
> Include <linux/err.h> instead, I guess.

I can do that. But I can't get that error here :-(

Mind me posting your config?

    Ezequiel
Artem Bityutskiy Nov. 30, 2012, 1:07 p.m. UTC | #3
On Thu, 2012-11-22 at 20:02 -0300, Ezequiel Garcia wrote:
> On Wed, Nov 21, 2012 at 12:05 PM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Sat, 2012-11-10 at 13:35 -0300, Ezequiel Garcia wrote:
> >> This driver uses workqueues, not kthreads.
> >> Remove kthread header and thread related comment.
> >>
> >> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
> >> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> >
> > Aiaiai [1]!
> >
> > Aiaiai found out that this breaks the build!
> >
> > drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
> > drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
> >
> > Include <linux/err.h> instead, I guess.
> 
> I can do that. But I can't get that error here :-(
> 
> Mind me posting your config?

Below is the aiaiai report, and there are many configs - pick the one
you like. You can find all of them in [1].

1. git://git.infradead.org/users/dedekind/maintaining.git


$ ./verify ../l2-mtd/ < ~/tmp/sm_ftl.mbox

Tested the patch(es) on top of the following commits:
9f34d3b Quick fixes - applied by aiaiai
5bc8d0c mtd: remove the "chip" parameter in nand_get_device()
3b6bb0c mtd: remove the de-select chip code in nand_release_device()
0f722de mtd: m25p80: modify info for Micron N25Q128

--------------------------------------------------------------------------------

Successfully built configuration "arm-omap2plus_defconfig,arm,arm-none-linux-gnueabi-", no issues

--------------------------------------------------------------------------------

Successfully built configuration "i386_defconfig,i386,", no issues

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "ia64_defconfig" (architecture ia64)":

85f41e6 mtd: sm_ftl: Remove unused kthread stuff

drivers/mtd/nand/r852.c:964:6: warning: no previous prototype for 'r852_remove' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:995:6: warning: no previous prototype for 'r852_shutdown' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:1006:12: warning: 'r852_suspend' defined but not used [-Wunused-function]
drivers/mtd/nand/r852.c:1027:12: warning: 'r852_resume' defined but not used [-Wunused-function]
drivers/mtd/nand/nandsim.c:1395:5: warning: no previous prototype for 'do_read_error' [-Wmissing-prototypes]
drivers/mtd/nand/nandsim.c:1410:6: warning: no previous prototype for 'do_bit_flips' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]                                                                                                                  
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]                                                                                                                           
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]                                                                                                                                
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':                                                                                                                                                                                    
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]                                                                                                               
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]                                                                                                                          
drivers/mtd/sm_ftl.c: At top level:                                                                                                                                                                                                 
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]                                                                                                                               
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]                                                                                                                                
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]                                                                                                                                
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]                                                                                                                              
drivers/mtd/sm_ftl.c: In function 'sm_read':                                                                                                                                                                                        
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]                                                                                                               
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]                                                                                                              
cc1: some warnings being treated as errors                                                                                                                                                                                          
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1                                                                                                                                                                                         
                                                                                                                                                                                                                                    
--------------------------------------------------------------------------------                                                                                                                                                    
Failed to build the following commit for configuration "m68k-m5208evb_defconfig" (architecture m68k)":                                                                                                                              
                                                                                                                                                                                                                                    
85f41e6 mtd: sm_ftl: Remove unused kthread stuff                                                                                                                                                                                    
                                                                                                                                                                                                                                    
In file included from drivers/mtd/maps/latch-addr-flash.c:17:0:                                                                                                                                                                     
include/linux/mtd/map.h:145:2: warning: #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" [-Wcpp]                                                                                                   
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]                                                                                                                                 
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]                                                                                                                  
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]                                                                                                                  
drivers/mtd/sm_ftl.c: In function 'sm_break_offset':                                                                                                                                                                                
drivers/mtd/sm_ftl.c:214:13: warning: comparison of distinct pointer types lacks a cast [enabled by default]                                                                                                                        
drivers/mtd/sm_ftl.c:215:11: warning: comparison of distinct pointer types lacks a cast [enabled by default]                                                                                                                        
drivers/mtd/sm_ftl.c: At top level:                                                                                                                                                                                                 
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]                                                                                                                           
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]                                                                                                                                
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':                                                                                                                                                                                    
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]                                                                                                               
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_read':
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "mips64_defconfig" (architecture mips)":

85f41e6 mtd: sm_ftl: Remove unused kthread stuff

drivers/mtd/nand/r852.c:964:6: warning: no previous prototype for 'r852_remove' [-Wmissing-prototypes]
drivers/mtd/nand/r852.c:995:6: warning: no previous prototype for 'r852_shutdown' [-Wmissing-prototypes]
drivers/mtd/nand/nandsim.c:1395:5: warning: no previous prototype for 'do_read_error' [-Wmissing-prototypes]
drivers/mtd/nand/nandsim.c:1410:6: warning: no previous prototype for 'do_bit_flips' [-Wmissing-prototypes]
drivers/mtd/nftlmount.c: In function 'NFTL_mount':
drivers/mtd/nftlmount.c:568:62: warning: variable 'nb_erases' set but not used [-Wunused-but-set-variable]
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_read':
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "mips-bcm63xx_defconfig" (architecture mips)":

85f41e6 mtd: sm_ftl: Remove unused kthread stuff

drivers/mtd/bcm63xxpart.c: In function 'bcm63xx_parse_cfe_partitions':
drivers/mtd/bcm63xxpart.c:76:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_break_offset':
drivers/mtd/sm_ftl.c:214:13: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/mtd/sm_ftl.c:215:11: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_read':
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "ppc32_defconfig" (architecture powerpc)":

85f41e6 mtd: sm_ftl: Remove unused kthread stuff

drivers/mtd/nftlmount.c: In function 'NFTL_mount':
drivers/mtd/nftlmount.c:568:62: warning: variable 'nb_erases' set but not used [-Wunused-but-set-variable]
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_break_offset':
drivers/mtd/sm_ftl.c:214:13: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/mtd/sm_ftl.c:215:11: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_read':
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1

--------------------------------------------------------------------------------
Failed to build the following commit for configuration "ppc64_defconfig" (architecture powerpc)":

85f41e6 mtd: sm_ftl: Remove unused kthread stuff

include/linux/mtd/pfow.h:104:6: warning: variable 'chipnum' set but not used [-Wunused-but-set-variable]
drivers/mtd/lpddr/lpddr_cmds.c: At top level:
drivers/mtd/lpddr/lpddr_cmds.c:391:5: warning: no previous prototype for 'do_write_buffer' [-Wmissing-prototypes]
drivers/mtd/lpddr/lpddr_cmds.c:472:5: warning: no previous prototype for 'do_erase_oneblock' [-Wmissing-prototypes]
drivers/mtd/lpddr/lpddr_cmds.c:706:5: warning: no previous prototype for 'do_xxlock' [-Wmissing-prototypes]
drivers/mtd/lpddr/lpddr_cmds.c:751:5: warning: no previous prototype for 'word_program' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:43:9: warning: no previous prototype for 'sm_attr_show' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:56:25: warning: no previous prototype for 'sm_create_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:109:6: warning: no previous prototype for 'sm_delete_sysfs_attributes' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:573:5: warning: no previous prototype for 'sm_get_media_info' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:880:18: warning: no previous prototype for 'sm_get_zone' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_get_zone':
drivers/mtd/sm_ftl.c:892:4: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:892:4: warning: return makes pointer from integer without a cast [enabled by default]
drivers/mtd/sm_ftl.c: At top level:
drivers/mtd/sm_ftl.c:901:6: warning: no previous prototype for 'sm_cache_init' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:911:6: warning: no previous prototype for 'sm_cache_put' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:919:5: warning: no previous prototype for 'sm_cache_get' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c:930:5: warning: no previous prototype for 'sm_cache_flush' [-Wmissing-prototypes]
drivers/mtd/sm_ftl.c: In function 'sm_read':
drivers/mtd/sm_ftl.c:1025:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/mtd/sm_ftl.c:1026:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/sm_ftl.o] Error 1

--------------------------------------------------------------------------------

Successfully built configuration "x86_64_defconfig,x86_64,", no issues

--------------------------------------------------------------------------------
diff mbox

Patch

diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 8dd6ba5..1ce1128 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -11,7 +11,6 @@ 
 #include <linux/module.h>
 #include <linux/random.h>
 #include <linux/hdreg.h>
-#include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/sysfs.h>
 #include <linux/bitops.h>
@@ -1066,7 +1065,6 @@  static int sm_write(struct mtd_blktrans_dev *dev,
 	BUG_ON(ftl->readonly);
 	sm_break_offset(ftl, sec_no << 9, &zone_num, &block, &boffset);
 
-	/* No need in flush thread running now */
 	del_timer(&ftl->timer);
 	mutex_lock(&ftl->mutex);