Skip to contentSkip to conversation

usb/xhci: unify parameter of xhci_msi_irq

PATCH In review Alex Shi 2 participants 5 messages May 24, 2013 – Jun 5, 2013

Subsystems (2)
lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 usb/xhci: unify parameter of xhci_msi_irq

Ops, I just find a old patch left on my laptop. and it still works on latest Linus tree. I don't remember there is a reasonable excuse to reject this patch.

So, anyone like to pick it up?

------

Quoted 1 line

From 6ae1b9e71f9b14be5774ae9c1b4cf57cd4e747ac Mon Sep 17 00:00:00 2001

From: Alex Shi <[email protected]>
Date: Mon, 11 Jun 2012 15:10:18 +0800
Subject: [PATCH] usb/xhci: unify parameter of xhci_msi_irq

According to Felipe and Alan's comments the second parameter of irq handler should be 'void *' not a specific structure pointer. So change it.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 drivers/usb/host/xhci.c      |    4 ++--
 drivers/usb/host/xhci.h      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +1 -1
index 23b4aef..cc8a52f 100644
@@ -2479,7 +2479,7 @@ hw_died:
 	return IRQ_HANDLED;
 }
 
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd)
+irqreturn_t xhci_msi_irq(int irq, void *hcd)
 {
 	return xhci_irq(hcd);
 }
drivers/usb/host/xhci.c +2 -2
index afdc73e..f7d40c1 100644
@@ -215,7 +215,7 @@ static int xhci_setup_msi(struct xhci_hcd *xhci)
 		return ret;
 	}
 
-	ret = request_irq(pdev->irq, (irq_handler_t)xhci_msi_irq,
+	ret = request_irq(pdev->irq, xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 	if (ret) {
 		xhci_dbg(xhci, "disable MSI interrupt\n");
@@ -287,7 +287,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
 
 	for (i = 0; i < xhci->msix_count; i++) {
 		ret = request_irq(xhci->msix_entries[i].vector,
-				(irq_handler_t)xhci_msi_irq,
+				xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 		if (ret)
 			goto disable_msix;
drivers/usb/host/xhci.h +1 -1
index de3d6e3..737ef54 100644
@@ -1710,7 +1710,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 
 int xhci_get_frame(struct usb_hcd *hcd);
 irqreturn_t xhci_irq(struct usb_hcd *hcd);
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
+irqreturn_t xhci_msi_irq(int irq, void *hcd);
 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev);
 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
Signature · 5 lines
1.7.5.4

-- 
Thanks
    Alex
author
#1 lore raw
Quoted 5 lines · Alex Shi

Ops, I just find a old patch left on my laptop. and it still works on latest Linus tree. I don't remember there is a reasonable excuse to reject this patch.

So, anyone like to pick it up?

Ping ...

Quoted 68 lines

------
From 6ae1b9e71f9b14be5774ae9c1b4cf57cd4e747ac Mon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Mon, 11 Jun 2012 15:10:18 +0800
Subject: [PATCH] usb/xhci: unify parameter of xhci_msi_irq

According to Felipe and Alan's comments the second parameter of irq handler should be 'void *' not a specific structure pointer. So change it.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 drivers/usb/host/xhci.c      |    4 ++--
 drivers/usb/host/xhci.h      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +1 -1
index 23b4aef..cc8a52f 100644
@@ -2479,7 +2479,7 @@ hw_died:
 	return IRQ_HANDLED;
 }
 
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd)
+irqreturn_t xhci_msi_irq(int irq, void *hcd)
 {
 	return xhci_irq(hcd);
 }
drivers/usb/host/xhci.c +2 -2
index afdc73e..f7d40c1 100644
@@ -215,7 +215,7 @@ static int xhci_setup_msi(struct xhci_hcd *xhci)
 		return ret;
 	}
 
-	ret = request_irq(pdev->irq, (irq_handler_t)xhci_msi_irq,
+	ret = request_irq(pdev->irq, xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 	if (ret) {
 		xhci_dbg(xhci, "disable MSI interrupt\n");
@@ -287,7 +287,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
 
 	for (i = 0; i < xhci->msix_count; i++) {
 		ret = request_irq(xhci->msix_entries[i].vector,
-				(irq_handler_t)xhci_msi_irq,
+				xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 		if (ret)
 			goto disable_msix;
drivers/usb/host/xhci.h +1 -1
index de3d6e3..737ef54 100644
@@ -1710,7 +1710,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 
 int xhci_get_frame(struct usb_hcd *hcd);
 irqreturn_t xhci_irq(struct usb_hcd *hcd);
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
+irqreturn_t xhci_msi_irq(int irq, void *hcd);
 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev);
 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
Signature · 2 lines
Thanks
    Alex
author
#2 lore raw
Quoted 8 lines · Alex Shi
Quoted 5 lines · Alex Shi

Ops, I just find a old patch left on my laptop. and it still works on latest Linus tree. I don't remember there is a reasonable excuse to reject this patch.

So, anyone like to pick it up?

Ping ...

Is there someone like to give a bit comments on this patch?

Quoted 70 lines
Quoted 68 lines

------
From 6ae1b9e71f9b14be5774ae9c1b4cf57cd4e747ac Mon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Mon, 11 Jun 2012 15:10:18 +0800
Subject: [PATCH] usb/xhci: unify parameter of xhci_msi_irq

According to Felipe and Alan's comments the second parameter of irq handler should be 'void *' not a specific structure pointer. So change it.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 drivers/usb/host/xhci.c      |    4 ++--
 drivers/usb/host/xhci.h      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +1 -1
index 23b4aef..cc8a52f 100644
@@ -2479,7 +2479,7 @@ hw_died:
 	return IRQ_HANDLED;
 }
 
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd)
+irqreturn_t xhci_msi_irq(int irq, void *hcd)
 {
 	return xhci_irq(hcd);
 }
drivers/usb/host/xhci.c +2 -2
index afdc73e..f7d40c1 100644
@@ -215,7 +215,7 @@ static int xhci_setup_msi(struct xhci_hcd *xhci)
 		return ret;
 	}
 
-	ret = request_irq(pdev->irq, (irq_handler_t)xhci_msi_irq,
+	ret = request_irq(pdev->irq, xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 	if (ret) {
 		xhci_dbg(xhci, "disable MSI interrupt\n");
@@ -287,7 +287,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
 
 	for (i = 0; i < xhci->msix_count; i++) {
 		ret = request_irq(xhci->msix_entries[i].vector,
-				(irq_handler_t)xhci_msi_irq,
+				xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 		if (ret)
 			goto disable_msix;
drivers/usb/host/xhci.h +1 -1
index de3d6e3..737ef54 100644
@@ -1710,7 +1710,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 
 int xhci_get_frame(struct usb_hcd *hcd);
 irqreturn_t xhci_irq(struct usb_hcd *hcd);
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
+irqreturn_t xhci_msi_irq(int irq, void *hcd);
 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev);
 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
Signature · 2 lines
Thanks
    Alex
#3 lore raw

Hi Alex,

Thanks for updating this patch against current kernels. However, I'm really behind on patch review because of OPW, so I'm sorry, but I may not be able to review this until next week.

Sarah Sharp

Quoted 86 lines · Alex Shi
Quoted 8 lines · Alex Shi
Quoted 5 lines · Alex Shi

Ops, I just find a old patch left on my laptop. and it still works on latest Linus tree. I don't remember there is a reasonable excuse to reject this patch.

So, anyone like to pick it up?

Ping ...

Is there someone like to give a bit comments on this patch?

Quoted 70 lines
Quoted 68 lines

------
From 6ae1b9e71f9b14be5774ae9c1b4cf57cd4e747ac Mon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Mon, 11 Jun 2012 15:10:18 +0800
Subject: [PATCH] usb/xhci: unify parameter of xhci_msi_irq

According to Felipe and Alan's comments the second parameter of irq handler should be 'void *' not a specific structure pointer. So change it.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 drivers/usb/host/xhci.c      |    4 ++--
 drivers/usb/host/xhci.h      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +1 -1
index 23b4aef..cc8a52f 100644
@@ -2479,7 +2479,7 @@ hw_died:
 	return IRQ_HANDLED;
 }
 
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd)
+irqreturn_t xhci_msi_irq(int irq, void *hcd)
 {
 	return xhci_irq(hcd);
 }
drivers/usb/host/xhci.c +2 -2
index afdc73e..f7d40c1 100644
@@ -215,7 +215,7 @@ static int xhci_setup_msi(struct xhci_hcd *xhci)
 		return ret;
 	}
 
-	ret = request_irq(pdev->irq, (irq_handler_t)xhci_msi_irq,
+	ret = request_irq(pdev->irq, xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 	if (ret) {
 		xhci_dbg(xhci, "disable MSI interrupt\n");
@@ -287,7 +287,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
 
 	for (i = 0; i < xhci->msix_count; i++) {
 		ret = request_irq(xhci->msix_entries[i].vector,
-				(irq_handler_t)xhci_msi_irq,
+				xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 		if (ret)
 			goto disable_msix;
drivers/usb/host/xhci.h +1 -1
index de3d6e3..737ef54 100644
@@ -1710,7 +1710,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 
 int xhci_get_frame(struct usb_hcd *hcd);
 irqreturn_t xhci_irq(struct usb_hcd *hcd);
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
+irqreturn_t xhci_msi_irq(int irq, void *hcd);
 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev);
 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
Signature · 2 lines
Thanks
    Alex
#4 lore raw
In reply to Alex Shi

Ok, after a brief glance, this looks fine. I've queued it to my usb-next branch, and it should go to Greg by next week.

Sarah Sharp

Quoted 78 lines · Alex Shi

Ops, I just find a old patch left on my laptop. and it still works on latest Linus tree. I don't remember there is a reasonable excuse to reject this patch.

So, anyone like to pick it up?

------
From 6ae1b9e71f9b14be5774ae9c1b4cf57cd4e747ac Mon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Mon, 11 Jun 2012 15:10:18 +0800
Subject: [PATCH] usb/xhci: unify parameter of xhci_msi_irq

According to Felipe and Alan's comments the second parameter of irq handler should be 'void *' not a specific structure pointer. So change it.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 drivers/usb/host/xhci.c      |    4 ++--
 drivers/usb/host/xhci.h      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +1 -1
index 23b4aef..cc8a52f 100644
@@ -2479,7 +2479,7 @@ hw_died:
 	return IRQ_HANDLED;
 }
 
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd)
+irqreturn_t xhci_msi_irq(int irq, void *hcd)
 {
 	return xhci_irq(hcd);
 }
drivers/usb/host/xhci.c +2 -2
index afdc73e..f7d40c1 100644
@@ -215,7 +215,7 @@ static int xhci_setup_msi(struct xhci_hcd *xhci)
 		return ret;
 	}
 
-	ret = request_irq(pdev->irq, (irq_handler_t)xhci_msi_irq,
+	ret = request_irq(pdev->irq, xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 	if (ret) {
 		xhci_dbg(xhci, "disable MSI interrupt\n");
@@ -287,7 +287,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
 
 	for (i = 0; i < xhci->msix_count; i++) {
 		ret = request_irq(xhci->msix_entries[i].vector,
-				(irq_handler_t)xhci_msi_irq,
+				xhci_msi_irq,
 				0, "xhci_hcd", xhci_to_hcd(xhci));
 		if (ret)
 			goto disable_msix;
drivers/usb/host/xhci.h +1 -1
index de3d6e3..737ef54 100644
@@ -1710,7 +1710,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 
 int xhci_get_frame(struct usb_hcd *hcd);
 irqreturn_t xhci_irq(struct usb_hcd *hcd);
-irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
+irqreturn_t xhci_msi_irq(int irq, void *hcd);
 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev);
 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev);
 int xhci_alloc_tt_info(struct xhci_hcd *xhci,
Signature · 5 lines
1.7.5.4

-- 
Thanks
    Alex