drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:713:21: warning: unused function 'mksstat_init_record'

From: kernel test robot
Date: Fri Jan 20 2023 - 05:55:14 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d368967cb1039b5c4cccb62b5a4b9468c50cd143
commit: 7a7a933edd6c3a6d5d64e08093f2d564104cefcd drm/vmwgfx: Introduce VMware mks-guest-stats
date: 1 year, 7 months ago
config: x86_64-randconfig-a001-20230116 (https://download.01.org/0day-ci/archive/20230120/202301201858.yiiu0sKz-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/torvalds/linux.git/commit/?id=7a7a933edd6c3a6d5d64e08093f2d564104cefcd
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7a7a933edd6c3a6d5d64e08093f2d564104cefcd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/gma500/ drivers/gpu/drm/vmwgfx/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:713:21: warning: unused function 'mksstat_init_record' [-Wunused-function]
static inline char *mksstat_init_record(mksstat_kern_stats_t stat_idx,
^
1 warning generated.


vim +/mksstat_init_record +713 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c

701
702 /**
703 * mksstat_init_record: Initializes an MKSGuestStatCounter-based record
704 * for the respective mksGuestStat index.
705 *
706 * @stat_idx: Index of the MKSGuestStatCounter-based mksGuestStat record.
707 * @pstat: Pointer to array of MKSGuestStatCounterTime.
708 * @pinfo: Pointer to array of MKSGuestStatInfoEntry.
709 * @pstrs: Pointer to current end of the name/description sequence.
710 * Return: Pointer to the new end of the names/description sequence.
711 */
712
> 713 static inline char *mksstat_init_record(mksstat_kern_stats_t stat_idx,
714 MKSGuestStatCounterTime *pstat, MKSGuestStatInfoEntry *pinfo, char *pstrs)
715 {
716 char *const pstrd = pstrs + strlen(mksstat_kern_name_desc[stat_idx][0]) + 1;
717 strcpy(pstrs, mksstat_kern_name_desc[stat_idx][0]);
718 strcpy(pstrd, mksstat_kern_name_desc[stat_idx][1]);
719
720 pinfo[stat_idx].name.s = pstrs;
721 pinfo[stat_idx].description.s = pstrd;
722 pinfo[stat_idx].flags = MKS_GUEST_STAT_FLAG_NONE;
723 pinfo[stat_idx].stat.counter = (MKSGuestStatCounter *)&pstat[stat_idx];
724
725 return pstrd + strlen(mksstat_kern_name_desc[stat_idx][1]) + 1;
726 }
727

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