[hare-scsi-devel:ata-trace.v3 2/73] drivers/ata/libata-core.c:972:13: warning: no previous prototype for function 'ata_dev_class_string'

From: kernel test robot
Date: Wed Dec 08 2021 - 17:53:04 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git ata-trace.v3
head: d973dee7af0328b9176e4a1710fb73093c334698
commit: 41c489a28ae800ac33f419ad83135261e9eba85c [2/73] libata: Add ata_port_classify() helper
config: i386-randconfig-r021-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090629.8XnsDIKk-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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/hare/scsi-devel.git/commit/?id=41c489a28ae800ac33f419ad83135261e9eba85c
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel ata-trace.v3
git checkout 41c489a28ae800ac33f419ad83135261e9eba85c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kernel/ drivers/ata/

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/ata/libata-core.c:972:13: warning: no previous prototype for function 'ata_dev_class_string' [-Wmissing-prototypes]
const char *ata_dev_class_string(unsigned int class)
^
drivers/ata/libata-core.c:972:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
const char *ata_dev_class_string(unsigned int class)
^
static
1 warning generated.


vim +/ata_dev_class_string +972 drivers/ata/libata-core.c

971
> 972 const char *ata_dev_class_string(unsigned int class)
973 {
974 static const char * const class_str[] = {
975 "unknown",
976 "ATA",
977 "ATA (unsupported)",
978 "ATAPI",
979 "ATAPI (unsupported",
980 "PMP",
981 "PMP (unsupported)",
982 "SEMB",
983 "SEMB (unsupported)",
984 "ZAC",
985 "ZAC (unsupported)",
986 "none",
987 };
988 if (class == 0 || (class - 1) >= ARRAY_SIZE(class_str))
989 return "unknown";
990 return class_str[class - 1];
991 }
992

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