[bp:rc0+notifiers 32/32] drivers/macintosh/adbhid.c:1265:9: warning: ignoring return value of 'blocking_notifier_chain_register' declared with attribute 'warn_unused_result'

From: kernel test robot
Date: Sat Nov 06 2021 - 10:45:20 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git rc0+notifiers
head: 29ab05dcfc8e05ffc1cae77249ea956b787939d2
commit: 29ab05dcfc8e05ffc1cae77249ea956b787939d2 [32/32] notifier: Return an error when callback is already registered
config: m68k-defconfig (attached as .config)
compiler: m68k-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://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/commit/?id=29ab05dcfc8e05ffc1cae77249ea956b787939d2
git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
git fetch --no-tags bp rc0+notifiers
git checkout 29ab05dcfc8e05ffc1cae77249ea956b787939d2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/macintosh/adbhid.c: In function 'adbhid_init':
>> drivers/macintosh/adbhid.c:1265:9: warning: ignoring return value of 'blocking_notifier_chain_register' declared with attribute 'warn_unused_result' [-Wunused-result]
1265 | blocking_notifier_chain_register(&adb_client_list,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1266 | &adbhid_adb_notifier);
| ~~~~~~~~~~~~~~~~~~~~~


vim +1265 drivers/macintosh/adbhid.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 1260
^1da177e4c3f41 Linus Torvalds 2005-04-16 1261 led_request.complete = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1262
^1da177e4c3f41 Linus Torvalds 2005-04-16 1263 adbhid_probe();
^1da177e4c3f41 Linus Torvalds 2005-04-16 1264
e041c683412d5b Alan Stern 2006-03-27 @1265 blocking_notifier_chain_register(&adb_client_list,
e041c683412d5b Alan Stern 2006-03-27 1266 &adbhid_adb_notifier);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1267
^1da177e4c3f41 Linus Torvalds 2005-04-16 1268 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1269 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1270

:::::: The code at line 1265 was first introduced by commit
:::::: e041c683412d5bf44dc2b109053e3b837b71742d [PATCH] Notifier chain update: API changes

:::::: TO: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip