Skip to contentSkip to conversation

net: hns3: use PCI_IRQ_MSI_TYPES where appropriate

PATCH Applied Piotr Stankiewicz 2 participants 4 messages Jun 2, 2020 – Jun 3, 2020

Subsystems (4)

v1 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 14/15 net: hns3: use PCI_IRQ_MSI_TYPES where appropriate

Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it.

---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c   | 3 +--
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -2
index a758f9ae32be..c49313e87170 100644
@@ -2334,8 +2334,7 @@ static int hclge_init_msi(struct hclge_dev *hdev)
 	int i;
 
 	vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
-					hdev->num_msi,
-					PCI_IRQ_MSI | PCI_IRQ_MSIX);
+					hdev->num_msi, PCI_IRQ_MSI_TYPES);
 	if (vectors < 0) {
 		dev_err(&pdev->dev,
 			"failed(%d) to allocate MSI/MSI-X vectors\n",
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -1
index e02d427131ee..002a40e65ab7 100644
@@ -2342,7 +2342,7 @@ static int hclgevf_init_msi(struct hclgevf_dev *hdev)
 	else
 		vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,
 						hdev->num_msi,
-						PCI_IRQ_MSI | PCI_IRQ_MSIX);
+						PCI_IRQ_MSI_TYPES);
 
 	if (vectors < 0) {
 		dev_err(&pdev->dev,
Signature · 1 line
2.17.2
#1 lore raw
Quoted 3 lines · Piotr Stankiewicz

Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it.

...

Quoted 4 lines

vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -2
-                                       hdev->num_msi,
-                                       PCI_IRQ_MSI | PCI_IRQ_MSIX);
+                                       hdev->num_msi, PCI_IRQ_MSI_TYPES);

...

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c static int hclgevf_init_msi(struct hclgevf_dev *hdev) · line 2345

Quoted 5 lines

vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,

hdev->num_msi,

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -1
-                                               PCI_IRQ_MSI | PCI_IRQ_MSIX);
+                                               PCI_IRQ_MSI_TYPES);

One line as above?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 19 lines

-----Original Message-----
From: Andy Shevchenko <[email protected]>
Sent: Tuesday, June 2, 2020 5:39 PM

Quoted 3 lines · Piotr Stankiewicz

Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it.

...

Quoted 4 lines

vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -2
-                                       hdev->num_msi,
-                                       PCI_IRQ_MSI | PCI_IRQ_MSIX);
+                                       hdev->num_msi, PCI_IRQ_MSI_TYPES);

...

Quoted 8 lines

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c static int hclgevf_init_msi(struct hclgevf_dev *hdev) · line 2345

Quoted 5 lines

vectors = pci_alloc_irq_vectors(pdev, HNAE3_MIN_VECTOR_NUM,

hdev->num_msi,

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -1
-                                               PCI_IRQ_MSI | PCI_IRQ_MSIX);
+                                               PCI_IRQ_MSI_TYPES);

One line as above?

It would push the line above 80 characters.

Quoted 3 lines

--
With Best Regards,
Andy Shevchenko

BR,
Piotr

#3 lore raw
Quoted 5 lines · Piotr
Quoted 5 lines

-----Original Message-----
From: Andy Shevchenko <[email protected]>
Sent: Tuesday, June 2, 2020 5:39 PM
On Tue, Jun 2, 2020 at 12:26 PM Piotr Stankiewicz
<[email protected]> wrote:

...

Quoted 8 lines
Quoted 6 lines

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c static int hclgevf_init_msi(struct hclgevf_dev *hdev) · line 2345

Quoted 3 lines
                                                hdev->num_msi,
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -1
-                                               PCI_IRQ_MSI | PCI_IRQ_MSIX);
+                                               PCI_IRQ_MSI_TYPES);

One line as above?

It would push the line above 80 characters.

It's now relaxed limit, but if it is only few characters, I wouldn't care.

Signature · 2 lines
With Best Regards,
Andy Shevchenko