>-----Original Message-----
>From: Laurent Vivier [mailto:[email protected]]
>Sent: Tuesday, March 10, 2020 11:02 PM
>To: Kevin Wolf <[email protected]>; Chenqun (kuhn)
><[email protected]>
>Cc: [email protected]; Zhanghailiang
><[email protected]>; [email protected]; Peter Lieven
><[email protected]>; [email protected]; Max Reitz <[email protected]>;
>Ronnie Sahlberg <[email protected]>; Euler Robot
><[email protected]>; Paolo Bonzini <[email protected]>
>Subject: Re: [PATCH v3 02/12] block/iscsi:Remove redundant statement in
>iscsi_open()
>
>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 <[email protected]>
>>> Signed-off-by: Chen Qun <[email protected]>
>>> ---
>>> Cc: Ronnie Sahlberg <[email protected]>
>>> Cc: Paolo Bonzini <[email protected]>
>>> Cc: Peter Lieven <[email protected]>
>>> Cc: Kevin Wolf <[email protected]>
>>> Cc: Max Reitz <[email protected]>
>>>
>>> v1->v2:
>>> Keep the 'flags' then use it(Base on Kevin's comments).
>>
>> I think this patch wants a different subject line now.
>
Yes, it needs a more appropriate subject.
>It needs also a better explanation in the commit message and should not go
>through trivial as the change is not obvious.
>
OK , I will update the commit message base on existing comments.
Thanks.
>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 <[email protected]>
>>
>>