All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Tony Luck <tony.luck@intel.com>,
	James Morse <james.morse@arm.com>,
	Robert Richter <rric@kernel.org>,
	linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: NACK: [PATCH] EDAC/device: Remove redundant initialization of pointer dev_ctl
Date: Tue, 7 Sep 2021 12:17:07 +0100	[thread overview]
Message-ID: <14b02aa7-178b-2a03-afeb-a4c7be56d84f@canonical.com> (raw)
In-Reply-To: <YTdI98H5yF55fYsC@zn.tnic>

On 07/09/2021 12:11, Borislav Petkov wrote:
> On Tue, Sep 07, 2021 at 11:59:13AM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The variable dev_ctl is being initialized with a value that is never
>> read, it is being updated later on. The assignment is redundant and
>> can be removed.
>>
>> Addresses-Coverity: ("Unused value")
> 
> I'll never get a public reference to what those things mean, will I?
> 
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  drivers/edac/edac_device.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
>> index 8c4d947fb848..a337f7afc3b9 100644
>> --- a/drivers/edac/edac_device.c
>> +++ b/drivers/edac/edac_device.c
>> @@ -75,7 +75,6 @@ struct edac_device_ctl_info *edac_device_alloc_ctl_info(
>>  	 * provide if we could simply hardcode everything into a single struct.
>>  	 */
>>  	p = NULL;
>> -	dev_ctl = edac_align_ptr(&p, sizeof(*dev_ctl), 1);
> 
> Are you absolutely sure this function doesn't have any side-effects,
> say, to &p and removing the call would break the pointer offsets for the
> one-shot allocation?

Oops. brown-paper-bag on head. It does alter p. NACK.

> 


  reply	other threads:[~2021-09-07 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 10:59 [PATCH] EDAC/device: Remove redundant initialization of pointer dev_ctl Colin King
2021-09-07 11:11 ` Borislav Petkov
2021-09-07 11:17   ` Colin Ian King [this message]
2021-09-07 12:56 ` Dan Carpenter

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=14b02aa7-178b-2a03-afeb-a4c7be56d84f@canonical.com \
    --to=colin.king@canonical.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.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 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.