mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Mukesh Ojha <mojha@codeaurora.org>,
	Jack Wang <jinpu.wang@profitbricks.com>,
	lindar_liu@usish.com,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: pm8001: clean up structurally dead code when PM8001_USE_MSIX is defined
Date: Fri, 29 Mar 2019 10:38:31 +0000	[thread overview]
Message-ID: <f1dcaf50-2a77-a17b-45e9-477939500b48@canonical.com> (raw)
In-Reply-To: <a038c561-9fe8-f58e-2a5a-e7e95aca9eee@codeaurora.org>

On 29/03/2019 10:29, Mukesh Ojha wrote:
> 
> On 3/29/2019 5:13 AM, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> When macro PM8001_USE_MSIX is defined there are redundant dead code
>> calls to pm8001_chip_intx_interrupt_{enable|disable}. Clean this up
>> by compiling in the appropriate enable/disable handlers for the
>> defined PM8001_USE_MSIX and undefined PM8001_USE_MSIX cases.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> 
> This looks good.
> 
> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
> 
> 
> Not relevant to this patch but Can you do something about
> pm8001_chip_is_our_interupt() as well ?

Ah, yes, I missed that one, will do that sometime today.

> 
> 
> Cheers,
> -Mukesh
>> ---
>>   drivers/scsi/pm8001/pm8001_hwi.c | 14 ++++++++------
>>   1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c
>> b/drivers/scsi/pm8001/pm8001_hwi.c
>> index e4209091c1da..7d81246a432b 100644
>> --- a/drivers/scsi/pm8001/pm8001_hwi.c
>> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
>> @@ -1204,6 +1204,7 @@ void pm8001_chip_iounmap(struct pm8001_hba_info
>> *pm8001_ha)
>>       }
>>   }
>>   +#ifndef PM8001_USE_MSIX
>>   /**
>>    * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt
>>    * @pm8001_ha: our hba card information
>> @@ -1225,6 +1226,8 @@ pm8001_chip_intx_interrupt_disable(struct
>> pm8001_hba_info *pm8001_ha)
>>       pm8001_cw32(pm8001_ha, 0, MSGU_ODMR, ODMR_MASK_ALL);
>>   }
>>   +#else
>> +
>>   /**
>>    * pm8001_chip_msix_interrupt_enable - enable PM8001 chip interrupt
>>    * @pm8001_ha: our hba card information
>> @@ -1256,6 +1259,7 @@ pm8001_chip_msix_interrupt_disable(struct
>> pm8001_hba_info *pm8001_ha,
>>       msi_index += MSIX_TABLE_BASE;
>>       pm8001_cw32(pm8001_ha, 0,  msi_index, MSIX_INTERRUPT_DISABLE);
>>   }
>> +#endif
>>     /**
>>    * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt
>> @@ -1266,10 +1270,9 @@ pm8001_chip_interrupt_enable(struct
>> pm8001_hba_info *pm8001_ha, u8 vec)
>>   {
>>   #ifdef PM8001_USE_MSIX
>>       pm8001_chip_msix_interrupt_enable(pm8001_ha, 0);
>> -    return;
>> -#endif
>> +#else
>>       pm8001_chip_intx_interrupt_enable(pm8001_ha);
>> -
>> +#endif
>>   }
>>     /**
>> @@ -1281,10 +1284,9 @@ pm8001_chip_interrupt_disable(struct
>> pm8001_hba_info *pm8001_ha, u8 vec)
>>   {
>>   #ifdef PM8001_USE_MSIX
>>       pm8001_chip_msix_interrupt_disable(pm8001_ha, 0);
>> -    return;
>> -#endif
>> +#else
>>       pm8001_chip_intx_interrupt_disable(pm8001_ha);
>> -
>> +#endif
>>   }
>>     /**


  reply	other threads:[~2019-03-29 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 23:43 Colin King
2019-03-29  8:16 ` Jinpu Wang
2019-03-29 10:29 ` Mukesh Ojha
2019-03-29 10:38   ` Colin Ian King [this message]
2019-03-29 14:14 ` Martin K. Petersen

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=f1dcaf50-2a77-a17b-45e9-477939500b48@canonical.com \
    --to=colin.king@canonical.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@profitbricks.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lindar_liu@usish.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mojha@codeaurora.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

all inboxes | Powered by JetHome®