Sparse warning in AHCI
Not sure how you want to fix this:
CHECK drivers/acpi/pci_irq.cdrivers/ata/ahci.c:323:2: warning: Initializer entry defined twicedrivers/ata/ahci.c:324:3: also defined here
This happens because macro ATA_BASE_SHT(drv_name) defines .can_queue then then later in the initializer for ahci_sht, it gets redefined.
Granted it probably works now, but sparse is correct to complain that this is bad usage.
Quoted 6 lines · Stephen Hemminger
Not sure how you want to fix this:
CHECK
drivers/acpi/pci_irq.cdrivers/ata/ahci.c:323:2: warning: Initializer entry defined twicedrivers/ata/ahci.c:324:3: also defined here
Quoted 6 lines
This happens because macro
ATA_BASE_SHT(drv_name)defines .can_queue then then later in the initializer forahci_sht, it gets redefined.Granted it probably works now, but sparse is correct to complain that this is bad usage.
Hmm... That use is pretty much intentional to provide generic default initial value and allow specific drivers to override if necessary and I believe it's a valid C usage, no?
Thanks.
Signature · 1 line
tejun
Quoted 10 lines · On Mon, 08 Sep 2008 21:12:10 +0200 Tejun Heo <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger
Not sure how you want to fix this:
CHECK
drivers/acpi/pci_irq.cdrivers/ata/ahci.c:323:2: warning: Initializer entry defined twicedrivers/ata/ahci.c:324:3: also defined hereThis happens because macro
ATA_BASE_SHT(drv_name)defines .can_queue then then later in the initializer forahci_sht, it gets redefined.
Quoted 7 lines
Quoted 3 lines
Granted it probably works now, but sparse is correct to complain that this is bad usage.
Hmm... That use is pretty much intentional to provide generic default initial value and allow specific drivers to override if necessary and I believe it's a valid C usage, no?
IANAL as Viro