[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_ope
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open() |
Date: |
Wed, 26 Feb 2020 10:54:44 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
Am 26.02.2020 um 09:46 hat address@hidden geschrieben:
> From: Chen Qun <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Chen Qun <address@hidden>
Hmm, I'm not so sure about this one because if we remove the line, flags
will be inconsistent with bs->open_flags. It feels like setting a trap
for anyone who wants to add code using flags in the future.
Kevin
> Cc: Ronnie Sahlberg <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Peter Lieven <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Max Reitz <address@hidden>
> ---
> block/iscsi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 682abd8e09..ed88479ede 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1917,7 +1917,6 @@ static int iscsi_open(BlockDriverState *bs, QDict
> *options, int flags,
> if (ret < 0) {
> goto out;
> }
> - flags &= ~BDRV_O_RDWR;
> }
>
> iscsi_readcapacity_sync(iscsilun, &local_err);
> --
> 2.23.0
>
>
- Re: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run(), (continued)
[PATCH v2 07/13] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update(), kuhn.chenqun, 2020/02/26
[PATCH v2 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock(), kuhn.chenqun, 2020/02/26
[PATCH v2 10/13] migration/vmstate: Remove redundant statement in vmstate_save_state_v(), kuhn.chenqun, 2020/02/26
[PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), kuhn.chenqun, 2020/02/26
- Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(),
Kevin Wolf <=
- RE: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Chenqun (kuhn), 2020/02/26
- Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Kevin Wolf, 2020/02/27
- RE: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Chenqun (kuhn), 2020/02/27
- RE: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Chenqun (kuhn), 2020/02/28
- Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Kevin Wolf, 2020/02/28
- RE: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open(), Chenqun (kuhn), 2020/02/28
[PATCH v2 08/13] display/blizzard: Remove redundant statement in blizzard_draw_line16_32(), kuhn.chenqun, 2020/02/26
[PATCH v2 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst(), kuhn.chenqun, 2020/02/26