From patchwork Thu May 24 13:37:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10424761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4AC36032A for ; Thu, 24 May 2018 13:37:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02A3291BE for ; Thu, 24 May 2018 13:37:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94E6D294CB; Thu, 24 May 2018 13:37:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07D99291BE for ; Thu, 24 May 2018 13:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966045AbeEXNhQ convert rfc822-to-8bit (ORCPT ); Thu, 24 May 2018 09:37:16 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49937 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965823AbeEXNhP (ORCPT ); Thu, 24 May 2018 09:37:15 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1fLqQa-0007xi-E9; Thu, 24 May 2018 15:37:12 +0200 Date: Thu, 24 May 2018 15:37:12 +0200 From: Sebastian Andrzej Siewior To: Jason Yan Cc: John Garry , linux-scsi@vger.kernel.org, tglx@linutronix.de, Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Linuxarm , Tejun Heo Subject: [PATCH 1/2 v2] scsi: libsas: remove irq save in sas_ata_qc_issue() Message-ID: <20180524133712.g7gxhzb4ja5vsx2n@linutronix.de> References: <20180522173059.yb5qwwsshomubtoh@linutronix.de> <2a966f43-b3bf-d416-e4a8-22aa6bfac1a6@huawei.com> <20180523092437.kema6rx47vdiqd3x@linutronix.de> <5B062A64.30000@huawei.com> <20180524071514.yhewuj7jxrkulpp5@linutronix.de> <5B066C0B.2040306@huawei.com> <20180524075257.pleloqp75yf7br5x@linutronix.de> <5B06712F.6040006@huawei.com> <20180524081810.biskbaex4ywcg7kw@linutronix.de> <5B0675D1.5020905@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5B0675D1.5020905@huawei.com> User-Agent: NeoMutt/20180323 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 312d3e56119a ("[SCSI] libsas: remove ata_port.lock management duties from lldds") the sas_ata_qc_issue() function unlocks the ata_port.lock and disables interrupts before doing so. That lock is always taken with disabled interrupts so at this point, the interrupts are already disabled. There is no need to disable the interrupts before the unlock operation because they are already disabled. Restoring the interrupt state later does not change anything because they were disabled and remain disabled. Therefore remove the operations which do not change the behaviour. Signed-off-by: Sebastian Andrzej Siewior --- v1…v2: Drop the TODO comment as suggested by Jason Yan. drivers/scsi/libsas/sas_ata.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 0cc1567eacc1..b3be3935b831 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -176,7 +176,6 @@ static void sas_ata_task_done(struct sas_task *task) static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) { - unsigned long flags; struct sas_task *task; struct scatterlist *sg; int ret = AC_ERR_SYSTEM; @@ -187,10 +186,6 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) struct Scsi_Host *host = sas_ha->core.shost; struct sas_internal *i = to_sas_internal(host->transportt); - /* TODO: audit callers to ensure they are ready for qc_issue to - * unconditionally re-enable interrupts - */ - local_irq_save(flags); spin_unlock(ap->lock); /* If the device fell off, no sense in issuing commands */ @@ -252,7 +247,6 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) out: spin_lock(ap->lock); - local_irq_restore(flags); return ret; }