ahci: use BUILD_BUG_ON for constants comparison
PATCH 1/1 ahci: use BUILD_BUG_ON for constants comparison
Both are constant enum values, therefore we can check at compile time.
Signed-off-by Heiner Kallweit <[email protected]>
--- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/ahci.c +1 -1
@@ -1673,7 +1673,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)VPRINTK ("ENTER\n" ); -WARN_ON ((int )ATA_MAX_QUEUE >AHCI_MAX_CMDS ); +BUILD_BUG_ON ((int )ATA_MAX_QUEUE >AHCI_MAX_CMDS );ata_print_version_once (&pdev->dev,DRV_VERSION );
Signature · 1 line
2.30.1