]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
paride: make 'verbose' parameter an 'int' again
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Mar 2016 21:53:29 +0000 (14:53 -0700)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:26:45 +0000 (10:26 -0700)
commit986aed37359b5c7dc72e0cc7217cbd48fc8efe7a
treec2f646633b6c0aa6afb346fe486a9af9fb9b428d
parentea9dd33b635fd2e7dd650533eb8d53e0088c7779
paride: make 'verbose' parameter an 'int' again

BugLink: http://bugs.launchpad.net/bugs/1578798
commit dec63a4dec2d6d01346fd5d96062e67c0636852b upstream.

gcc-6.0 found an ancient bug in the paride driver, which had a
"module_param(verbose, bool, 0);" since before 2.6.12, but actually uses
it to accept '0', '1' or '2' as arguments:

  drivers/block/paride/pd.c: In function 'pd_init_dev_parms':
  drivers/block/paride/pd.c:298:29: warning: comparison of constant '1' with boolean expression is always false [-Wbool-compare]
   #define DBMSG(msg) ((verbose>1)?(msg):NULL)

In 2012, Rusty did a cleanup patch that also changed the type of the
variable to 'bool', which introduced what is now a gcc warning.

This changes the type back to 'int' and adapts the module_param() line
instead, so it should work as documented in case anyone ever cares about
running the ancient driver with debugging.

Fixes: 90ab5ee94171 ("module_param: make bool parameters really bool (drivers & misc)")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Rusty Russell <rusty@rustcorp.com.au>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/block/paride/pd.c
drivers/block/paride/pt.c