From: 种嘉鹏 <jiapeng.chong@linux.alibaba.com>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: a100u2w: remove useless variable
Date: Wed, 21 Apr 2021 10:16:08 +0800 [thread overview]
Message-ID: <aebf4084-9e41-1e8b-35ca-ae57f934fca5@linux.alibaba.com> (raw)
In-Reply-To: <CAGRGNgVucQWcGiUnWtsC=oRDXrWkQ13CFojOcM7xU+4TukUoOA@mail.gmail.com>
On 2021/4/17 14:34, Julian Calaby wrote:
> Hi Jiapeng,
>
> On Mon, Apr 12, 2021 at 1:23 PM Jiapeng Chong
> <jiapeng.chong@linux.alibaba.com> wrote:
>>
>> Fix the following gcc warning:
>>
>> drivers/scsi/a100u2w.c:1092:8: warning: variable ‘bios_phys’ set but not
>> used [-Wunused-but-set-variable].
>>
>> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>> ---
>> drivers/scsi/a100u2w.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
>> index 66c5143..855a3fe 100644
>> --- a/drivers/scsi/a100u2w.c
>> +++ b/drivers/scsi/a100u2w.c
>> @@ -1089,7 +1089,6 @@ static int inia100_probe_one(struct pci_dev *pdev,
>> int error = -ENODEV;
>> u32 sz;
>> unsigned long biosaddr;
>> - char *bios_phys;
>>
>> if (pci_enable_device(pdev))
>> goto out;
>> @@ -1141,7 +1140,7 @@ static int inia100_probe_one(struct pci_dev *pdev,
>>
>> biosaddr = host->BIOScfg;
>> biosaddr = (biosaddr << 4);
>> - bios_phys = phys_to_virt(biosaddr);
>> + phys_to_virt(biosaddr);
>
> Does phys_to_virt() have side effects? If it doesn't, there's a lot
> more stuff that can get deleted here.
>
> Thanks,
>
OK, I'll delete phys_to_virt() and send V2.
prev parent reply other threads:[~2021-04-21 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 3:22 Jiapeng Chong
2021-04-17 6:34 ` Julian Calaby
2021-04-21 2:16 ` 种嘉鹏 [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=aebf4084-9e41-1e8b-35ca-ae57f934fca5@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=julian.calaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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®