qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Kevin Wolf <kwolf@redhat.com>, Chen Qun <kuhn.chenqun@huawei.com>
Cc: peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com,
	qemu-trivial@nongnu.org, Peter Lieven <pl@kamp.de>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Euler Robot <euler.robot@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 02/12] block/iscsi:Remove redundant statement in iscsi_open()
Date: Tue, 10 Mar 2020 16:02:02 +0100	[thread overview]
Message-ID: <a1ed92ff-4842-c437-4e22-a94c46760cc0@vivier.eu> (raw)
In-Reply-To: <20200310142614.GF6926@linux.fritz.box>

Le 10/03/2020 à 15:26, Kevin Wolf a écrit :
> Am 02.03.2020 um 14:07 hat Chen Qun geschrieben:
>> Clang static code analyzer show warning:
>>   block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read
>>         flags &= ~BDRV_O_RDWR;
>>         ^        ~~~~~~~~~~~~
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>> ---
>> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Peter Lieven <pl@kamp.de>
>> Cc: Kevin Wolf <kwolf@redhat.com>
>> Cc: Max Reitz <mreitz@redhat.com>
>>
>> v1->v2:
>>  Keep the 'flags' then use it(Base on Kevin's comments).
> 
> I think this patch wants a different subject line now.


It needs also a better explanation in the commit message and should not
go through trivial as the change is not obvious.

Thanks,
Laurent

> 
>> diff --git a/block/iscsi.c b/block/iscsi.c
>> index 682abd8e09..50bae51700 100644
>> --- a/block/iscsi.c
>> +++ b/block/iscsi.c
>> @@ -2002,7 +2002,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
>>          iscsilun->cluster_size = iscsilun->bl.opt_unmap_gran *
>>              iscsilun->block_size;
>>          if (iscsilun->lbprz) {
>> -            ret = iscsi_allocmap_init(iscsilun, bs->open_flags);
>> +            ret = iscsi_allocmap_init(iscsilun, flags);
>>          }
>>      }
> 
> The code looks good.
> 
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> 
> 



  reply	other threads:[~2020-03-10 15:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 13:07 [PATCH v3 00/12] redundant code: Fix warnings reported by Clang static code analyzer Chen Qun
2020-03-02 13:07 ` Chen Qun
2020-03-02 13:07 ` [PATCH v3 01/12] block/stream: Remove redundant statement in stream_run() Chen Qun
2020-03-09 12:13   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 02/12] block/iscsi:Remove redundant statement in iscsi_open() Chen Qun
2020-03-10 14:26   ` Kevin Wolf
2020-03-10 15:02     ` Laurent Vivier [this message]
2020-03-11  2:04       ` Chenqun (kuhn)
2020-03-02 13:07 ` [PATCH v3 03/12] block/file-posix: Remove redundant statement in raw_handle_perm_lock() Chen Qun
2020-03-09 12:18   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 04/12] scsi/esp-pci: Remove redundant statement in esp_pci_io_write() Chen Qun
2020-03-09 12:21   ` Laurent Vivier
2020-03-10 11:52     ` Chenqun (kuhn)
2020-03-10 13:00       ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 05/12] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command() Chen Qun
2020-03-09 12:30   ` Laurent Vivier
2020-03-09 12:52   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 06/12] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse() Chen Qun
2020-03-09 12:32   ` Laurent Vivier
2020-03-09 12:53   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 07/12] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update() Chen Qun
2020-03-09 12:35   ` Laurent Vivier
2020-03-09 12:54   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 08/12] display/blizzard: Remove redundant statement in blizzard_draw_line16_32() Chen Qun
2020-03-02 13:07 ` [PATCH v3 09/12] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst() Chen Qun
2020-03-02 14:19   ` Edgar E. Iglesias
2020-03-09 12:38   ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 10/12] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Chen Qun
2020-03-02 13:07 ` [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements Chen Qun
2020-03-03 10:28   ` Gerd Hoffmann
2020-03-09 12:42   ` Laurent Vivier
2020-03-09 12:52     ` Chenqun (kuhn)
2020-03-09 12:55       ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 12/12] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() Chen Qun
2020-03-09 12:50   ` Laurent Vivier
2020-03-09 12:58   ` Laurent Vivier

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=a1ed92ff-4842-c437-4e22-a94c46760cc0@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=euler.robot@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=zhang.zhanghailiang@huawei.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;
as well as URLs for NNTP newsgroup(s).