Re: [PATCH 2/2] parport: mfc3: avoid empty-body warning

From: kernel test robot
Date: Wed Jul 26 2023 - 18:33:03 EST


Hi Arnd,

kernel test robot noticed the following build warnings:

[auto build test WARNING on deller-parisc/for-next]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Arnd-Bergmann/parport-mfc3-avoid-empty-body-warning/20230726-231357
base: https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git for-next
patch link: https://lore.kernel.org/r/20230726150944.2265044-2-arnd%40kernel.org
patch subject: [PATCH 2/2] parport: mfc3: avoid empty-body warning
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230727/202307270631.RUr9mtaB-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307270631.RUr9mtaB-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307270631.RUr9mtaB-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/parport/parport_mfc3.c: In function 'control_pc_to_mfc3':
>> drivers/parport/parport_mfc3.c:114:28: warning: "/*" within comment [-Wcomment]
114 | if (control & 128) /* /INITP */
|
drivers/parport/parport_mfc3.c: In function 'mfc3_read_control':
drivers/parport/parport_mfc3.c:132:16: error: implicit declaration of function 'control_mfc3_to_pc'; did you mean 'control_pc_to_mfc3'? [-Werror=implicit-function-declaration]
132 | return control_mfc3_to_pc(pia(p)->ppra & 0xe0);
| ^~~~~~~~~~~~~~~~~~
| control_pc_to_mfc3
cc1: some warnings being treated as errors


vim +114 drivers/parport/parport_mfc3.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 108
^1da177e4c3f41 Linus Torvalds 2005-04-16 109 static unsigned char control_mfc3_to_pc(unsigned char control)
^1da177e4c3f41 Linus Torvalds 2005-04-16 110 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 111 unsigned char ret = PARPORT_CONTROL_STROBE
^1da177e4c3f41 Linus Torvalds 2005-04-16 112 | PARPORT_CONTROL_AUTOFD | PARPORT_CONTROL_SELECT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 113
^1da177e4c3f41 Linus Torvalds 2005-04-16 @114 if (control & 128) /* /INITP */
^1da177e4c3f41 Linus Torvalds 2005-04-16 115 ret |= PARPORT_CONTROL_INIT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 116 if (control & 64) /* /AUTOLF */
^1da177e4c3f41 Linus Torvalds 2005-04-16 117 ret &= ~PARPORT_CONTROL_AUTOFD;
^1da177e4c3f41 Linus Torvalds 2005-04-16 118 if (control & 32) /* /SELECT_IN */
^1da177e4c3f41 Linus Torvalds 2005-04-16 119 ret &= ~PARPORT_CONTROL_SELECT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 120 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 121 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 122

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki