mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Vadim Pasternak <vadimp@nvidia.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Yu Sun <u202112062@hust.edu.cn>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Mark Gross" <markgross@kernel.org>,
	"hust-os-kernel-patches@googlegroups.com"
	<hust-os-kernel-patches@googlegroups.com>,
	"Dongliang Mu" <dzm91@hust.edu.cn>,
	"Dan Carpenter" <error27@gmail.com>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/mellanox: mlxreg-lc: Check before variable dereferenced
Date: Sat, 2 Dec 2023 12:39:33 +0100	[thread overview]
Message-ID: <dc7099d8-8b36-4399-9ea0-3d1883ac35e2@redhat.com> (raw)
In-Reply-To: <BN9PR12MB5381385579AF6DC7C9E63640AF82A@BN9PR12MB5381.namprd12.prod.outlook.com>

Hi,

On 11/30/23 17:24, Vadim Pasternak wrote:
> Hi Dan,
> 
>> -----Original Message-----
>> From: Dan Carpenter <dan.carpenter@linaro.org>
>> Sent: Thursday, 30 November 2023 13:47
>> To: Yu Sun <u202112062@hust.edu.cn>
>> Cc: Hans de Goede <hdegoede@redhat.com>; Ilpo Järvinen
>> <ilpo.jarvinen@linux.intel.com>; Mark Gross <markgross@kernel.org>; Vadim
>> Pasternak <vadimp@nvidia.com>; hust-os-kernel-
>> patches@googlegroups.com; Dongliang Mu <dzm91@hust.edu.cn>; Dan
>> Carpenter <error27@gmail.com>; platform-driver-x86@vger.kernel.org; linux-
>> kernel@vger.kernel.org
>> Subject: Re: [PATCH] platform/mellanox: mlxreg-lc: Check before variable
>> dereferenced
>>
>> On Thu, Nov 30, 2023 at 05:44:07PM +0800, Yu Sun wrote:
>>> there is a warning saying variable dereferenced before check
>>> 'data->notifier' in line 828.
>>> add "for(data->notifier)" before variable deferenced.
>>        ^^^
>> Should have been "if (data->notifier)".
>>
>>>
>>> Signed-off-by: Yu Sun <u202112062@hust.edu.cn>
>>> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
>>> Reviewed-by: Dan Carpenter <error27@gmail.com>
>>
>> I didn't really explicitly give a Reviewed-by tag for this patch.
>> https://groups.google.com/g/hust-os-kernel-
>> patches/c/c5hUaYIDcII/m/h4aFS7PkCQAJ
>> I also said that I thought it looked correct but that it needed a Fixes:
>> tag however the Fixes tag I suggested was wrong.
>>
>> Looking at it now, the correct Fixes tag would be:
>> Fixes: 1c8ee06b637f ("platform/mellanox: Remove unnecessary code")
>>
>> That commit says that the NULL check is not required.  So now I'm confused.
>> On the one hand, the impulse is to trust the maintainer, but on the other hand
>> my review suggested that the NULL check might be required.
> 
> Yes, it indeed required.
> My mistake.

Ok, so we are going to need a v2 of this addressing Dan's remarks
about the commit message.

Yu Sun, can you please submit a new version addressing
Dan's comments on the commit message ?

Regards,

Hans



      reply	other threads:[~2023-12-02 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30  9:44 Yu Sun
2023-11-30 11:47 ` Dan Carpenter
2023-11-30 16:24   ` Vadim Pasternak
2023-12-02 11:39     ` Hans de Goede [this message]

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=dc7099d8-8b36-4399-9ea0-3d1883ac35e2@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dzm91@hust.edu.cn \
    --cc=error27@gmail.com \
    --cc=hust-os-kernel-patches@googlegroups.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=u202112062@hust.edu.cn \
    --cc=vadimp@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®