public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Anand <anandkumar_santhanam@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org, Harry.Yang@pmcs.com,
	jack_wang@usish.com, Vishwanath.Maram@pmcs.com,
	Sangeetha.Gnanasekaran@pmcs.com
Subject: Re: [RESEND] [PATCH 05/13] pm80xx: MSI-X implementation for using 64 interrupts
Date: Mon, 04 Mar 2013 11:16:20 +0100	[thread overview]
Message-ID: <51347474.6070100@suse.de> (raw)
In-Reply-To: <51322D50.7080302@pmc-sierra.com>

On 03/02/2013 05:48 PM, Anand wrote:
>  From c5db2e0b6cf65fbef66fb2f4e345bf6856e242a4 Mon Sep 17 00:00:00 2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> 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@pmcs.com>
> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com>
> Ack-by: Jack Wang <jack_wang@usish.com>
> ---
>   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@suse.de			      +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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-03-04 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 16:48 [RESEND] [PATCH 05/13] pm80xx: MSI-X implementation for using 64 interrupts Anand
2013-03-04 10:16 ` Hannes Reinecke [this message]
2013-03-14 11:09   ` Anand Kumar Santhanam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51347474.6070100@suse.de \
    --to=hare@suse.de \
    --cc=Harry.Yang@pmcs.com \
    --cc=Sangeetha.Gnanasekaran@pmcs.com \
    --cc=Vishwanath.Maram@pmcs.com \
    --cc=anandkumar_santhanam@pmc-sierra.com \
    --cc=jack_wang@usish.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox