mbox series

[0/3] Fix clang -Wunused-but-set-variable warnings

Message ID 20210714091747.2814370-1-morbo@google.com (mailing list archive)
Headers show
Series Fix clang -Wunused-but-set-variable warnings | expand

Message

Bill Wendling July 14, 2021, 9:17 a.m. UTC
These patches clean up warnings from clang's '-Wunused-but-set-variable' flag.

Bill Wendling (3):
  base: remove unused variable 'no_warn'
  bnx2x: remove unused variable 'cur_data_offset'
  scsi: qla2xxx: remove unused variable 'status'

 drivers/base/module.c                             | 6 ++----
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ------
 drivers/scsi/qla2xxx/qla_nx.c                     | 2 --
 3 files changed, 2 insertions(+), 12 deletions(-)

Comments

Bill Wendling July 26, 2021, 8:19 p.m. UTC | #1
These patches clean up warnings from clang's '-Wunused-but-set-variable' flag.

Changes for v2:
- Mark "no_warn" as "__maybe_unused" to avoid separate warning.

Bill Wendling (3):
  base: mark 'no_warn' as unused
  bnx2x: remove unused variable 'cur_data_offset'
  scsi: qla2xxx: remove unused variable 'status'

 drivers/base/module.c                             | 2 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ------
 drivers/scsi/qla2xxx/qla_nx.c                     | 2 --
 3 files changed, 1 insertion(+), 9 deletions(-)
Martin K. Petersen July 29, 2021, 3:38 a.m. UTC | #2
On Mon, 26 Jul 2021 13:19:21 -0700, Bill Wendling wrote:

> These patches clean up warnings from clang's '-Wunused-but-set-variable' flag.
> 
> Changes for v2:
> - Mark "no_warn" as "__maybe_unused" to avoid separate warning.
> 
> Bill Wendling (3):
>   base: mark 'no_warn' as unused
>   bnx2x: remove unused variable 'cur_data_offset'
>   scsi: qla2xxx: remove unused variable 'status'
> 
> [...]

Applied to 5.15/scsi-queue, thanks!

[3/3] scsi: qla2xxx: remove unused variable 'status'
      https://git.kernel.org/mkp/scsi/c/cb51bcd5c34b