Re: [PATCH] ata: ata_generic: use IS_ENABLED() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/10/24 5:51 AM, Sergey Shtylyov wrote:
> Replace now gone out of fashion defined(CONFIG_PATA_TOSHIBA[_MODULE])
> with the new-fangled IS_ENABLED() macro in the ata_generic[] definition.

Please mention that CONFIG_PATA_TOSHIBA_MODULE actually does not exist at all
and so can be removed.

> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
> 
> ---
> This patch is against the for-next branch of the LibATA Group's repo.
> 
>  drivers/ata/ata_generic.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/ata/ata_generic.c
> ===================================================================
> --- linux.orig/drivers/ata/ata_generic.c
> +++ linux/drivers/ata/ata_generic.c
> @@ -220,7 +220,7 @@ static struct pci_device_id ata_generic[
>  	{ PCI_DEVICE(PCI_VENDOR_ID_OPTI,   PCI_DEVICE_ID_OPTI_82C558), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_CENATEK,PCI_DEVICE_ID_CENATEK_IDE),
>  	  .driver_data = ATA_GEN_FORCE_DMA },
> -#if !defined(CONFIG_PATA_TOSHIBA) && !defined(CONFIG_PATA_TOSHIBA_MODULE)
> +#if !IS_ENABLED(CONFIG_PATA_TOSHIBA)

I do not understand the negation here... It seems very wrong. If the driver is
indeed enabled, we need to add its PCI ID, no ? and the reverse when not defined...

>  	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2),  },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_3),  },
> 


-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux