From patchwork Thu Jun 14 16:18:09 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: 10464851 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 90A876020F for ; Thu, 14 Jun 2018 16:18:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E15028B40 for ; Thu, 14 Jun 2018 16:18:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EDFD28B6D; Thu, 14 Jun 2018 16:18:20 +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 F2D9D28B40 for ; Thu, 14 Jun 2018 16:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755208AbeFNQST convert rfc822-to-8bit (ORCPT ); Thu, 14 Jun 2018 12:18:19 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48382 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755214AbeFNQSS (ORCPT ); Thu, 14 Jun 2018 12:18:18 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1fTUwr-0005FC-SQ; Thu, 14 Jun 2018 18:18:10 +0200 Date: Thu, 14 Jun 2018 18:18:09 +0200 From: Sebastian Andrzej Siewior To: Johannes Thumshirn , Dan Williams , John Garry Cc: linux-scsi@vger.kernel.org, "Martin K . Petersen " , tglx@linutronix.de, Hannes Reinecke , "James E.J. Bottomley" Subject: [PATCH 1/2 v2] libsas: remove irq save in sas_ata_qc_issue() Message-ID: <20180614161809.uskdb6unpuk4uzoj@linutronix.de> References: <20180611144053.18294-1-bigeasy@linutronix.de> <20180611144053.18294-2-bigeasy@linutronix.de> <20180611145555.t3h3vjve2h7xhrxb@linux-x5ow.site> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180611145555.t3h3vjve2h7xhrxb@linux-x5ow.site> User-Agent: NeoMutt/20180512 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 Acked-by: Dan Williams Reviewed-by: John Garry --- v1…v2: Updating comment as suggested by Dan Williams. drivers/scsi/libsas/sas_ata.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index ff1d612f6fb9..2ac7395112b4 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,7 @@ 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); + /* TODO: we should try to remove that unlock */ spin_unlock(ap->lock); /* If the device fell off, no sense in issuing commands */ @@ -252,7 +248,6 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) out: spin_lock(ap->lock); - local_irq_restore(flags); return ret; }