]> git.baikalelectronics.ru Git - kernel.git/commit
ata: pata_cs5535: Fix W=1 warnings
authorJohn Garry <john.garry@huawei.com>
Wed, 29 Jun 2022 09:18:44 +0000 (17:18 +0800)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 29 Jun 2022 23:21:43 +0000 (08:21 +0900)
commit829ee51766035187c00bd3b99c3f3bd22bcb14ab
tree30196eac18391806d818e508ccaf80857de85544
parent05de11c4637ff79e7a585333e6938d5a1a1f3e3c
ata: pata_cs5535: Fix W=1 warnings

x86_64 allmodconfig build with W=1 gives these warnings:

drivers/ata/pata_cs5535.c: In function ‘cs5535_set_piomode’:
drivers/ata/pata_cs5535.c:93:11: error: variable ‘dummy’ set but not
used [-Werror=unused-but-set-variable]
  u32 reg, dummy;
           ^~~~~
drivers/ata/pata_cs5535.c: In function ‘cs5535_set_dmamode’:
drivers/ata/pata_cs5535.c:132:11: error: variable ‘dummy’ set but not
used [-Werror=unused-but-set-variable]
  u32 reg, dummy;
           ^~~~~
cc1: all warnings being treated as errors

Mark variables 'dummy' as "maybe unused" as they are only ever written
in rdmsr() calls.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/pata_cs5535.c