Re: [PATCH] gpu: drm/panel: Optimize the workflow of s6d7aa0_lock

From: kernel test robot
Date: Thu Jun 01 2023 - 12:05:15 EST


Hi Lu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on next-20230601]
[cannot apply to linus/master v6.4-rc4]
[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/Lu-Hongfei/gpu-drm-panel-Optimize-the-workflow-of-s6d7aa0_lock/20230531-190848
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20230531110717.36896-1-luhongfei%40vivo.com
patch subject: [PATCH] gpu: drm/panel: Optimize the workflow of s6d7aa0_lock
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230601/202306012354.obLJxas6-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/e1ade7d20fb0efb9aa0b332d5ac5da2863f8e68e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Lu-Hongfei/gpu-drm-panel-Optimize-the-workflow-of-s6d7aa0_lock/20230531-190848
git checkout e1ade7d20fb0efb9aa0b332d5ac5da2863f8e68e
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/panel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306012354.obLJxas6-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:17:
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c: In function 's6d7aa0_lock':
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:72:23: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
72 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
| ^~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:75:23: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
75 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0xa5, 0xa5);
| ^~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:79:31: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
79 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0x5a, 0x5a);
| ^~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:84:23: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
84 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0x5a, 0x5a);
| ^~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:87:23: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
87 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0x5a, 0x5a);
| ^~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_mipi_dsi.h:326:9: error: expected expression before 'do'
326 | do { \
| ^~
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:91:31: note: in expansion of macro 'mipi_dsi_dcs_write_seq'
91 | ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:68:33: warning: unused variable 'dsi' [-Wunused-variable]
68 | struct mipi_dsi_device *dsi = ctx->dsi;
| ^~~


vim +/dsi +68 drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c

6810bb390282bb Artur Weber 2023-05-19 65
6810bb390282bb Artur Weber 2023-05-19 66 static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
6810bb390282bb Artur Weber 2023-05-19 67 {
6810bb390282bb Artur Weber 2023-05-19 @68 struct mipi_dsi_device *dsi = ctx->dsi;
6810bb390282bb Artur Weber 2023-05-19 69 int ret = 0;
6810bb390282bb Artur Weber 2023-05-19 70
6810bb390282bb Artur Weber 2023-05-19 71 if (lock) {
e1ade7d20fb0ef Lu Hongfei 2023-05-31 72 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 73 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 74 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 75 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0xa5, 0xa5);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 76 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 77 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 78 if (ctx->desc->use_passwd3) {
e1ade7d20fb0ef Lu Hongfei 2023-05-31 79 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0x5a, 0x5a);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 80 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 81 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 82 }
6810bb390282bb Artur Weber 2023-05-19 83 } else {
e1ade7d20fb0ef Lu Hongfei 2023-05-31 84 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0x5a, 0x5a);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 85 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 86 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 87 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0x5a, 0x5a);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 88 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 89 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 90 if (ctx->desc->use_passwd3) {
e1ade7d20fb0ef Lu Hongfei 2023-05-31 91 ret = mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
e1ade7d20fb0ef Lu Hongfei 2023-05-31 92 if (ret < 0)
e1ade7d20fb0ef Lu Hongfei 2023-05-31 93 return ret;
e1ade7d20fb0ef Lu Hongfei 2023-05-31 94 }
6810bb390282bb Artur Weber 2023-05-19 95 }
6810bb390282bb Artur Weber 2023-05-19 96
6810bb390282bb Artur Weber 2023-05-19 97 return ret;
6810bb390282bb Artur Weber 2023-05-19 98 }
6810bb390282bb Artur Weber 2023-05-19 99

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