Re: [RESEND] [PATCH 05/13] pm80xx: MSI-X implementation for using 64 interrupts

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

 



On 03/02/2013 05:48 PM, Anand wrote:
 From c5db2e0b6cf65fbef66fb2f4e345bf6856e242a4 Mon Sep 17 00:00:00 2001
From: Sakthivel K <Sakthivel.SaravananKamalRaju@xxxxxxxx>
Date: Wed, 27 Feb 2013 20:32:56 +0530
Subject: [PATCH 05/13] pm80xx: MSI-X implementation for using 64 interrupts

Implementation of 64 interrupt handlers and tasklets to support
upto 64 interrupt for the device.

Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@xxxxxxxx>
Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@xxxxxxxx>
Ack-by: Jack Wang <jack_wang@xxxxxxxxx>
---
  drivers/scsi/pm8001/pm8001_init.c | 1233 ++++++++++++++++++++++++++++++++++++-
  drivers/scsi/pm8001/pm8001_sas.h  |    3 +-
  2 files changed, 1205 insertions(+), 31 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index e8a983f..f0c5075 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -163,7 +163,13 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
  }

  #ifdef PM8001_USE_TASKLET
-static void pm8001_tasklet(unsigned long opaque)
+
+/**
+ * tasklets for 64 msi-x interrupt handlers
+ * @opaque: the passed general host adapter struct
+ * Note: pm8001_tasklet0 is common for pm8001 & pm80xx
+ */
+static void pm8001_tasklet0(unsigned long opaque)
  {
  	struct pm8001_hba_info *pm8001_ha;
  	pm8001_ha = (struct pm8001_hba_info *)opaque;
@@ -171,16 +177,521 @@ static void pm8001_tasklet(unsigned long opaque)
  		BUG_ON(1);
  	PM8001_CHIP_DISP->isr(pm8001_ha, 0);
  }
+static void pm8001_tasklet1(unsigned long opaque)
+{
+	struct pm8001_hba_info *pm8001_ha;
+	pm8001_ha = (struct pm8001_hba_info *)opaque;
+	if (unlikely(!pm8001_ha))
+		BUG_ON(1);
+	PM8001_CHIP_DISP->isr(pm8001_ha, 1);
+}
+static void pm8001_tasklet2(unsigned long opaque)
+{
+	struct pm8001_hba_info *pm8001_ha;
+	pm8001_ha = (struct pm8001_hba_info *)opaque;
+	if (unlikely(!pm8001_ha))
+		BUG_ON(1);
+	PM8001_CHIP_DISP->isr(pm8001_ha, 2);
+}
[ ... ]

This is stupid.
Please merge all the individual tasklets etc.

Having 64 identical functions makes the code unreadable and unmaintainable.

Cheers,
Hannes
--
Dr. Hannes Reinecke		      zSeries & Storage
hare@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux