Hi zhaoxiao,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dtor-input/next]
[also build test ERROR on v5.17-rc4 next-20220215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/zhaoxiao/input-da7280-Make-use-o...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: sparc-randconfig-r015-20220216
(
https://download.01.org/0day-ci/archive/20220216/202202161735.VuhKajhC-lk...)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/b2755b400194965e54d346dd316d62002...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
zhaoxiao/input-da7280-Make-use-of-the-helper-function-dev_err_probe/20220216-134841
git checkout b2755b400194965e54d346dd316d62002ce8cde3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=sparc SHELL=/bin/bash drivers/input/misc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/input/misc/da7280.c: In function 'da7280_probe':
drivers/input/misc/da7280.c:1150:27: warning: unused variable 'ff'
[-Wunused-variable]
1150 | struct ff_device *ff;
| ^~
drivers/input/misc/da7280.c:1148:27: warning: unused variable 'input_dev'
[-Wunused-variable]
1148 | struct input_dev *input_dev;
| ^~~~~~~~~
In file included from include/linux/mm_types.h:17,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/i2c.h:13,
from drivers/input/misc/da7280.c:12:
drivers/input/misc/da7280.c: At top level:
include/linux/workqueue.h:225:9: error: expected identifier or '(' before
'do'
225 | do { \
| ^~
include/linux/workqueue.h:245:9: note: in expansion of macro '__INIT_WORK'
245 | __INIT_WORK((_work), (_func), 0)
| ^~~~~~~~~~~
drivers/input/misc/da7280.c:1193:9: note: in expansion of macro 'INIT_WORK'
1193 | INIT_WORK(&haptics->work, da7280_haptic_work);
| ^~~~~~~~~
include/linux/workqueue.h:233:11: error: expected identifier or '(' before
'while'
233 | } while (0)
| ^~~~~
include/linux/workqueue.h:245:9: note: in expansion of macro '__INIT_WORK'
245 | __INIT_WORK((_work), (_func), 0)
| ^~~~~~~~~~~
drivers/input/misc/da7280.c:1193:9: note: in expansion of macro 'INIT_WORK'
1193 | INIT_WORK(&haptics->work, da7280_haptic_work);
| ^~~~~~~~~
drivers/input/misc/da7280.c:1195:16: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1195 | haptics->client = client;
| ^~
drivers/input/misc/da7280.c:1196:9: warning: data definition has no type or storage
class
1196 | i2c_set_clientdata(client, haptics);
| ^~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1196:9: error: type defaults to 'int' in
declaration of 'i2c_set_clientdata' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1196:9: warning: parameter names (without types) in
function declaration
drivers/input/misc/da7280.c:1196:9: error: conflicting types for
'i2c_set_clientdata'; have 'int()'
In file included from drivers/input/misc/da7280.c:12:
include/linux/i2c.h:376:20: note: previous definition of 'i2c_set_clientdata'
with type 'void(struct i2c_client *, void *)'
376 | static inline void i2c_set_clientdata(struct i2c_client *client, void *data)
| ^~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1198:16: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1198 | haptics->regmap = devm_regmap_init_i2c(client,
| ^~
In file included from drivers/input/misc/da7280.c:17:
include/linux/regmap.h:676:10: error: expected identifier or '(' before
')' token
676 | }) \
| ^
include/linux/regmap.h:914:9: note: in expansion of macro
'__regmap_lockdep_wrapper'
914 | __regmap_lockdep_wrapper(__devm_regmap_init_i2c, #config, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1198:27: note: in expansion of macro
'devm_regmap_init_i2c'
1198 | haptics->regmap = devm_regmap_init_i2c(client,
| ^~~~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1200:9: warning: data definition has no type or storage
class
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~
drivers/input/misc/da7280.c:1200:9: error: type defaults to 'int' in
declaration of 'error' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1200:33: error: 'haptics' undeclared here (not in a
function)
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1201:9: note: in expansion of macro 'if'
1201 | if (error) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1201:9: note: in expansion of macro 'if'
1201 | if (error) {
| ^~
drivers/input/misc/da7280.c:1206:9: warning: data definition has no type or storage
class
1206 | error = da7280_init(haptics);
| ^~~~~
drivers/input/misc/da7280.c:1206:9: error: type defaults to 'int' in
declaration of 'error' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1206:9: error: redefinition of 'error'
drivers/input/misc/da7280.c:1200:9: note: previous definition of 'error' with
type 'int'
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1207:9: note: in expansion of macro 'if'
1207 | if (error) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1207:9: note: in expansion of macro 'if'
1207 | if (error) {
| ^~
drivers/input/misc/da7280.c:1213:9: warning: data definition has no type or storage
class
1213 | input_dev = devm_input_allocate_device(dev);
| ^~~~~~~~~
drivers/input/misc/da7280.c:1213:9: error: type defaults to 'int' in
declaration of 'input_dev' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1213:48: error: 'dev' undeclared here (not in a
function); did you mean 'cdev'?
1213 | input_dev = devm_input_allocate_device(dev);
| ^~~
| cdev
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1214:9: note: in expansion of macro 'if'
1214 | if (!input_dev) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1214:9: note: in expansion of macro 'if'
1214 | if (!input_dev) {
| ^~
drivers/input/misc/da7280.c:1219:18: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1219 | input_dev->name = "da7280-haptic";
| ^~
drivers/input/misc/da7280.c:1220:18: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1220 | input_dev->dev.parent = client->dev.parent;
| ^~
drivers/input/misc/da7280.c:1221:18: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1221 | input_dev->open = da7280_haptic_open;
| ^~
drivers/input/misc/da7280.c:1222:18: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1222 | input_dev->close = da7280_haptic_close;
| ^~
drivers/input/misc/da7280.c:1223:9: warning: data definition has no type or storage
class
1223 | input_set_drvdata(input_dev, haptics);
| ^~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1223:9: error: type defaults to 'int' in
declaration of 'input_set_drvdata' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1223:9: warning: parameter names (without types) in
function declaration
drivers/input/misc/da7280.c:1223:9: error: conflicting types for
'input_set_drvdata'; have 'int()'
In file included from drivers/input/misc/da7280.c:13:
include/linux/input.h:379:20: note: previous definition of 'input_set_drvdata'
with type 'void(struct input_dev *, void *)'
379 | static inline void input_set_drvdata(struct input_dev *dev, void *data)
| ^~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1224:16: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1224 | haptics->input_dev = input_dev;
| ^~
drivers/input/misc/da7280.c:1226:37: error: expected ')' before '->'
token
1226 | input_set_capability(haptics->input_dev, EV_FF, FF_PERIODIC);
| ^~
| )
drivers/input/misc/da7280.c:1227:37: error: expected ')' before '->'
token
1227 | input_set_capability(haptics->input_dev, EV_FF, FF_CUSTOM);
| ^~
| )
drivers/input/misc/da7280.c:1228:37: error: expected ')' before '->'
token
1228 | input_set_capability(haptics->input_dev, EV_FF, FF_CONSTANT);
| ^~
| )
drivers/input/misc/da7280.c:1229:37: error: expected ')' before '->'
token
1229 | input_set_capability(haptics->input_dev, EV_FF, FF_GAIN);
| ^~
| )
drivers/input/misc/da7280.c:1231:9: warning: data definition has no type or storage
class
1231 | error = input_ff_create(haptics->input_dev,
| ^~~~~
drivers/input/misc/da7280.c:1231:9: error: type defaults to 'int' in
declaration of 'error' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1231:9: error: redefinition of 'error'
drivers/input/misc/da7280.c:1200:9: note: previous definition of 'error' with
type 'int'
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1233:9: note: in expansion of macro 'if'
1233 | if (error) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1233:9: note: in expansion of macro 'if'
1233 | if (error) {
| ^~
drivers/input/misc/da7280.c:1238:9: warning: data definition has no type or storage
class
1238 | ff = input_dev->ff;
| ^~
drivers/input/misc/da7280.c:1238:9: error: type defaults to 'int' in
declaration of 'ff' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1238:23: error: invalid type argument of '->'
(have 'int')
1238 | ff = input_dev->ff;
| ^~
drivers/input/misc/da7280.c:1239:11: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1239 | ff->upload = da7280_haptics_upload_effect;
| ^~
drivers/input/misc/da7280.c:1240:11: error: expected '=', ',',
';', 'asm' or '__attribute__' before '->' token
1240 | ff->playback = da7280_haptics_playback;
| ^~
drivers/input/misc/da7280.c:1242:9: warning: data definition has no type or storage
class
1242 | error = input_register_device(input_dev);
| ^~~~~
drivers/input/misc/da7280.c:1242:9: error: type defaults to 'int' in
declaration of 'error' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1242:9: error: redefinition of 'error'
drivers/input/misc/da7280.c:1200:9: note: previous definition of 'error' with
type 'int'
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~
drivers/input/misc/da7280.c:1242:39: warning: passing argument 1 of
'input_register_device' makes pointer from integer without a cast
[-Wint-conversion]
1242 | error = input_register_device(input_dev);
| ^~~~~~~~~
| |
| int
In file included from drivers/input/misc/da7280.c:13:
include/linux/input.h:384:40: note: expected 'struct input_dev *' but argument
is of type 'int'
384 | int __must_check input_register_device(struct input_dev *);
| ^~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1242:17: error: initializer element is not constant
1242 | error = input_register_device(input_dev);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1243:9: note: in expansion of macro 'if'
1243 | if (error) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1243:9: note: in expansion of macro 'if'
1243 | if (error) {
| ^~
drivers/input/misc/da7280.c:1248:9: warning: data definition has no type or storage
class
1248 | error = devm_request_threaded_irq(dev, client->irq,
| ^~~~~
drivers/input/misc/da7280.c:1248:9: error: type defaults to 'int' in
declaration of 'error' [-Werror=implicit-int]
drivers/input/misc/da7280.c:1248:9: error: redefinition of 'error'
drivers/input/misc/da7280.c:1200:9: note: previous definition of 'error' with
type 'int'
1200 | error = PTR_ERR_OR_ZERO(haptics->regmap);
| ^~~~~
drivers/input/misc/da7280.c:1248:48: error: 'client' undeclared here (not in a
function)
1248 | error = devm_request_threaded_irq(dev, client->irq,
| ^~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/input/misc/da7280.c:9:
> include/linux/compiler.h:56:23: error: expected identifier or
'(' before 'if'
56 | #define if(cond, ...) if (
__trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/input/misc/da7280.c:1252:9: note: in expansion of macro 'if'
1252 | if (error) {
| ^~
> include/linux/compiler.h:72:2: error: expected identifier or
'(' before ')' token
72 | })
| ^
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
|
^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/input/misc/da7280.c:1252:9: note: in expansion of macro 'if'
1252 | if (error) {
| ^~
drivers/input/misc/da7280.c:1258:9: error: expected identifier or '(' before
'return'
1258 | return 0;
| ^~~~~~
drivers/input/misc/da7280.c:1259:1: error: expected identifier or '(' before
'}' token
1259 | }
| ^
drivers/input/misc/da7280.c: In function 'da7280_probe':
drivers/input/misc/da7280.c:1191:9: error: control reaches end of non-void function
[-Werror=return-type]
1191 | }
| ^
At top level:
drivers/input/misc/da7280.c:715:13: warning: 'da7280_haptic_close' defined but
not used [-Wunused-function]
715 | static void da7280_haptic_close(struct input_dev *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:708:12: warning: 'da7280_haptic_open' defined but
not used [-Wunused-function]
708 | static int da7280_haptic_open(struct input_dev *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:659:12: warning: 'da7280_haptics_playback' defined
but not used [-Wunused-function]
659 | static int da7280_haptics_playback(struct input_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:505:12: warning: 'da7280_haptics_upload_effect'
defined but not used [-Wunused-function]
505 | static int da7280_haptics_upload_effect(struct input_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:493:13: warning: 'da7280_haptic_work' defined but
not used [-Wunused-function]
493 | static void da7280_haptic_work(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~
drivers/input/misc/da7280.c:277:35: warning: 'da7280_haptic_regmap_config'
defined but not used [-Wunused-const-variable=]
277 | static const struct regmap_config da7280_haptic_regmap_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +56 include/linux/compiler.h
2bcd521a684cc9 Steven Rostedt 2008-11-21 50
2bcd521a684cc9 Steven Rostedt 2008-11-21 51 #ifdef CONFIG_PROFILE_ALL_BRANCHES
2bcd521a684cc9 Steven Rostedt 2008-11-21 52 /*
2bcd521a684cc9 Steven Rostedt 2008-11-21 53 * "Define 'is'", Bill
Clinton
2bcd521a684cc9 Steven Rostedt 2008-11-21 54 * "Define 'if'", Steven
Rostedt
2bcd521a684cc9 Steven Rostedt 2008-11-21 55 */
a15fd609ad53a6 Linus Torvalds 2019-03-20 @56 #define if(cond, ...) if ( __trace_if_var(
!!(cond , ## __VA_ARGS__) ) )
a15fd609ad53a6 Linus Torvalds 2019-03-20 57
a15fd609ad53a6 Linus Torvalds 2019-03-20 58 #define __trace_if_var(cond)
(__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
a15fd609ad53a6 Linus Torvalds 2019-03-20 59
a15fd609ad53a6 Linus Torvalds 2019-03-20 60 #define __trace_if_value(cond) ({ \
2bcd521a684cc9 Steven Rostedt 2008-11-21 61 static struct ftrace_branch_data \
e04462fb82f8dd Miguel Ojeda 2018-09-03 62 __aligned(4) \
33def8498fdde1 Joe Perches 2020-10-21 63 __section("_ftrace_branch") \
a15fd609ad53a6 Linus Torvalds 2019-03-20 64 __if_trace = { \
2bcd521a684cc9 Steven Rostedt 2008-11-21 65 .func = __func__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 66 .file = __FILE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 67 .line = __LINE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 68 }; \
a15fd609ad53a6 Linus Torvalds 2019-03-20 69 (cond) ? \
a15fd609ad53a6 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[1]++,1) : \
a15fd609ad53a6 Linus Torvalds 2019-03-20 71 (__if_trace.miss_hit[0]++,0); \
a15fd609ad53a6 Linus Torvalds 2019-03-20 @72 })
a15fd609ad53a6 Linus Torvalds 2019-03-20 73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org