diff mbox series

[v2,1/2] PCI: Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX

Message ID 20230802075944.937619-2-dlemoal@kernel.org
State New
Headers show
Series Cleanup IRQ type definitions | expand

Commit Message

Damien Le Moal Aug. 2, 2023, 7:59 a.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more explicit about the type
of IRQ being referenced as well as to match the PCI specifications
terms. Redefine PCI_IRQ_LEGACY as an alias to PCI_IRQ_INTX to avoid the
need for doing the renaming tree-wide. New drivers and new code should
now prefer using PCI_IRQ_INTX instead of PCI_IRQ_LEGACY.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 include/linux/pci.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Serge Semin Aug. 2, 2023, 8:57 a.m. UTC | #1
On Wed, Aug 02, 2023 at 04:59:43PM +0900, Damien Le Moal wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more explicit about the type
> of IRQ being referenced as well as to match the PCI specifications
> terms. Redefine PCI_IRQ_LEGACY as an alias to PCI_IRQ_INTX to avoid the
> need for doing the renaming tree-wide. New drivers and new code should
> now prefer using PCI_IRQ_INTX instead of PCI_IRQ_LEGACY.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  include/linux/pci.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 0ff7500772e6..7692d73719e0 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1048,11 +1048,13 @@ enum {
>  	PCI_SCAN_ALL_PCIE_DEVS	= 0x00000040,	/* Scan all, not just dev 0 */
>  };
>  
> -#define PCI_IRQ_LEGACY		(1 << 0) /* Allow legacy interrupts */
> +#define PCI_IRQ_INTX		(1 << 0) /* Allow INTx interrupts */
>  #define PCI_IRQ_MSI		(1 << 1) /* Allow MSI interrupts */
>  #define PCI_IRQ_MSIX		(1 << 2) /* Allow MSI-X interrupts */
>  #define PCI_IRQ_AFFINITY	(1 << 3) /* Auto-assign affinity */
>  

> +#define PCI_IRQ_LEGACY		PCI_IRQ_INTX	/* prefer PCI_IRQ_INTX */
> +

I would have been more strict about using this macro and explicitly
stated that the macro is deprecated:

+#define PCI_IRQ_LEGACY		PCI_IRQ_INTX /* Deprecated! Use PCI_IRQ_INTX */
+

In anyway:
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>

-Serge(y)

>  /* These external functions are only available when PCI support is enabled */
>  #ifdef CONFIG_PCI
>  
> -- 
> 2.41.0
>
Damien Le Moal Aug. 2, 2023, 8:59 a.m. UTC | #2
On 8/2/23 17:57, Serge Semin wrote:
> On Wed, Aug 02, 2023 at 04:59:43PM +0900, Damien Le Moal wrote:
>> From: Bjorn Helgaas <bhelgaas@google.com>
>>
>> Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more explicit about the type
>> of IRQ being referenced as well as to match the PCI specifications
>> terms. Redefine PCI_IRQ_LEGACY as an alias to PCI_IRQ_INTX to avoid the
>> need for doing the renaming tree-wide. New drivers and new code should
>> now prefer using PCI_IRQ_INTX instead of PCI_IRQ_LEGACY.
>>
>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
>> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>> ---
>>  include/linux/pci.h | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index 0ff7500772e6..7692d73719e0 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -1048,11 +1048,13 @@ enum {
>>  	PCI_SCAN_ALL_PCIE_DEVS	= 0x00000040,	/* Scan all, not just dev 0 */
>>  };
>>  
>> -#define PCI_IRQ_LEGACY		(1 << 0) /* Allow legacy interrupts */
>> +#define PCI_IRQ_INTX		(1 << 0) /* Allow INTx interrupts */
>>  #define PCI_IRQ_MSI		(1 << 1) /* Allow MSI interrupts */
>>  #define PCI_IRQ_MSIX		(1 << 2) /* Allow MSI-X interrupts */
>>  #define PCI_IRQ_AFFINITY	(1 << 3) /* Auto-assign affinity */
>>  
> 
>> +#define PCI_IRQ_LEGACY		PCI_IRQ_INTX	/* prefer PCI_IRQ_INTX */
>> +
> 
> I would have been more strict about using this macro and explicitly
> stated that the macro is deprecated:
> 
> +#define PCI_IRQ_LEGACY		PCI_IRQ_INTX /* Deprecated! Use PCI_IRQ_INTX */
> +

Works for me.

Bjorn, Krzysztof,

Do you want me to resend a v3 or can fix that up when applying ?

> 
> In anyway:
> Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
> 
> -Serge(y)
> 
>>  /* These external functions are only available when PCI support is enabled */
>>  #ifdef CONFIG_PCI
>>  
>> -- 
>> 2.41.0
>>
diff mbox series

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0ff7500772e6..7692d73719e0 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1048,11 +1048,13 @@  enum {
 	PCI_SCAN_ALL_PCIE_DEVS	= 0x00000040,	/* Scan all, not just dev 0 */
 };
 
-#define PCI_IRQ_LEGACY		(1 << 0) /* Allow legacy interrupts */
+#define PCI_IRQ_INTX		(1 << 0) /* Allow INTx interrupts */
 #define PCI_IRQ_MSI		(1 << 1) /* Allow MSI interrupts */
 #define PCI_IRQ_MSIX		(1 << 2) /* Allow MSI-X interrupts */
 #define PCI_IRQ_AFFINITY	(1 << 3) /* Auto-assign affinity */
 
+#define PCI_IRQ_LEGACY		PCI_IRQ_INTX	/* prefer PCI_IRQ_INTX */
+
 /* These external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI