* Re: [PATCH v2] hisi_sas: use platform_get_irq()
2015-12-11 12:03 ` John Garry
(?)
@ 2015-12-11 11:56 ` Johannes Thumshirn
-1 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2015-12-11 11:56 UTC (permalink / raw)
To: John Garry
Cc: JBottomley, martin.petersen, arnd, linuxarm, zhangfei.gao,
xuwei5, john.garry2, linux-scsi, linux-kernel, robh
On Fri, Dec 11, 2015 at 08:03:21PM +0800, John Garry wrote:
> It is preferred that drivers use platform_get_irq()
> instead of irq_of_parse_and_map(), so replace.
>
> Signed-off-by: John Garry <john.garry@huawei.com>
> Acked-by: Rob Herring <robh@kernel.org>
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
> index 30a9ab9..5af2e41 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas.h
> +++ b/drivers/scsi/hisi_sas/hisi_sas.h
> @@ -16,7 +16,6 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of_address.h>
> -#include <linux/of_irq.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <scsi/libsas.h>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> index 0ed2f92..d543811 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> @@ -1673,19 +1673,16 @@ static irq_handler_t fatal_interrupts[HISI_SAS_MAX_QUEUES] = {
>
> static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
> {
> - struct device *dev = &hisi_hba->pdev->dev;
> - struct device_node *np = dev->of_node;
> + struct platform_device *pdev = hisi_hba->pdev;
> + struct device *dev = &pdev->dev;
> int i, j, irq, rc, idx;
>
> - if (!np)
> - return -ENOENT;
> -
> for (i = 0; i < hisi_hba->n_phy; i++) {
> struct hisi_sas_phy *phy = &hisi_hba->phy[i];
>
> idx = i * HISI_SAS_PHY_INT_NR;
> for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) {
> - irq = irq_of_parse_and_map(np, idx);
> + irq = platform_get_irq(pdev, idx);
> if (!irq) {
> dev_err(dev,
> "irq init: fail map phy interrupt %d\n",
> @@ -1706,7 +1703,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
>
> idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR;
> for (i = 0; i < hisi_hba->queue_count; i++, idx++) {
> - irq = irq_of_parse_and_map(np, idx);
> + irq = platform_get_irq(pdev, idx);
> if (!irq) {
> dev_err(dev, "irq init: could not map cq interrupt %d\n",
> idx);
> @@ -1724,7 +1721,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
>
> idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count;
> for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) {
> - irq = irq_of_parse_and_map(np, idx);
> + irq = platform_get_irq(pdev, idx);
> if (!irq) {
> dev_err(dev, "irq init: could not map fatal interrupt %d\n",
> idx);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] hisi_sas: use platform_get_irq()
@ 2015-12-11 12:03 ` John Garry
0 siblings, 0 replies; 5+ messages in thread
From: John Garry @ 2015-12-11 12:03 UTC (permalink / raw)
To: JBottomley, martin.petersen
Cc: arnd, linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
linux-kernel, robh, John Garry
It is preferred that drivers use platform_get_irq()
instead of irq_of_parse_and_map(), so replace.
Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 30a9ab9..5af2e41 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -16,7 +16,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of_address.h>
-#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <scsi/libsas.h>
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 0ed2f92..d543811 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1673,19 +1673,16 @@ static irq_handler_t fatal_interrupts[HISI_SAS_MAX_QUEUES] = {
static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
{
- struct device *dev = &hisi_hba->pdev->dev;
- struct device_node *np = dev->of_node;
+ struct platform_device *pdev = hisi_hba->pdev;
+ struct device *dev = &pdev->dev;
int i, j, irq, rc, idx;
- if (!np)
- return -ENOENT;
-
for (i = 0; i < hisi_hba->n_phy; i++) {
struct hisi_sas_phy *phy = &hisi_hba->phy[i];
idx = i * HISI_SAS_PHY_INT_NR;
for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev,
"irq init: fail map phy interrupt %d\n",
@@ -1706,7 +1703,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR;
for (i = 0; i < hisi_hba->queue_count; i++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev, "irq init: could not map cq interrupt %d\n",
idx);
@@ -1724,7 +1721,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count;
for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev, "irq init: could not map fatal interrupt %d\n",
idx);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] hisi_sas: use platform_get_irq()
@ 2015-12-11 12:03 ` John Garry
0 siblings, 0 replies; 5+ messages in thread
From: John Garry @ 2015-12-11 12:03 UTC (permalink / raw)
To: JBottomley, martin.petersen
Cc: arnd, linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
linux-kernel, robh, John Garry
It is preferred that drivers use platform_get_irq()
instead of irq_of_parse_and_map(), so replace.
Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 30a9ab9..5af2e41 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -16,7 +16,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of_address.h>
-#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <scsi/libsas.h>
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 0ed2f92..d543811 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1673,19 +1673,16 @@ static irq_handler_t fatal_interrupts[HISI_SAS_MAX_QUEUES] = {
static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
{
- struct device *dev = &hisi_hba->pdev->dev;
- struct device_node *np = dev->of_node;
+ struct platform_device *pdev = hisi_hba->pdev;
+ struct device *dev = &pdev->dev;
int i, j, irq, rc, idx;
- if (!np)
- return -ENOENT;
-
for (i = 0; i < hisi_hba->n_phy; i++) {
struct hisi_sas_phy *phy = &hisi_hba->phy[i];
idx = i * HISI_SAS_PHY_INT_NR;
for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev,
"irq init: fail map phy interrupt %d\n",
@@ -1706,7 +1703,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR;
for (i = 0; i < hisi_hba->queue_count; i++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev, "irq init: could not map cq interrupt %d\n",
idx);
@@ -1724,7 +1721,7 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba)
idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count;
for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) {
- irq = irq_of_parse_and_map(np, idx);
+ irq = platform_get_irq(pdev, idx);
if (!irq) {
dev_err(dev, "irq init: could not map fatal interrupt %d\n",
idx);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hisi_sas: use platform_get_irq()
2015-12-11 12:03 ` John Garry
@ 2015-12-17 3:34 ` Martin K. Petersen
-1 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2015-12-17 3:34 UTC (permalink / raw)
To: John Garry
Cc: JBottomley, martin.petersen, arnd, linuxarm, zhangfei.gao,
xuwei5, john.garry2, linux-scsi, linux-kernel, robh,
Johannes Thumshirn
>>>>> "John" == John Garry <john.garry@huawei.com> writes:
John> It is preferred that drivers use platform_get_irq() instead of
John> irq_of_parse_and_map(), so replace.
Applied to 4.5/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] hisi_sas: use platform_get_irq()
@ 2015-12-17 3:34 ` Martin K. Petersen
0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2015-12-17 3:34 UTC (permalink / raw)
To: John Garry
Cc: JBottomley, martin.petersen, arnd, linuxarm, zhangfei.gao,
xuwei5, john.garry2, linux-scsi, linux-kernel, robh,
Johannes Thumshirn
>>>>> "John" == John Garry <john.garry@huawei.com> writes:
John> It is preferred that drivers use platform_get_irq() instead of
John> irq_of_parse_and_map(), so replace.
Applied to 4.5/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-17 3:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 12:03 [PATCH v2] hisi_sas: use platform_get_irq() John Garry
2015-12-11 12:03 ` John Garry
2015-12-11 11:56 ` Johannes Thumshirn
2015-12-17 3:34 ` Martin K. Petersen
2015-12-17 3:34 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.