Broken usage of kthread_freezable_should_stop() in tuxonice-head

Oleksandr Natalenko <[email protected]> Sun, 23 Jun 2013 20:14:26 +0300
Newsgroups gmane.linux.swsusp.devel
Message-ID <8538252.oj5kVfU8um@spock>
Hello.

While compiling TOI for 3.10 I've found misusage of 
kthread_freezable_should_stop() function.

TOI uses it without arguments but it's declared with one argument, so I get 
the following error:

===
  CC      fs/ext4/super.o
fs/ext4/super.c: In function ‘ext4_lazyinit_thread’:
fs/ext4/super.c:2864:3: error: too few arguments to function 
‘kthread_freezable_should_stop’
   if (kthread_freezable_should_stop()) {
   ^
In file included from fs/ext4/super.c:44:0:
include/linux/kthread.h:44:6: note: declared here
 bool kthread_freezable_should_stop(bool *was_frozen);
      ^
make[2]: *** [fs/ext4/super.o] Error 1
make[1]: *** [fs/ext4] Error 2
make: *** [fs] Error 2
===

Grepping the tree gives me the following result:

===
drivers/w1/w1.c:        while (!kthread_freezable_should_stop()) {
drivers/mfd/ucb1x00-ts.c:       while 
(!kthread_freezable_should_stop(&frozen)) {
drivers/platform/x86/thinkpad_acpi.c:           if 
(unlikely(kthread_freezable_should_stop(&was_frozen)))
drivers/net/irda/stir4200.c:        while (!kthread_freezable_should_stop()) {
drivers/md/md.c:                if (kthread_freezable_should_stop())
drivers/md/md.c:                if (kthread_freezable_should_stop())
drivers/md/md.c:                if (kthread_freezable_should_stop())
fs/ext4/super.c:                if (kthread_freezable_should_stop()) {
fs/btrfs/async-thread.c:                        if 
(!kthread_freezable_should_stop()) {
fs/btrfs/async-thread.c:                                if 
(kthread_freezable_should_stop())
fs/btrfs/async-thread.c:                                if 
(!kthread_freezable_should_stop()) {
fs/btrfs/async-thread.c:        } while (!kthread_freezable_should_stop());
fs/btrfs/disk-io.c:                     if (!kthread_freezable_should_stop())
fs/btrfs/disk-io.c:     } while (!kthread_freezable_should_stop());
fs/btrfs/disk-io.c:                     if (!kthread_freezable_should_stop() 
&&
fs/btrfs/disk-io.c:     } while (!kthread_freezable_should_stop());
fs/xfs/xfs_trans_ail.c: while (!kthread_freezable_should_stop()) {
fs/gfs2/log.c:  while (!kthread_freezable_should_stop()) {
fs/gfs2/log.c:                      !kthread_freezable_should_stop())
fs/gfs2/log.c:                  !kthread_freezable_should_stop());
fs/gfs2/quota.c:        while (!kthread_freezable_should_stop()) {
fs/jfs/jfs_logmgr.c:    } while (!kthread_freezable_should_stop());
fs/jfs/jfs_txnmgr.c:    } while (!kthread_freezable_should_stop());
fs/jfs/jfs_txnmgr.c:    } while (!kthread_freezable_should_stop());
include/linux/kthread.h:bool kthread_freezable_should_stop(bool *was_frozen);
kernel/kthread.c: * kthread_freezable_should_stop - should this freezable 
kthread return now?
kernel/kthread.c:bool kthread_freezable_should_stop(bool *was_frozen)
kernel/kthread.c:EXPORT_SYMBOL_GPL(kthread_freezable_should_stop);
===

As you can see, it's declared in include/linux/kthread.h as

===
bool kthread_freezable_should_stop(bool *was_frozen)
===

but is used without argument.

Could that be fixed please?

_______________________________________________
TuxOnIce-devel mailing list
[email protected]
http://lists.tuxonice.net/listinfo/tuxonice-devel
signature.asc (application/pgp-signature, 230 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iF4EABEIAAYFAlHHLP4ACgkQj0K5Zbh/jjM6eQEAmrBbhhaoG3ZbV1FE1TKmskyu
m323RC33LNjyp0EmRWsA/3uAjPggqQfWfISvFW2+ivw1xv0C4Syill4Wg4WekfUR
=Ujh8
-----END PGP SIGNATURE-----