Messages in this thread | | | Date | Wed, 7 Jul 2021 15:16:21 +0800 | From | kernel test robot <> | Subject | drivers/gpu/drm/msm/dp/dp_display.c:1045:21: warning: variable 'drm' set but not used |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 77d34a4683b053108ecd466cc7c4193b45805528 commit: eb9d6c7ebe44df4bf077e71de809bb7b216da38c drm/msm: pass dump state as a function argument date: 2 weeks ago config: arm64-buildonly-randconfig-r005-20210707 (attached as .config) compiler: aarch64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eb9d6c7ebe44df4bf077e71de809bb7b216da38c git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout eb9d6c7ebe44df4bf077e71de809bb7b216da38c # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/msm/dp/dp_display.c: In function 'dp_display_usbpd_attention_cb': drivers/gpu/drm/msm/dp/dp_display.c:506:19: warning: variable 'hpd' set but not used [-Wunused-but-set-variable] 506 | struct dp_usbpd *hpd; | ^~~ drivers/gpu/drm/msm/dp/dp_display.c: In function 'msm_dp_snapshot': >> drivers/gpu/drm/msm/dp/dp_display.c:1045:21: warning: variable 'drm' set but not used [-Wunused-but-set-variable] 1045 | struct drm_device *drm; | ^~~
vim +/drm +1045 drivers/gpu/drm/msm/dp/dp_display.c
c943b4948b5848 Chandan Uddaraju 2020-08-27 1041 eb9d6c7ebe44df Dmitry Baryshkov 2021-04-27 1042 void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp) 0f6090f37f8018 Abhinav Kumar 2021-04-16 1043 { 0f6090f37f8018 Abhinav Kumar 2021-04-16 1044 struct dp_display_private *dp_display; 0f6090f37f8018 Abhinav Kumar 2021-04-16 @1045 struct drm_device *drm; 0f6090f37f8018 Abhinav Kumar 2021-04-16 1046 0f6090f37f8018 Abhinav Kumar 2021-04-16 1047 dp_display = container_of(dp, struct dp_display_private, dp_display); 0f6090f37f8018 Abhinav Kumar 2021-04-16 1048 drm = dp->drm_dev; 0f6090f37f8018 Abhinav Kumar 2021-04-16 1049 0f6090f37f8018 Abhinav Kumar 2021-04-16 1050 /* 0f6090f37f8018 Abhinav Kumar 2021-04-16 1051 * if we are reading registers we need the link clocks to be on 0f6090f37f8018 Abhinav Kumar 2021-04-16 1052 * however till DP cable is connected this will not happen as we 0f6090f37f8018 Abhinav Kumar 2021-04-16 1053 * do not know the resolution to power up with. Hence check the 0f6090f37f8018 Abhinav Kumar 2021-04-16 1054 * power_on status before dumping DP registers to avoid crash due 0f6090f37f8018 Abhinav Kumar 2021-04-16 1055 * to unclocked access 0f6090f37f8018 Abhinav Kumar 2021-04-16 1056 */ 0f6090f37f8018 Abhinav Kumar 2021-04-16 1057 mutex_lock(&dp_display->event_mutex); 0f6090f37f8018 Abhinav Kumar 2021-04-16 1058 0f6090f37f8018 Abhinav Kumar 2021-04-16 1059 if (!dp->power_on) { 0f6090f37f8018 Abhinav Kumar 2021-04-16 1060 mutex_unlock(&dp_display->event_mutex); 0f6090f37f8018 Abhinav Kumar 2021-04-16 1061 return; 0f6090f37f8018 Abhinav Kumar 2021-04-16 1062 } 0f6090f37f8018 Abhinav Kumar 2021-04-16 1063 0f6090f37f8018 Abhinav Kumar 2021-04-16 1064 dp_catalog_snapshot(dp_display->catalog, disp_state); 0f6090f37f8018 Abhinav Kumar 2021-04-16 1065 0f6090f37f8018 Abhinav Kumar 2021-04-16 1066 mutex_unlock(&dp_display->event_mutex); 0f6090f37f8018 Abhinav Kumar 2021-04-16 1067 } 0f6090f37f8018 Abhinav Kumar 2021-04-16 1068
:::::: The code at line 1045 was first introduced by commit :::::: 0f6090f37f801871b292c296ed34eb2b089a0477 drm/msm/dp: add API to take DP register snapshot
:::::: TO: Abhinav Kumar <abhinavk@codeaurora.org> :::::: CC: Rob Clark <robdclark@chromium.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |