[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] block/iscsi:use the flags in iscsi_open() prevent Clang w
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v3] block/iscsi:use the flags in iscsi_open() prevent Clang warning |
Date: |
Mon, 23 Mar 2020 17:58:34 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
Am 11.03.2020 um 04:29 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;
> ^ ~~~~~~~~~~~~
>
> In iscsi_allocmap_init() only checks BDRV_O_NOCACHE, which
> is the same in both of flags and bs->open_flags.
> We can use the flags instead bs->open_flags to prevent Clang warning.
>
> Reported-by: Euler Robot <address@hidden>
> Signed-off-by: Chen Qun <address@hidden>
> Reviewed-by: Kevin Wolf <address@hidden>
Thanks, applied to the block branch.
Kevin