Re: [PATCH net-next 4/4] ptp: ptp_ines: use enum ptp_msg_type

From: kernel test robot
Date: Tue Nov 17 2020 - 18:18:48 EST


Hi Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url: https://github.com/0day-ci/linux/commits/Christian-Eggers/net-ptp-introduce-enum-ptp_msg_type/20201118-033828
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 72308ecbf33b145641aba61071be31a85ebfd92c
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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/c4e4cfcabe3201e2ece90cc9025894e4ed08f069
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christian-Eggers/net-ptp-introduce-enum-ptp_msg_type/20201118-033828
git checkout c4e4cfcabe3201e2ece90cc9025894e4ed08f069
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh

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

All error/warnings (new ones prefixed by >>):

>> drivers/ptp/ptp_ines.c:690:26: error: conflicting types for 'tag_to_msgtype'
690 | static enum ptp_msg_type tag_to_msgtype(u8 tag)
| ^~~~~~~~~~~~~~
drivers/ptp/ptp_ines.c:178:11: note: previous declaration of 'tag_to_msgtype' was here
178 | static u8 tag_to_msgtype(u8 tag);
| ^~~~~~~~~~~~~~
>> drivers/ptp/ptp_ines.c:178:11: warning: 'tag_to_msgtype' used but never defined
drivers/ptp/ptp_ines.c:690:26: warning: 'tag_to_msgtype' defined but not used [-Wunused-function]
690 | static enum ptp_msg_type tag_to_msgtype(u8 tag)
| ^~~~~~~~~~~~~~

vim +/tag_to_msgtype +690 drivers/ptp/ptp_ines.c

689
> 690 static enum ptp_msg_type tag_to_msgtype(u8 tag)
691 {
692 switch (tag) {
693 case MESSAGE_TYPE_SYNC:
694 return PTP_MSGTYPE_SYNC;
695 case MESSAGE_TYPE_P_DELAY_REQ:
696 return PTP_MSGTYPE_PDELAY_REQ;
697 case MESSAGE_TYPE_P_DELAY_RESP:
698 return PTP_MSGTYPE_PDELAY_RESP;
699 case MESSAGE_TYPE_DELAY_REQ:
700 return PTP_MSGTYPE_DELAY_REQ;
701 }
702 return 0xf;
703 }
704

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

Attachment: .config.gz
Description: application/gzip