Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On 2026/1/30 16:24, Dan Carpenter wrote: On Fri, Jan 30, 2026 at 01:30:35PM +0800, sunliming wrote: On 2026/1/29 15:07, Dan Carpenter wrote: On Thu, Jan 29, 2026 at 10:49:19AM +0800,[email protected] wrote: From: sunliming Fix below smatch warnings: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 dpu_hw_sspp_setup_pe_config_v13() warn: variable dereferenced before check 'ctx' (see line 159) Reported-by: kernel test robot Reported-by: Dan Carpenter Closes:https://lore.kernel.org/r/[email protected]/ Signed-off-by: sunliming --- Previously, a maintainer suggested that the name should match the email address, Yes. But normally people change their email address instead of their name. but community patches have consistently used the name "sunliming" since then. Consistency is less important than being correct... It's just a weird thing to say. Are there other non-community patches with a different name? It's fine if that's your legal name and we have made exceptions for people who aren't able to share their real name because of stalking or whatever... I have no non-community patches using any other name, and the accounts in other systems at my employer also use this name. Thanks. regards, dan carpenter
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On Wed, Jan 28, 2026 at 6:50 PM wrote: > > From: sunliming > > Fix below smatch warnings: > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 > dpu_hw_sspp_setup_pe_config_v13() > warn: variable dereferenced before check 'ctx' (see line 159) > > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/r/[email protected]/ > Signed-off-by: sunliming > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c > b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c > index e65f1fc026fd..312ee6597ab1 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c > @@ -156,11 +156,13 @@ static void dpu_hw_sspp_setup_pe_config_v13(struct > dpu_hw_sspp *ctx, > u8 color; > u32 lr_pe[4], tb_pe[4]; > const u32 bytemask = 0xff; > - u32 offset = ctx->cap->sblk->sspp_rec0_blk.base; > + u32 offset; > > if (!ctx || !pe_ext) > return; > > + offset = ctx->cap->sblk->sspp_rec0_blk.base; > + btw, in this case (and probably most/all such cases in dpu code that I've looked at) we should probably just remove the impossible null checks. (Although the extra indirections in the dpu code make it harder to see that they are impossible..) BR, -R > c = &ctx->hw; > /* program SW pixel extension override for all pipes*/ > for (color = 0; color < DPU_MAX_PLANES; color++) { > -- > 2.25.1 >
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On Thu, Jan 29, 2026 at 10:49:19AM +0800, [email protected] wrote: > From: sunliming > > Fix below smatch warnings: > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 > dpu_hw_sspp_setup_pe_config_v13() > warn: variable dereferenced before check 'ctx' (see line 159) > > Reported-by: kernel test robot Closes? (you can just reply to this email with the Closes: line and the URL for the LKP report). > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/r/[email protected]/ > Signed-off-by: sunliming > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On Fri, Jan 30, 2026 at 01:30:35PM +0800, sunliming wrote: > > On 2026/1/29 15:07, Dan Carpenter wrote: > > On Thu, Jan 29, 2026 at 10:49:19AM +0800,[email protected] wrote: > > > From: sunliming > > > > > > Fix below smatch warnings: > > > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 > > > dpu_hw_sspp_setup_pe_config_v13() > > > warn: variable dereferenced before check 'ctx' (see line 159) > > > > > > Reported-by: kernel test robot > > > Reported-by: Dan Carpenter > > > Closes:https://lore.kernel.org/r/[email protected]/ > > > Signed-off-by: sunliming > > > --- > > Previously, a maintainer suggested that the name should match the email > address, > > but community patches have consistently used the name "sunliming" since > then. There are several possible options here, but I see that this one have been already used to contribute patches, which are accepted. I'm fine with accepting this SoB. > > > > Could you capitalize your name? It's supposed to be a bit formal like > > > signing a legal document. > > > > > > This isn't a RESEND, it's a v2. A RESEND means we accidentally ignored > > > your email so now you have to send the exact same email again. > > > > > > https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/ > Get it. thanks. > > > regards, > > > dan carpenter > > > -- With best wishes Dmitry
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On Fri, Jan 30, 2026 at 01:30:35PM +0800, sunliming wrote: > > On 2026/1/29 15:07, Dan Carpenter wrote: > > On Thu, Jan 29, 2026 at 10:49:19AM +0800,[email protected] wrote: > > > From: sunliming > > > > > > Fix below smatch warnings: > > > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 > > > dpu_hw_sspp_setup_pe_config_v13() > > > warn: variable dereferenced before check 'ctx' (see line 159) > > > > > > Reported-by: kernel test robot > > > Reported-by: Dan Carpenter > > > Closes:https://lore.kernel.org/r/[email protected]/ > > > Signed-off-by: sunliming > > > --- > > Previously, a maintainer suggested that the name should match the email > address, > Yes. But normally people change their email address instead of their name. > but community patches have consistently used the name "sunliming" since > then. > Consistency is less important than being correct... It's just a weird thing to say. Are there other non-community patches with a different name? It's fine if that's your legal name and we have made exceptions for people who aren't able to share their real name because of stalking or whatever... regards, dan carpenter
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On 2026/1/29 15:07, Dan Carpenter wrote: On Thu, Jan 29, 2026 at 10:49:19AM +0800,[email protected] wrote: From: sunliming Fix below smatch warnings: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 dpu_hw_sspp_setup_pe_config_v13() warn: variable dereferenced before check 'ctx' (see line 159) Reported-by: kernel test robot Reported-by: Dan Carpenter Closes:https://lore.kernel.org/r/[email protected]/ Signed-off-by: sunliming --- Previously, a maintainer suggested that the name should match the email address, but community patches have consistently used the name "sunliming" since then. Could you capitalize your name? It's supposed to be a bit formal like signing a legal document. This isn't a RESEND, it's a v2. A RESEND means we accidentally ignored your email so now you have to send the exact same email again. https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/ Get it. thanks. regards, dan carpenter
Re: [PATCH RESEND] drm/msm/dpu: Fix smatch warnings about variable dereferenced before check
On Thu, Jan 29, 2026 at 10:49:19AM +0800, [email protected] wrote: > From: sunliming > > Fix below smatch warnings: > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:161 > dpu_hw_sspp_setup_pe_config_v13() > warn: variable dereferenced before check 'ctx' (see line 159) > > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/r/[email protected]/ > Signed-off-by: sunliming > --- Could you capitalize your name? It's supposed to be a bit formal like signing a legal document. This isn't a RESEND, it's a v2. A RESEND means we accidentally ignored your email so now you have to send the exact same email again. https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/ regards, dan carpenter
