* drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
@ 2021-03-01 6:58 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-03-01 6:58 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: 4259ff7ae509ed880b3a7bb685972c3a3bf4b74b drm/msm/dpu: add support for pcc color block in dpu driver
config: arm64-randconfig-m031-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
vim +/ctx +31 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
4259ff7ae509ed Kalyan Thota 2020-03-24 28
4259ff7ae509ed Kalyan Thota 2020-03-24 @29 u32 base = ctx->cap->sblk->pcc.base;
^^^^^
Dereference
4259ff7ae509ed Kalyan Thota 2020-03-24 30
4259ff7ae509ed Kalyan Thota 2020-03-24 @31 if (!ctx || !base) {
^^^^
Checked too late
4259ff7ae509ed Kalyan Thota 2020-03-24 32 DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
4259ff7ae509ed Kalyan Thota 2020-03-24 33 return;
4259ff7ae509ed Kalyan Thota 2020-03-24 34 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
@ 2021-03-01 6:58 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-03-01 6:58 UTC (permalink / raw)
To: kbuild, Kalyan Thota; +Cc: lkp, kbuild-all, linux-kernel, Rob Clark
[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: 4259ff7ae509ed880b3a7bb685972c3a3bf4b74b drm/msm/dpu: add support for pcc color block in dpu driver
config: arm64-randconfig-m031-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
vim +/ctx +31 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
4259ff7ae509ed Kalyan Thota 2020-03-24 28
4259ff7ae509ed Kalyan Thota 2020-03-24 @29 u32 base = ctx->cap->sblk->pcc.base;
^^^^^
Dereference
4259ff7ae509ed Kalyan Thota 2020-03-24 30
4259ff7ae509ed Kalyan Thota 2020-03-24 @31 if (!ctx || !base) {
^^^^
Checked too late
4259ff7ae509ed Kalyan Thota 2020-03-24 32 DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
4259ff7ae509ed Kalyan Thota 2020-03-24 33 return;
4259ff7ae509ed Kalyan Thota 2020-03-24 34 }
---
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: 33284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
@ 2021-03-01 6:58 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-03-01 6:58 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: 4259ff7ae509ed880b3a7bb685972c3a3bf4b74b drm/msm/dpu: add support for pcc color block in dpu driver
config: arm64-randconfig-m031-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
vim +/ctx +31 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
4259ff7ae509ed Kalyan Thota 2020-03-24 28
4259ff7ae509ed Kalyan Thota 2020-03-24 @29 u32 base = ctx->cap->sblk->pcc.base;
^^^^^
Dereference
4259ff7ae509ed Kalyan Thota 2020-03-24 30
4259ff7ae509ed Kalyan Thota 2020-03-24 @31 if (!ctx || !base) {
^^^^
Checked too late
4259ff7ae509ed Kalyan Thota 2020-03-24 32 DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
4259ff7ae509ed Kalyan Thota 2020-03-24 33 return;
4259ff7ae509ed Kalyan Thota 2020-03-24 34 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
@ 2021-03-01 3:59 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-03-01 3:59 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3221 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kalyan Thota <kalyan_t@codeaurora.org>
CC: Rob Clark <robdclark@chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
commit: 4259ff7ae509ed880b3a7bb685972c3a3bf4b74b drm/msm/dpu: add support for pcc color block in dpu driver
date: 10 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 10 months ago
config: arm64-randconfig-m031-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29)
vim +/ctx +31 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
4259ff7ae509ed Kalyan Thota 2020-03-24 28
4259ff7ae509ed Kalyan Thota 2020-03-24 @29 u32 base = ctx->cap->sblk->pcc.base;
4259ff7ae509ed Kalyan Thota 2020-03-24 30
4259ff7ae509ed Kalyan Thota 2020-03-24 @31 if (!ctx || !base) {
4259ff7ae509ed Kalyan Thota 2020-03-24 32 DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
4259ff7ae509ed Kalyan Thota 2020-03-24 33 return;
4259ff7ae509ed Kalyan Thota 2020-03-24 34 }
4259ff7ae509ed Kalyan Thota 2020-03-24 35
4259ff7ae509ed Kalyan Thota 2020-03-24 36 if (!cfg) {
4259ff7ae509ed Kalyan Thota 2020-03-24 37 DRM_DEBUG_DRIVER("disable pcc feature\n");
4259ff7ae509ed Kalyan Thota 2020-03-24 38 DPU_REG_WRITE(&ctx->hw, base, PCC_DIS);
4259ff7ae509ed Kalyan Thota 2020-03-24 39 return;
4259ff7ae509ed Kalyan Thota 2020-03-24 40 }
4259ff7ae509ed Kalyan Thota 2020-03-24 41
4259ff7ae509ed Kalyan Thota 2020-03-24 42 DPU_REG_WRITE(&ctx->hw, base + PCC_RED_R_OFF, cfg->r.r);
4259ff7ae509ed Kalyan Thota 2020-03-24 43 DPU_REG_WRITE(&ctx->hw, base + PCC_RED_G_OFF, cfg->r.g);
4259ff7ae509ed Kalyan Thota 2020-03-24 44 DPU_REG_WRITE(&ctx->hw, base + PCC_RED_B_OFF, cfg->r.b);
4259ff7ae509ed Kalyan Thota 2020-03-24 45
4259ff7ae509ed Kalyan Thota 2020-03-24 46 DPU_REG_WRITE(&ctx->hw, base + PCC_GREEN_R_OFF, cfg->g.r);
4259ff7ae509ed Kalyan Thota 2020-03-24 47 DPU_REG_WRITE(&ctx->hw, base + PCC_GREEN_G_OFF, cfg->g.g);
4259ff7ae509ed Kalyan Thota 2020-03-24 48 DPU_REG_WRITE(&ctx->hw, base + PCC_GREEN_B_OFF, cfg->g.b);
4259ff7ae509ed Kalyan Thota 2020-03-24 49
4259ff7ae509ed Kalyan Thota 2020-03-24 50 DPU_REG_WRITE(&ctx->hw, base + PCC_BLUE_R_OFF, cfg->b.r);
4259ff7ae509ed Kalyan Thota 2020-03-24 51 DPU_REG_WRITE(&ctx->hw, base + PCC_BLUE_G_OFF, cfg->b.g);
4259ff7ae509ed Kalyan Thota 2020-03-24 52 DPU_REG_WRITE(&ctx->hw, base + PCC_BLUE_B_OFF, cfg->b.b);
4259ff7ae509ed Kalyan Thota 2020-03-24 53
4259ff7ae509ed Kalyan Thota 2020-03-24 54 DPU_REG_WRITE(&ctx->hw, base, PCC_EN);
4259ff7ae509ed Kalyan Thota 2020-03-24 55 }
4259ff7ae509ed Kalyan Thota 2020-03-24 56
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-01 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01 6:58 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c:31 dpu_setup_dspp_pcc() warn: variable dereferenced before check 'ctx' (see line 29) Dan Carpenter
2021-03-01 6:58 ` Dan Carpenter
2021-03-01 6:58 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-03-01 3:59 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.