All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Rob Clark <robdclark@gmail.com>
Cc: freedreno@lists.freedesktop.org, "Su Hui" <suhui@nfschina.com>,
	"Sean Paul" <sean@poorly.run>,
	linux-arm-msm@vger.kernel.org, kernel-janitors@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"David Airlie" <airlied@gmail.com>
Subject: Re: [Freedreno] [PATCH v2] drm/msm: remove unnecessary NULL check
Date: Thu, 16 Nov 2023 13:05:52 -0800	[thread overview]
Message-ID: <62943ca3-26ac-8712-2caa-102dc98f099c@quicinc.com> (raw)
In-Reply-To: <095b7283-3555-cc38-a73e-83efec8a9bf8@quicinc.com>



On 11/1/2023 12:23 PM, Abhinav Kumar wrote:
> 
> 
> On 10/13/2023 1:25 AM, Dan Carpenter wrote:
>> This NULL check was required when it was added, but we shuffled the code
>> around and now it's not.  The inconsistent NULL checking triggers a
>> Smatch warning:
>>
>>      drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp5_init() warn:
>>      variable dereferenced before check 'mdp5_kms' (see line 782)
>>
>> Fixes: 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation to the 
>> _probe function"

A small error here. Its missing the closing brace for the Fixes tag.
Checkpatch cries without it.

I have fixed it while applying.

>> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>> ---
>> v2: Added a Fixes tag.  It's not really a bug fix and so adding the
>> fixes tag is slightly unfair but it should prevent this patch from
>> accidentally getting backported before the refactoring and causing an
>> issue.
>>
>> Btw, fixes tags are often unfair like this.  People look at fixes tags
>> and think, "the fix introduced a bug" but actually it's really common
>> that the fix was just not complete.  But from a backporting perspective
>> it makes sense to tie them together.
>>
>> Plus everyone introduces bugs.  If you're not introducing bugs, then
>> you're probably not writing a lot of code.
>>
>>   drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
> 
> LGTM,
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> 

WARNING: multiple messages have this Message-ID (diff)
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Rob Clark <robdclark@gmail.com>
Cc: "Su Hui" <suhui@nfschina.com>,
	freedreno@lists.freedesktop.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-arm-msm@vger.kernel.org,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Sean Paul" <sean@poorly.run>
Subject: Re: [Freedreno] [PATCH v2] drm/msm: remove unnecessary NULL check
Date: Thu, 16 Nov 2023 13:05:52 -0800	[thread overview]
Message-ID: <62943ca3-26ac-8712-2caa-102dc98f099c@quicinc.com> (raw)
In-Reply-To: <095b7283-3555-cc38-a73e-83efec8a9bf8@quicinc.com>



On 11/1/2023 12:23 PM, Abhinav Kumar wrote:
> 
> 
> On 10/13/2023 1:25 AM, Dan Carpenter wrote:
>> This NULL check was required when it was added, but we shuffled the code
>> around and now it's not.  The inconsistent NULL checking triggers a
>> Smatch warning:
>>
>>      drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp5_init() warn:
>>      variable dereferenced before check 'mdp5_kms' (see line 782)
>>
>> Fixes: 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation to the 
>> _probe function"

A small error here. Its missing the closing brace for the Fixes tag.
Checkpatch cries without it.

I have fixed it while applying.

>> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>> ---
>> v2: Added a Fixes tag.  It's not really a bug fix and so adding the
>> fixes tag is slightly unfair but it should prevent this patch from
>> accidentally getting backported before the refactoring and causing an
>> issue.
>>
>> Btw, fixes tags are often unfair like this.  People look at fixes tags
>> and think, "the fix introduced a bug" but actually it's really common
>> that the fix was just not complete.  But from a backporting perspective
>> it makes sense to tie them together.
>>
>> Plus everyone introduces bugs.  If you're not introducing bugs, then
>> you're probably not writing a lot of code.
>>
>>   drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
> 
> LGTM,
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> 

  reply	other threads:[~2023-11-16 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  8:25 [PATCH v2] drm/msm: remove unnecessary NULL check Dan Carpenter
2023-10-13  8:25 ` Dan Carpenter
2023-10-13  9:54 ` Uwe Kleine-König
2023-10-13  9:54   ` Uwe Kleine-König
2023-10-25  9:47 ` Dmitry Baryshkov
2023-10-25  9:47   ` Dmitry Baryshkov
2023-11-01 19:23 ` Abhinav Kumar
2023-11-01 19:23   ` Abhinav Kumar
2023-11-16 21:05   ` Abhinav Kumar [this message]
2023-11-16 21:05     ` [Freedreno] " Abhinav Kumar
2023-11-20  8:24     ` Dan Carpenter
2023-11-20  8:24       ` Dan Carpenter
2023-11-21 18:49 ` Abhinav Kumar
2023-11-21 18:49   ` Abhinav Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62943ca3-26ac-8712-2caa-102dc98f099c@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=suhui@nfschina.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.