All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Cc: lkp <lkp@intel.com>
Subject: Re: [PATCH] cxl/pci: Drop shadowed variable
Date: Fri, 8 Apr 2022 13:39:38 -0700	[thread overview]
Message-ID: <a6df2591-c61a-7f01-73b3-9dc5fa592a22@infradead.org> (raw)
In-Reply-To: <bb1fe225cb4885fe84a638ba3b6eae4b0aec30be.camel@intel.com>



On 4/8/22 12:39, Verma, Vishal L wrote:
> On Fri, 2022-04-08 at 12:32 -0700, Dan Williams wrote:
>> 0day notices that wait_for_media_ready() declares an @rc variable twice.
> 
> s/notices/noticed/ ?
> 
> Other than that, looks good.
> 
> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
> 
>>
>>>> drivers/cxl/pci.c:439:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
>>      int rc;
>>          ^
>>    drivers/cxl/pci.c:431:6: note: Shadowed declaration
>>     int rc, i;
>>         ^
>>    drivers/cxl/pci.c:439:7: note: Shadow variable
>>      int rc;
>>          ^
>>
>> Cc: Randy Dunlap <rdunlap@infradead.org>
>> Fixes: 523e594d9cc0 ("cxl/pci: Implement wait for media active")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>


Thanks.

>> ---
>>  drivers/cxl/pci.c |    1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
>> index 077ea064bddd..e7ab9a34d718 100644
>> --- a/drivers/cxl/pci.c
>> +++ b/drivers/cxl/pci.c
>> @@ -437,7 +437,6 @@ static int wait_for_media_ready(struct cxl_dev_state *cxlds)
>>  
>>         for (i = mbox_ready_timeout; i; i--) {
>>                 u32 temp;
>> -               int rc;
>>  
>>                 rc = pci_read_config_dword(
>>                         pdev, d + CXL_DVSEC_RANGE_SIZE_LOW(0), &temp);
>>
> 

-- 
~Randy

      reply	other threads:[~2022-04-08 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 19:32 [PATCH] cxl/pci: Drop shadowed variable Dan Williams
2022-04-08 19:39 ` Verma, Vishal L
2022-04-08 20:39   ` Randy Dunlap [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=a6df2591-c61a-7f01-73b3-9dc5fa592a22@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=vishal.l.verma@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.