Re: [PATCH 2/4] disp/msm/dpu: add support to dump dpu registers

kernel test robot
2020-10-22T08:30:34Z

[-- Attachment #1: Type: text/plain, Size: 3831 bytes --]

Hi Abhinav,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.9 next-20201022]
[cannot apply to drm/drm-next]
[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]

url: https://github.com/0day-ci/linux/commits/Abhinav-Kumar/Add-devcoredump-support-for-DPU/20201022-130507
base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/a7e6907c303a46ea8422fc3c414c22fdfb45d49f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Abhinav-Kumar/Add-devcoredump-support-for-DPU/20201022-130507
git checkout a7e6907c303a46ea8422fc3c414c22fdfb45d49f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

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/disp/dpu1/dpu_dbg.c: In function 'dpu_dbg_dump':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c:115:6: warning: variable 'i' set but not used [-Wunused-but-set-variable]
115 | int i, index = 0;
| ^

vim +/i +115 drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c

112
113 void dpu_dbg_dump(enum dpu_dbg_dump_context dump_mode, const char *name, ...)
114 {
> 115 int i, index = 0;
116 bool do_panic = false;
117 bool dump_all = false;
118 va_list args;
119 char *blk_name = NULL;
120 struct dpu_dbg_reg_base *blk_base = NULL;
121 struct dpu_dbg_reg_base **blk_arr;
122 u32 blk_len;
123
124 /*
125 * if there is a coredump pending return immediately till dump
126 * if read by userspace or timeout happens
127 */
128 if (((dpu_dbg.enable_reg_dump == DPU_DBG_DUMP_IN_MEM) ||
129 (dpu_dbg.enable_reg_dump == DPU_DBG_DUMP_IN_COREDUMP)) &&
130 dpu_dbg.coredump_pending) {
131 pr_debug("coredump is pending read\n");
132 return;
133 }
134
135 blk_arr = &dpu_dbg.req_dump_blks[0];
136 blk_len = ARRAY_SIZE(dpu_dbg.req_dump_blks);
137
138 memset(dpu_dbg.req_dump_blks, 0,
139 sizeof(dpu_dbg.req_dump_blks));
140 dpu_dbg.dump_all = false;
141 dpu_dbg.dump_mode = dump_mode;
142
143 va_start(args, name);
144 i = 0;
145 while ((blk_name = va_arg(args, char*))) {
146
147 if (IS_ERR_OR_NULL(blk_name))
148 break;
149
150 blk_base = _dpu_dump_get_blk_addr(&dpu_dbg, blk_name);
151 if (blk_base) {
152 if (index < blk_len) {
153 blk_arr[index] = blk_base;
154 index++;
155 } else {
156 pr_err("insufficient space to dump %s\n",
157 blk_name);
158 }
159 }
160
161 if (!strcmp(blk_name, "all"))
162 dump_all = true;
163
164 if (!strcmp(blk_name, "panic"))
165 do_panic = true;
166
167 }
168 va_end(args);
169
170 dpu_dbg.work_panic = do_panic;
171 dpu_dbg.dump_all = dump_all;
172
173 kthread_queue_work(dpu_dbg.dump_worker,
174 &dpu_dbg.dump_work);
175

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53087 bytes --]