From patchwork Thu Apr 15 22:08:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A88F2C433B4 for ; Thu, 15 Apr 2021 22:08:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71088610FB for ; Thu, 15 Apr 2021 22:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235279AbhDOWJC (ORCPT ); Thu, 15 Apr 2021 18:09:02 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:33467 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234654AbhDOWJA (ORCPT ); Thu, 15 Apr 2021 18:09:00 -0400 Received: by mail-pf1-f172.google.com with SMTP id a85so16559322pfa.0 for ; Thu, 15 Apr 2021 15:08:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BdbZQ2gr0JrwdWn6uZddgTtiGW3iUyqvuUmU2iNR/0M=; b=Piw536O+CiT0IfEvRHMBCTk7ukGL8kjUrlPDCRll1C7achAe9HvPmcjaE9lN/8jNpK wOABJg41nFWTQPQ8V5nHgY4pgDhVoNrrYxBtNc3/Zjm2eDHBoyalgGeLvxT70JxwuUA0 EA/Kk9aeanNBIzZVsmo1tzkSSKmP1haZmTwTQrHv4aAfjHTctd2ujdsHOdOUKKsB8g/d owVl+mPA1z9MFmpEDEIv3QuJUhV87uu5ShqOyDUEoVWZ7zGGLHnO/LdNKNBCsSIHefy7 TziZrfmRcqzFkrthHdKnOyFvpH2DuA+Rqr1ZW7HHeC7sWCyhW4DFMR0juBEfnrYS+mcO MpdQ== X-Gm-Message-State: AOAM530LwlCXPTcPRoRR3BloiP55tjOFCUbemS3zJapNCJG9NYQQ7R85 /5ob3ZfHQzeChH89rK+RKew= X-Google-Smtp-Source: ABdhPJw/LUdnaYBOQNPd+5YTDXMSEQdRcqdMqQWjGwBwQiZLicdEjOzWbWwggKP4IXyyF1H/dpqgCw== X-Received: by 2002:a63:d309:: with SMTP id b9mr5222616pgg.96.1618524516998; Thu, 15 Apr 2021 15:08:36 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:36 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 01/20] Make the scsi_alloc_sgtables() documentation more accurate Date: Thu, 15 Apr 2021 15:08:07 -0700 Message-Id: <20210415220826.29438-2-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The current scsi_alloc_sgtables() documentation does not accurately explain what this function does. Hence improve the documentation of this function. Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 66e670aedd4c..985ed427445f 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -999,8 +999,11 @@ static inline bool scsi_cmd_needs_dma_drain(struct scsi_device *sdev, } /** - * scsi_alloc_sgtables - allocate S/G tables for a command - * @cmd: command descriptor we wish to initialize + * scsi_alloc_sgtables - Allocate and initialize data and integrity scatterlists + * @cmd: SCSI command data structure to initialize. + * + * Initializes @cmd->sdb and also @cmd->prot_sdb if data integrity is enabled + * for @cmd. * * Returns: * * BLK_STS_OK - on success From patchwork Thu Apr 15 22:08:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF99FC433ED for ; Thu, 15 Apr 2021 22:08:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C36C2610F7 for ; Thu, 15 Apr 2021 22:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235290AbhDOWJD (ORCPT ); Thu, 15 Apr 2021 18:09:03 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:45858 "EHLO mail-pg1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235139AbhDOWJB (ORCPT ); Thu, 15 Apr 2021 18:09:01 -0400 Received: by mail-pg1-f169.google.com with SMTP id d10so17850582pgf.12 for ; Thu, 15 Apr 2021 15:08:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cGnCPOgIA7Gkds8X6fZBW7kNO67PcbciQBssYoARmjw=; b=O4S8+jfqkqRuK/3QNDw/lMlAFazasdHLyaHikgmIvM0xhj6fVFOZmhvUK3hLoEoJUP 7FKW4en6/NMu35wmdbpgU9m/55JRyeGn4tTSw0cY20xZ9c1dYj7YBEaYOF3qSU3JEmFy vVE/CDhv9ICD26yIQ/oZIDXYAD0s81j+GtZuS5/3U2aWSpA+9yiS/YTsCJYkNiueNAFj dyMBpq7stnJqyRo3Ze+xDh1vKh3BK6sPTmxsYfS72GwPOX+VF2z7HG2n7M2pp1kRtt6V RZw+utb1WKSvX+fbdB02EKuKZ5iuNdTWtfqD/eJUMQfCBPshp7rYOfXQtcwj0zvTceEZ ikxg== X-Gm-Message-State: AOAM531HDt2bthiBLTXJ0YJZBl0LVGJxqzCCESlXc0TuYzCCQGzVeBu+ 8RKJVmDk3xiiJgfbOVXOrZg= X-Google-Smtp-Source: ABdhPJyk7AGNpSF45CXEmzs/VshVKOvg05kEOPjmByZq9Mx2Y61a5FCLaQJYvM/f6xJEMTLBS7qyZg== X-Received: by 2002:a63:745e:: with SMTP id e30mr5467956pgn.153.1618524518197; Thu, 15 Apr 2021 15:08:38 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:37 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 02/20] Remove an incorrect comment Date: Thu, 15 Apr 2021 15:08:08 -0700 Message-Id: <20210415220826.29438-3-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org scsi_device.sdev_target is used in more code than the single_lun code, hence remove the comment next to the definition of the sdev_target member. Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- include/scsi/scsi_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 05c7c320ef32..ac6ab16abee7 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -146,7 +146,7 @@ struct scsi_device { struct scsi_vpd __rcu *vpd_pg80; struct scsi_vpd __rcu *vpd_pg89; unsigned char current_tag; /* current tag */ - struct scsi_target *sdev_target; /* used only for single_lun */ + struct scsi_target *sdev_target; blist_flags_t sdev_bflags; /* black/white flags as also found in * scsi_devinfo.[hc]. For now used only to From patchwork Thu Apr 15 22:08:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85D76C43460 for ; Thu, 15 Apr 2021 22:08:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EF09610F7 for ; Thu, 15 Apr 2021 22:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235348AbhDOWJE (ORCPT ); Thu, 15 Apr 2021 18:09:04 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:43983 "EHLO mail-pg1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbhDOWJD (ORCPT ); Thu, 15 Apr 2021 18:09:03 -0400 Received: by mail-pg1-f170.google.com with SMTP id p12so17851460pgj.10 for ; Thu, 15 Apr 2021 15:08:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BbsHqAvEVr9VbDf2IgwsYK0bUo+eQhPGe0xVCw3XxEM=; b=e5D0886spHiqkz8L8P2PrJY3bPp1DKe+QQsCMRzjG1WuFbARCvDMaDvzC+vBw6t6Vx tDO59Ym7gF/P6k19HDYfHidxFEeWzgQOdlJIzkeFg7Gt+WyQXUjx3anxF7h5izTBnb/k KgTjxULK15Jz/A+NsfgcUt2wiD5ReIKaOlGvniZsHPft4D1J1ebhXGEKu1Sh5WR/n4Xx S+hser2i433gXKf3zKutLiyQUxBKs1TgxPpkuX2jdbaEazs6+AXq6HjgyBGVgyYcJ65x PTAFUY21ZsyjG2wpRGzEgWgbZTUL+lBL07GcfMiY4Y8fZwDZlCPjxMe8eMFnYSlf7z0X ObLw== X-Gm-Message-State: AOAM533h8AxnrJ32A9ZFHEpukFl6TzlEYUonLYOZYd5Wdsn38z/uUVri ONeBd44PDxt2wTp/6IT1lFs= X-Google-Smtp-Source: ABdhPJzaVthBRClr+OHEjfPhIFDKtgWUp27LshxHR6oVco7R4IBVvTPPExaZPnFPlAVWqXljYNfsIw== X-Received: by 2002:a63:5214:: with SMTP id g20mr5440294pgb.158.1618524519349; Thu, 15 Apr 2021 15:08:39 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:38 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 03/20] Rename scsi_softirq_done() into scsi_complete() Date: Thu, 15 Apr 2021 15:08:09 -0700 Message-Id: <20210415220826.29438-4-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Commit 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism"; v3.13) introduced a code path that calls the blk-mq completion function from interrupt context. scsi-mq was introduced by commit d285203cf647 ("scsi: add support for a blk-mq based I/O path."; v3.17). Since the introduction of scsi-mq scsi_softirq_done() can be called from interrupt context. Because that made the name of that function misleading, rename it into scsi_complete(). Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 985ed427445f..c4d6157e8051 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1434,7 +1434,11 @@ static bool scsi_mq_lld_busy(struct request_queue *q) return false; } -static void scsi_softirq_done(struct request *rq) +/* + * Block layer request completion callback. May be called from interrupt + * context. + */ +static void scsi_complete(struct request *rq) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); int disposition; @@ -1889,7 +1893,7 @@ static const struct blk_mq_ops scsi_mq_ops_no_commit = { .get_budget = scsi_mq_get_budget, .put_budget = scsi_mq_put_budget, .queue_rq = scsi_queue_rq, - .complete = scsi_softirq_done, + .complete = scsi_complete, .timeout = scsi_timeout, #ifdef CONFIG_BLK_DEBUG_FS .show_rq = scsi_show_rq, @@ -1919,7 +1923,7 @@ static const struct blk_mq_ops scsi_mq_ops = { .put_budget = scsi_mq_put_budget, .queue_rq = scsi_queue_rq, .commit_rqs = scsi_commit_rqs, - .complete = scsi_softirq_done, + .complete = scsi_complete, .timeout = scsi_timeout, #ifdef CONFIG_BLK_DEBUG_FS .show_rq = scsi_show_rq, From patchwork Thu Apr 15 22:08:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DA96C43462 for ; Thu, 15 Apr 2021 22:08:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F6F0610FB for ; Thu, 15 Apr 2021 22:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236532AbhDOWJF (ORCPT ); Thu, 15 Apr 2021 18:09:05 -0400 Received: from mail-pj1-f53.google.com ([209.85.216.53]:51914 "EHLO mail-pj1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbhDOWJE (ORCPT ); Thu, 15 Apr 2021 18:09:04 -0400 Received: by mail-pj1-f53.google.com with SMTP id lt13so4001746pjb.1 for ; Thu, 15 Apr 2021 15:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vpvIXFMO2/MgdDMwxCoeYsr1AYU+YR9iqCp/6zOQB3U=; b=QBd8HEOLmVyganJpy4P9/160ffOxt2uSaTjn048NfqsBo91UhrzM0lFfA/wDp/ByZb +UbtLM4ei6gTrWP5rfhLHk0kOOKtSjDjmGNwmk46GOOvxdE8WpBSGDKLM74QW0ruwv44 wn7RRCWBd9vf7ID+64xP+Fb9bmV/txreaH/GpD1NCUGlOfK57PGj+l06EQK9RQ5+HQWC 1O+3HRFSQrzzJQENS2Vcai8QNUgpCxzIT7dOQrExOh2oiXbgaTjaemZQCIJEv22NPh7c n5+iMdf9MWyUiAzeLsPLIUO5XQPD3aP8TyhlM6OzRAx36DpMSLHVinbjvoBcrv5QiK9u eqdA== X-Gm-Message-State: AOAM530X1qt44bq85oR1l82kQByb5ehRpOns0CoaOERshriD2EKvjmWX PpsFGnAEXVpyu4TwzXzCJkw= X-Google-Smtp-Source: ABdhPJxxw80wy4iVzHgl03VY3rDTINPdPayiMP/i46YVir/0WrNHgzhImRHDaUMN7q4dd55eMn1nKw== X-Received: by 2002:a17:90b:715:: with SMTP id s21mr6151669pjz.183.1618524520506; Thu, 15 Apr 2021 15:08:40 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:39 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 04/20] Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case Date: Thu, 15 Apr 2021 15:08:10 -0700 Message-Id: <20210415220826.29438-5-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The comment above scsi_send_eh_cmnd() says: "Returns SUCCESS or FAILED or NEEDS_RETRY". This patch makes all values returned by scsi_send_eh_cmnd() match the documentation of this function. This change does not affect the behavior of scsi_eh_tur() nor of scsi_eh_try_stu() nor of the scsi_request_sense() callers. See also commit bbe9fb0d04b9 ("scsi: Avoid that .queuecommand() gets called for a blocked SCSI device"; v5.3). Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index c0a3497fc474..28b287e9f50a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1112,7 +1112,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, if (sdev->sdev_state != SDEV_BLOCK) rtn = shost->hostt->queuecommand(shost, scmd); else - rtn = SCSI_MLQUEUE_DEVICE_BUSY; + rtn = FAILED; mutex_unlock(&sdev->state_mutex); if (rtn) { From patchwork Thu Apr 15 22:08:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C69C433ED for ; Thu, 15 Apr 2021 22:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D808661103 for ; Thu, 15 Apr 2021 22:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236538AbhDOWJH (ORCPT ); Thu, 15 Apr 2021 18:09:07 -0400 Received: from mail-pj1-f48.google.com ([209.85.216.48]:54148 "EHLO mail-pj1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234662AbhDOWJF (ORCPT ); Thu, 15 Apr 2021 18:09:05 -0400 Received: by mail-pj1-f48.google.com with SMTP id t23so12843857pjy.3 for ; Thu, 15 Apr 2021 15:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m5BVu2YG+HeQVn5GzMzPj14fIsTQzg7CffJ+vsLVUms=; b=CbW9NGX06/TeHjC4CugCFMfwTDRcuUMo4flvgbvLHOkKcWos/w0jlxOCBhHvG7QYQt lSnSlQHuAMwk05pSnXH1TG5SHhUKRUZfla3vJLaT4spESritNqLbqodTWhpsAeEP7cpW 79eBbscOw0W/Fo9eyoLIFAf7BoV6eGxRL3xv99MrdZfu16vaMvT0wWYCzBoxBiFXypg3 gppI1r1Wv09DF76TO33WikcY9Xr3FkbP+NrKHhPBRjofWb6IJBo3ZVtpwkJsLKP8H+Fy nRjmcHNpaFtAmPg4Qdn/s/zonsTCqdX6WjdISMfqEzMlp3hI7hdrx1XLn3jFNkBnPFD6 /ryQ== X-Gm-Message-State: AOAM530EsMvH0kq5ZmsR5G3e078P6VG3zCcqwHQxVW/KPFixfCfRgjQb 5aeDE5hGTHU1kCM5VjSxNVI= X-Google-Smtp-Source: ABdhPJx6waZpSUgPRHNR4tcuT6nlM1FleuJbDUKBIcWCOcuGkepZmleh6dhK8R96B36J/AS62FXXbg== X-Received: by 2002:a17:90b:314:: with SMTP id ay20mr6147073pjb.186.1618524521837; Thu, 15 Apr 2021 15:08:41 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:41 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 05/20] Introduce enum scsi_disposition Date: Thu, 15 Apr 2021 15:08:11 -0700 Message-Id: <20210415220826.29438-6-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Improve readability of the code in the SCSI core by introducing an enumeration type for the values used internally that decide how to continue processing a SCSI command. The eh_*_handler return values have not been changed because that would involve modifying all SCSI drivers. The output of the following command has been inspected to verify that no out-of-range values are assigned to a variable of type enum scsi_disposition: KCFLAGS=-Wassign-enum make CC=clang W=1 drivers/scsi/ Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- drivers/ata/libata-eh.c | 2 +- drivers/scsi/device_handler/scsi_dh_alua.c | 4 +- drivers/scsi/device_handler/scsi_dh_emc.c | 4 +- drivers/scsi/device_handler/scsi_dh_rdac.c | 4 +- drivers/scsi/scsi_error.c | 64 ++++++++++++---------- drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/scsi_priv.h | 2 +- include/scsi/scsi.h | 21 +++---- include/scsi/scsi_dh.h | 3 +- include/scsi/scsi_eh.h | 2 +- 10 files changed, 57 insertions(+), 51 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index b6f92050e60c..5352be2b447d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1599,7 +1599,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, } if (qc->flags & ATA_QCFLAG_SENSE_VALID) { - int ret = scsi_check_sense(qc->scsicmd); + enum scsi_disposition ret = scsi_check_sense(qc->scsicmd); /* * SUCCESS here means that the sense code could be * evaluated and should be passed to the upper layers diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index e6fde27d4565..efa8c0381476 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -405,8 +405,8 @@ static char print_alua_state(unsigned char state) } } -static int alua_check_sense(struct scsi_device *sdev, - struct scsi_sense_hdr *sense_hdr) +static enum scsi_disposition alua_check_sense(struct scsi_device *sdev, + struct scsi_sense_hdr *sense_hdr) { struct alua_dh_data *h = sdev->handler_data; struct alua_port_group *pg; diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index caa685cfe3d4..bd28ec6cfb72 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -280,8 +280,8 @@ static int send_trespass_cmd(struct scsi_device *sdev, return res; } -static int clariion_check_sense(struct scsi_device *sdev, - struct scsi_sense_hdr *sense_hdr) +static enum scsi_disposition clariion_check_sense(struct scsi_device *sdev, + struct scsi_sense_hdr *sense_hdr) { switch (sense_hdr->sense_key) { case NOT_READY: diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 5efc959493ec..25f6e1ac9e7b 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -656,8 +656,8 @@ static blk_status_t rdac_prep_fn(struct scsi_device *sdev, struct request *req) return BLK_STS_OK; } -static int rdac_check_sense(struct scsi_device *sdev, - struct scsi_sense_hdr *sense_hdr) +static enum scsi_disposition rdac_check_sense(struct scsi_device *sdev, + struct scsi_sense_hdr *sense_hdr) { struct rdac_dh_data *h = sdev->handler_data; diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 28b287e9f50a..9afd65eb2c8b 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -60,8 +60,8 @@ static void scsi_eh_done(struct scsi_cmnd *scmd); #define HOST_RESET_SETTLE_TIME (10) static int scsi_eh_try_stu(struct scsi_cmnd *scmd); -static int scsi_try_to_abort_cmd(struct scsi_host_template *, - struct scsi_cmnd *); +static enum scsi_disposition scsi_try_to_abort_cmd(struct scsi_host_template *, + struct scsi_cmnd *); void scsi_eh_wakeup(struct Scsi_Host *shost) { @@ -151,7 +151,7 @@ scmd_eh_abort_handler(struct work_struct *work) struct scsi_cmnd *scmd = container_of(work, struct scsi_cmnd, abort_work.work); struct scsi_device *sdev = scmd->device; - int rtn; + enum scsi_disposition rtn; if (scsi_host_eh_past_deadline(sdev->host)) { SCSI_LOG_ERROR_RECOVERY(3, @@ -498,7 +498,7 @@ static void scsi_report_sense(struct scsi_device *sdev, * When a deferred error is detected the current command has * not been executed and needs retrying. */ -int scsi_check_sense(struct scsi_cmnd *scmd) +enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) { struct scsi_device *sdev = scmd->device; struct scsi_sense_hdr sshdr; @@ -512,7 +512,7 @@ int scsi_check_sense(struct scsi_cmnd *scmd) return NEEDS_RETRY; if (sdev->handler && sdev->handler->check_sense) { - int rc; + enum scsi_disposition rc; rc = sdev->handler->check_sense(sdev, &sshdr); if (rc != SCSI_RETURN_NOT_HANDLED) @@ -726,7 +726,7 @@ static void scsi_handle_queue_full(struct scsi_device *sdev) * don't allow for the possibility of retries here, and we are a lot * more restrictive about what we consider acceptable. */ -static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_eh_completed_normally(struct scsi_cmnd *scmd) { /* * first check the host byte, to see if there is anything in there @@ -807,10 +807,10 @@ static void scsi_eh_done(struct scsi_cmnd *scmd) * scsi_try_host_reset - ask host adapter to reset itself * @scmd: SCSI cmd to send host reset. */ -static int scsi_try_host_reset(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_try_host_reset(struct scsi_cmnd *scmd) { unsigned long flags; - int rtn; + enum scsi_disposition rtn; struct Scsi_Host *host = scmd->device->host; struct scsi_host_template *hostt = host->hostt; @@ -837,10 +837,10 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd) * scsi_try_bus_reset - ask host to perform a bus reset * @scmd: SCSI cmd to send bus reset. */ -static int scsi_try_bus_reset(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_try_bus_reset(struct scsi_cmnd *scmd) { unsigned long flags; - int rtn; + enum scsi_disposition rtn; struct Scsi_Host *host = scmd->device->host; struct scsi_host_template *hostt = host->hostt; @@ -879,10 +879,10 @@ static void __scsi_report_device_reset(struct scsi_device *sdev, void *data) * timer on it, and set the host back to a consistent state prior to * returning. */ -static int scsi_try_target_reset(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_try_target_reset(struct scsi_cmnd *scmd) { unsigned long flags; - int rtn; + enum scsi_disposition rtn; struct Scsi_Host *host = scmd->device->host; struct scsi_host_template *hostt = host->hostt; @@ -910,9 +910,9 @@ static int scsi_try_target_reset(struct scsi_cmnd *scmd) * timer on it, and set the host back to a consistent state prior to * returning. */ -static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_try_bus_device_reset(struct scsi_cmnd *scmd) { - int rtn; + enum scsi_disposition rtn; struct scsi_host_template *hostt = scmd->device->host->hostt; if (!hostt->eh_device_reset_handler) @@ -941,8 +941,8 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) * if the device is temporarily unavailable (eg due to a * link down on FibreChannel) */ -static int scsi_try_to_abort_cmd(struct scsi_host_template *hostt, - struct scsi_cmnd *scmd) +static enum scsi_disposition +scsi_try_to_abort_cmd(struct scsi_host_template *hostt, struct scsi_cmnd *scmd) { if (!hostt->eh_abort_handler) return FAILED; @@ -1075,8 +1075,8 @@ EXPORT_SYMBOL(scsi_eh_restore_cmnd); * Return value: * SUCCESS or FAILED or NEEDS_RETRY */ -static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, - int cmnd_size, int timeout, unsigned sense_bytes) +static enum scsi_disposition scsi_send_eh_cmnd(struct scsi_cmnd *scmd, + unsigned char *cmnd, int cmnd_size, int timeout, unsigned sense_bytes) { struct scsi_device *sdev = scmd->device; struct Scsi_Host *shost = sdev->host; @@ -1183,12 +1183,13 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, * that we obtain it on our own. This function will *not* return until * the command either times out, or it completes. */ -static int scsi_request_sense(struct scsi_cmnd *scmd) +static enum scsi_disposition scsi_request_sense(struct scsi_cmnd *scmd) { return scsi_send_eh_cmnd(scmd, NULL, 0, scmd->device->eh_timeout, ~0); } -static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) +static enum scsi_disposition +scsi_eh_action(struct scsi_cmnd *scmd, enum scsi_disposition rtn) { if (!blk_rq_is_passthrough(scmd->request)) { struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd); @@ -1241,7 +1242,7 @@ int scsi_eh_get_sense(struct list_head *work_q, { struct scsi_cmnd *scmd, *next; struct Scsi_Host *shost; - int rtn; + enum scsi_disposition rtn; /* * If SCSI_EH_ABORT_SCHEDULED has been set, it is timeout IO, @@ -1319,7 +1320,8 @@ EXPORT_SYMBOL_GPL(scsi_eh_get_sense); static int scsi_eh_tur(struct scsi_cmnd *scmd) { static unsigned char tur_command[6] = {TEST_UNIT_READY, 0, 0, 0, 0, 0}; - int retry_cnt = 1, rtn; + int retry_cnt = 1; + enum scsi_disposition rtn; retry_tur: rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, @@ -1407,7 +1409,8 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd) static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; if (scmd->device->allow_restart) { - int i, rtn = NEEDS_RETRY; + int i; + enum scsi_disposition rtn = NEEDS_RETRY; for (i = 0; rtn == NEEDS_RETRY && i < 2; i++) rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0); @@ -1501,7 +1504,7 @@ static int scsi_eh_bus_device_reset(struct Scsi_Host *shost, { struct scsi_cmnd *scmd, *bdr_scmd, *next; struct scsi_device *sdev; - int rtn; + enum scsi_disposition rtn; shost_for_each_device(sdev, shost) { if (scsi_host_eh_past_deadline(shost)) { @@ -1568,7 +1571,7 @@ static int scsi_eh_target_reset(struct Scsi_Host *shost, while (!list_empty(&tmp_list)) { struct scsi_cmnd *next, *scmd; - int rtn; + enum scsi_disposition rtn; unsigned int id; if (scsi_host_eh_past_deadline(shost)) { @@ -1626,7 +1629,7 @@ static int scsi_eh_bus_reset(struct Scsi_Host *shost, struct scsi_cmnd *scmd, *chan_scmd, *next; LIST_HEAD(check_list); unsigned int channel; - int rtn; + enum scsi_disposition rtn; /* * we really want to loop over the various channels, and do this on @@ -1697,7 +1700,7 @@ static int scsi_eh_host_reset(struct Scsi_Host *shost, { struct scsi_cmnd *scmd, *next; LIST_HEAD(check_list); - int rtn; + enum scsi_disposition rtn; if (!list_empty(work_q)) { scmd = list_entry(work_q->next, @@ -1803,9 +1806,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd) * doesn't require the error handler read (i.e. we don't need to * abort/reset), this function should return SUCCESS. */ -int scsi_decide_disposition(struct scsi_cmnd *scmd) +enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *scmd) { - int rtn; + enum scsi_disposition rtn; /* * if the device is offline, then we clearly just pass the result back @@ -2368,7 +2371,8 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) struct Scsi_Host *shost = dev->host; struct request *rq; unsigned long flags; - int error = 0, rtn, val; + int error = 0, val; + enum scsi_disposition rtn; if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) return -EACCES; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c4d6157e8051..a979a9457dff 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1441,7 +1441,7 @@ static bool scsi_mq_lld_busy(struct request_queue *q) static void scsi_complete(struct request *rq) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); - int disposition; + enum scsi_disposition disposition; INIT_LIST_HEAD(&cmd->eh_entry); diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index ed240f006c04..75d6f23e4fff 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -74,7 +74,7 @@ extern void scsi_exit_devinfo(void); extern void scmd_eh_abort_handler(struct work_struct *work); extern enum blk_eh_timer_return scsi_times_out(struct request *req); extern int scsi_error_handler(void *host); -extern int scsi_decide_disposition(struct scsi_cmnd *cmd); +extern enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *cmd); extern void scsi_eh_wakeup(struct Scsi_Host *shost); extern void scsi_eh_scmd_add(struct scsi_cmnd *); void scsi_eh_ready_devs(struct Scsi_Host *shost, diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index e75cca25338a..246ced401683 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -180,16 +180,17 @@ static inline int scsi_is_wlun(u64 lun) /* * Internal return values. */ - -#define NEEDS_RETRY 0x2001 -#define SUCCESS 0x2002 -#define FAILED 0x2003 -#define QUEUED 0x2004 -#define SOFT_ERROR 0x2005 -#define ADD_TO_MLQUEUE 0x2006 -#define TIMEOUT_ERROR 0x2007 -#define SCSI_RETURN_NOT_HANDLED 0x2008 -#define FAST_IO_FAIL 0x2009 +enum scsi_disposition { + NEEDS_RETRY = 0x2001, + SUCCESS = 0x2002, + FAILED = 0x2003, + QUEUED = 0x2004, + SOFT_ERROR = 0x2005, + ADD_TO_MLQUEUE = 0x2006, + TIMEOUT_ERROR = 0x2007, + SCSI_RETURN_NOT_HANDLED = 0x2008, + FAST_IO_FAIL = 0x2009, +}; /* * Midlevel queue return values. diff --git a/include/scsi/scsi_dh.h b/include/scsi/scsi_dh.h index a9f782fe732a..4df943c1b90b 100644 --- a/include/scsi/scsi_dh.h +++ b/include/scsi/scsi_dh.h @@ -52,7 +52,8 @@ struct scsi_device_handler { /* Filled by the hardware handler */ struct module *module; const char *name; - int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); + enum scsi_disposition (*check_sense)(struct scsi_device *, + struct scsi_sense_hdr *); int (*attach)(struct scsi_device *); void (*detach)(struct scsi_device *); int (*activate)(struct scsi_device *, activate_complete, void *); diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 6bd5ed695a5e..468094254b3c 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -17,7 +17,7 @@ extern void scsi_report_device_reset(struct Scsi_Host *, int, int); extern int scsi_block_when_processing_errors(struct scsi_device *); extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd, struct scsi_sense_hdr *sshdr); -extern int scsi_check_sense(struct scsi_cmnd *); +extern enum scsi_disposition scsi_check_sense(struct scsi_cmnd *); static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) { From patchwork Thu Apr 15 22:08:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B519C433B4 for ; Thu, 15 Apr 2021 22:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24C7C610FB for ; Thu, 15 Apr 2021 22:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236543AbhDOWJI (ORCPT ); Thu, 15 Apr 2021 18:09:08 -0400 Received: from mail-pl1-f172.google.com ([209.85.214.172]:44623 "EHLO mail-pl1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbhDOWJG (ORCPT ); Thu, 15 Apr 2021 18:09:06 -0400 Received: by mail-pl1-f172.google.com with SMTP id d8so12871448plh.11 for ; Thu, 15 Apr 2021 15:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GxDiSMyuFn/sCV49iRipvf8PeN03A9NMFW2OA6zCgsM=; b=XmoS5Ui1d9qO0SEwa1aRDGrbs6gF1lqU9ZCc7g5U87qJOS0H8xamTOnv/tg+9HsHGV LP6qHQk5Tdmu/MjjxHgbR5ykKzqWFzGzCaSUpnmg3zqVPYaIfGCH+1q6YLAMH0KX3tYg yiiqvwMohFLVVJDHTQi89zURiY4Wq67UueJLlnk9IvyfoSHu0pAmSJdKkmLBKo2wWIJ2 yf27xRH79rRCg/lirj1+vS46ABouS2rPFI6CnuGIRls4uba7HXkcegayR2+OoaJ3annT oboSLdXGo6++2vrH/5Kk4w4MegFpt0jLsTxpkB2vCUICdqDToqUwvLqzVjzwcZMOLZSN Eo3Q== X-Gm-Message-State: AOAM532RXyjdXxWwRMdvHI0sDSUN+I3Kq8YFWeEkyYyGKg6Talk9PxgX iNhxr2omuK8A9EvE6bKStxI= X-Google-Smtp-Source: ABdhPJx3ADTZ5sPYLfD9ztPGcOflo/ikld/czcTPYGm/SB78mn0oBrT9sZy0o0PUdq5pwoVf0ljIJQ== X-Received: by 2002:a17:90b:4c0c:: with SMTP id na12mr5924556pjb.117.1618524522879; Thu, 15 Apr 2021 15:08:42 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:42 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , aacraid@microsemi.com Subject: [PATCH v2 06/20] aacraid: Remove an unused function Date: Thu, 15 Apr 2021 15:08:12 -0700 Message-Id: <20210415220826.29438-7-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This was detected by building the kernel with clang and W=1. Cc: aacraid@microsemi.com Signed-off-by: Bart Van Assche --- drivers/scsi/aacraid/aachba.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 8e06604370c4..f1f62b5da8b7 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -1881,11 +1881,6 @@ static inline u32 aac_get_safw_phys_nexus(struct aac_dev *dev, int lun) return *((u32 *)&dev->safw_phys_luns->lun[lun].node_ident[12]); } -static inline u32 aac_get_safw_phys_device_type(struct aac_dev *dev, int lun) -{ - return dev->safw_phys_luns->lun[lun].node_ident[8]; -} - static inline void aac_free_safw_identify_resp(struct aac_dev *dev, int bus, int target) { From patchwork Thu Apr 15 22:08:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 247B7C43461 for ; Thu, 15 Apr 2021 22:08:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBC07610F7 for ; Thu, 15 Apr 2021 22:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236539AbhDOWJI (ORCPT ); Thu, 15 Apr 2021 18:09:08 -0400 Received: from mail-pl1-f170.google.com ([209.85.214.170]:40684 "EHLO mail-pl1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236535AbhDOWJH (ORCPT ); Thu, 15 Apr 2021 18:09:07 -0400 Received: by mail-pl1-f170.google.com with SMTP id 20so8924510pll.7 for ; Thu, 15 Apr 2021 15:08:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8sA9N5oKKPhmXywujYprCSEsN8faX1miAqRolBWrD9U=; b=OuDqKDN9oA62ISNdr7ucUis50CemqDyRbdripeM6lxXkDx72bbrkm9DMDTXrBvIAUi /WfichOA7nKAUDRBJt5vog+9O2uDiVPKIYRbElinUVz/kRLayrAY6LmrSgZd7uZSHlGb CdDLjCqlq/KYooM0BEZZwecrpgvaTJRiGrV5DxUxZQOteJmvY6ryINtq8FE5/rdBb1Na jiZp2IP0bjr5n52U4uVC1lx8E4EKXD5o1iBgQH+Zi+G/OJkirb5B0K5gzADMsk4xd4PB Z59KfTj/lrkKqQPhmyT/injFBpwRxabLjSQYAJ3lWLKTpIAGQJwl+L/+sDBfAOypjD+S J+yg== X-Gm-Message-State: AOAM533sDnFqPheaAOGRcVf57di3CSwI8AEREgC66AWSdyVDrGe5JyDF iQbHImETr/NkmDeAI7Hiepc= X-Google-Smtp-Source: ABdhPJzYAVnaqKRHG21rPoJZmF4AukuNymlZn4hbcm0LVhZQEFmbGA9w5gWQLox87DW6TSAMI5w2og== X-Received: by 2002:a17:90a:dc13:: with SMTP id i19mr6130945pjv.194.1618524524049; Thu, 15 Apr 2021 15:08:44 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:43 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 07/20] libfc: Fix a format specifier Date: Thu, 15 Apr 2021 15:08:13 -0700 Message-Id: <20210415220826.29438-8-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Since the 'mfs' member has been declared as 'u32' in include/scsi/libfc.h, use the %u format specifier instead of %hu. This patch fixes the following clang compiler warning: warning: format specifies type 'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat] "lport->mfs:%hu\n", mfs, lport->mfs); ~~~ ^~~~~~~~~~ %u Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/scsi/libfc/fc_lport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 78bd317f0553..cf36c8cb5493 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -1731,7 +1731,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, if (mfs < FC_SP_MIN_MAX_PAYLOAD || mfs > FC_SP_MAX_MAX_PAYLOAD) { FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, " - "lport->mfs:%hu\n", mfs, lport->mfs); + "lport->mfs:%u\n", mfs, lport->mfs); fc_lport_error(lport, fp); goto out; } From patchwork Thu Apr 15 22:08:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18BDAC43460 for ; Thu, 15 Apr 2021 22:08:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8434610F7 for ; Thu, 15 Apr 2021 22:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236575AbhDOWJN (ORCPT ); Thu, 15 Apr 2021 18:09:13 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:45575 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbhDOWJJ (ORCPT ); Thu, 15 Apr 2021 18:09:09 -0400 Received: by mail-pj1-f42.google.com with SMTP id nm3-20020a17090b19c3b029014e1bbf6c60so9300526pjb.4 for ; Thu, 15 Apr 2021 15:08:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dI5y2pj+Al0+2aC0ZPqBvqEqkhXKrklWG5otUSr/XY4=; b=USdqvIxBxcu7+JYD6OTrxcLozozCo24f7nMQkcefxI8fOu6/nPem+eckeu5aVP625U aYwj+MZrNlHq0KmsPExrcl0kV5HUygFhVKKBjzChk+PKYYA7VJQWno2/MrWPGV1Cj7a3 RiFjMsjuHzXLronpTkcrAndusbhtm+GxSYGtWPhjjpsBBLY4F4He9JD82MgzEAAScdyL XrRQCFEiAa+/IpuNUEyYSXBtn/BPdc3QRZ67NCvTfa80sOgIL1HO+aYj0S8AZKPiCWNa o97mD1tlxsw+fNLEo37JDpkIC0m0UsKAeWiAwpk2hmsjSo+4p0tdkn28YDNuKtArhp0m Kh7g== X-Gm-Message-State: AOAM530szrhiEXawVgJhwG496Uoy/Jk8Fu87rbQ2KP/gpS5pMyIjwEve AbvpWlE+4IIoJoDKhWYXE5I= X-Google-Smtp-Source: ABdhPJyqV+GGpofNMMRBni616zipYMAiG+u1d+QlCcDGivbdIpHfhfvg4+3pBQ59xHuWrHebbORZrQ== X-Received: by 2002:a17:90a:6b84:: with SMTP id w4mr6134010pjj.134.1618524525183; Thu, 15 Apr 2021 15:08:45 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:44 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 08/20] fcoe: Suppress a compiler warning Date: Thu, 15 Apr 2021 15:08:14 -0700 Message-Id: <20210415220826.29438-9-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Suppress the following compiler warning: warning: cast to smaller integer type 'enum fip_mode' from 'void *' [-Wvoid-pointer-to-enum-cast] enum fip_mode fip_mode = (enum fip_mode)kp->arg; ^~~~~~~~~~~~~~~~~~~~~~ Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/scsi/fcoe/fcoe_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index b927b3d84523..4d0e19e7c84b 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -863,7 +863,7 @@ static int fcoe_transport_create(const char *buffer, int rc = -ENODEV; struct net_device *netdev = NULL; struct fcoe_transport *ft = NULL; - enum fip_mode fip_mode = (enum fip_mode)kp->arg; + enum fip_mode fip_mode = (enum fip_mode)(uintptr_t)kp->arg; mutex_lock(&ft_mutex); From patchwork Thu Apr 15 22:08:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8296C433B4 for ; Thu, 15 Apr 2021 22:08:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A0FA610F7 for ; Thu, 15 Apr 2021 22:08:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234764AbhDOWJN (ORCPT ); Thu, 15 Apr 2021 18:09:13 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:40819 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236535AbhDOWJK (ORCPT ); Thu, 15 Apr 2021 18:09:10 -0400 Received: by mail-pg1-f176.google.com with SMTP id b17so17859902pgh.7 for ; Thu, 15 Apr 2021 15:08:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XIUJE859cpBexslJPbo7ax8YhKkhM8C9hNE+KPJButo=; b=PecJCWQH9pjZQhM7d4hihsrYXgVT3yldlmIYVj1Tc2Zc0yLH6gNGLOV7LLknIUEVN+ iQROuC74VzAUJyn75L+l6yCCJe9lZdxIjb5AImFd1zrH9znJBugbwvKTASHq3zg3LXVy Td+RpP9GMCzBBhwV8UDmJ2OaQoCALgGD+0dt509G/P4+gNl3Ny29aztOPiP67unviua8 DHiqcL39z9+Y9IrEXKFERfwZucALsnHRXgPgs6LZ3ms8fId1ML9qLF9uV089aF/uYk2q PaDZ2JKRuMlEJHXfyO8fjHTe45XTC6nHmk/KuB3f17DFRiIYt2b1ks46JcnWAuUmOkC+ F6Nw== X-Gm-Message-State: AOAM530otk+6MLbjj/Y6TuiqW4OjoOUCZf/uYV52TesYnVBdOXp7OQ49 K+uZ0iSbJVg5qLDnUIFnXQ0= X-Google-Smtp-Source: ABdhPJyjMtPY9sgzuFuxJNnuu0RTaFtE9zy/0nwKdQCtPpkkEQQ4mooIip6b97d3zS282aW+Mea6xw== X-Received: by 2002:aa7:9316:0:b029:244:7616:edc7 with SMTP id 22-20020aa793160000b02902447616edc7mr5202466pfj.19.1618524526377; Thu, 15 Apr 2021 15:08:46 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:45 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani Subject: [PATCH v2 09/20] mpt3sas: Fix two kernel-doc headers Date: Thu, 15 Apr 2021 15:08:15 -0700 Message-Id: <20210415220826.29438-10-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following warnings: drivers/scsi/mpt3sas/mpt3sas_base.c:5430: warning: Excess function parameter 'ct' description in '_base_allocate_pcie_sgl_pool' drivers/scsi/mpt3sas/mpt3sas_base.c:5493: warning: Excess function parameter 'ctr' description in '_base_allocate_chain_dma_pool' Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Fixes: d6adc251dd2f ("scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region") Fixes: 7dd847dae1c4 ("scsi: mpt3sas: Force chain buffer allocations to be within same 4 GB region") Signed-off-by: Bart Van Assche --- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 84c507587166..5779f313f6f8 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -5421,7 +5421,7 @@ _base_reduce_hba_queue_depth(struct MPT3SAS_ADAPTER *ioc) * for pcie sgl pools. * @ioc: Adapter object * @sz: DMA Pool size - * @ct: Chain tracker + * * Return: 0 for success, non-zero for failure. */ @@ -5485,7 +5485,7 @@ _base_allocate_pcie_sgl_pool(struct MPT3SAS_ADAPTER *ioc, u32 sz) * for chain dma pool. * @ioc: Adapter object * @sz: DMA Pool size - * @ctr: Chain tracker + * * Return: 0 for success, non-zero for failure. */ static int From patchwork Thu Apr 15 22:08:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A312C433ED for ; Thu, 15 Apr 2021 22:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A82F7610F7 for ; Thu, 15 Apr 2021 22:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236574AbhDOWJP (ORCPT ); Thu, 15 Apr 2021 18:09:15 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:46732 "EHLO mail-pf1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236566AbhDOWJL (ORCPT ); Thu, 15 Apr 2021 18:09:11 -0400 Received: by mail-pf1-f180.google.com with SMTP id d124so16972041pfa.13 for ; Thu, 15 Apr 2021 15:08:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/GbOGUYJwLlMuH2QMVoGsRNi6a0V4INR/immqPAYXWw=; b=RkMoCzCXaKZXl0jcCf09OPGFwfzRl90gGkrs4nll/qZgY/020cD0DilrdPnV6wGeFA tSCaUtK+IkPKHIvR1XPVDHw9j/wPwNmqrPcVQ5UG6j+eT3ORsJz39j56+KqHSSQSi8t9 QO1q77QYsdsn0ffFzA/rjgmvGDnuC4eh3v5HSxYnvjJpMTKUd0hdRUU95i63aztbjhhB bBU0LB5VKwYFRCC+z+bwqQFxEyD39rzXRA2QwSHWS47W7NjfdyJiKxrey5sCTMkmjchL eY2hnyEfm+ZOyjQKOdjA1XD9ReZBDvc9Su1YT4TLRELl/1xBOEa9JGRj8xdRia4xZAbl 4B4w== X-Gm-Message-State: AOAM531hE3YJfbcIMQQSh9b/dXbkblnr/sNsxYtIfO6iM96UIJmBxBch jv9O9AZZgEYOGL4qJLYcXXEfHEQ5PJ0= X-Google-Smtp-Source: ABdhPJxbXRx0UT76B3RRbD93aSAsg+Zrt59b4Ub3pJUGNu1YEdJi9wz+ED+rGSAAGK5F+xg66f4O+g== X-Received: by 2002:a05:6a00:acb:b029:23d:60f9:5471 with SMTP id c11-20020a056a000acbb029023d60f95471mr5040394pfl.77.1618524527582; Thu, 15 Apr 2021 15:08:47 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:46 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 10/20] myrb: Remove unused functions Date: Thu, 15 Apr 2021 15:08:16 -0700 Message-Id: <20210415220826.29438-11-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This was detected by building the kernel with clang and W=1. Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/scsi/myrb.c | 71 --------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index 56767f8610d4..d9c82e211ae7 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -2552,11 +2552,6 @@ static inline void DAC960_LA_ack_hw_mbox_status(void __iomem *base) writeb(DAC960_LA_IDB_HWMBOX_ACK_STS, base + DAC960_LA_IDB_OFFSET); } -static inline void DAC960_LA_gen_intr(void __iomem *base) -{ - writeb(DAC960_LA_IDB_GEN_IRQ, base + DAC960_LA_IDB_OFFSET); -} - static inline void DAC960_LA_reset_ctrl(void __iomem *base) { writeb(DAC960_LA_IDB_CTRL_RESET, base + DAC960_LA_IDB_OFFSET); @@ -2586,11 +2581,6 @@ static inline void DAC960_LA_ack_hw_mbox_intr(void __iomem *base) writeb(DAC960_LA_ODB_HWMBOX_ACK_IRQ, base + DAC960_LA_ODB_OFFSET); } -static inline void DAC960_LA_ack_mem_mbox_intr(void __iomem *base) -{ - writeb(DAC960_LA_ODB_MMBOX_ACK_IRQ, base + DAC960_LA_ODB_OFFSET); -} - static inline void DAC960_LA_ack_intr(void __iomem *base) { writeb(DAC960_LA_ODB_HWMBOX_ACK_IRQ | DAC960_LA_ODB_MMBOX_ACK_IRQ, @@ -2604,13 +2594,6 @@ static inline bool DAC960_LA_hw_mbox_status_available(void __iomem *base) return odb & DAC960_LA_ODB_HWMBOX_STS_AVAIL; } -static inline bool DAC960_LA_mem_mbox_status_available(void __iomem *base) -{ - unsigned char odb = readb(base + DAC960_LA_ODB_OFFSET); - - return odb & DAC960_LA_ODB_MMBOX_STS_AVAIL; -} - static inline void DAC960_LA_enable_intr(void __iomem *base) { unsigned char odb = 0xFF; @@ -2627,13 +2610,6 @@ static inline void DAC960_LA_disable_intr(void __iomem *base) writeb(odb, base + DAC960_LA_IRQMASK_OFFSET); } -static inline bool DAC960_LA_intr_enabled(void __iomem *base) -{ - unsigned char imask = readb(base + DAC960_LA_IRQMASK_OFFSET); - - return !(imask & DAC960_LA_IRQMASK_DISABLE_IRQ); -} - static inline void DAC960_LA_write_cmd_mbox(union myrb_cmd_mbox *mem_mbox, union myrb_cmd_mbox *mbox) { @@ -2656,11 +2632,6 @@ static inline void DAC960_LA_write_hw_mbox(void __iomem *base, writeb(mbox->bytes[12], base + DAC960_LA_MBOX12_OFFSET); } -static inline unsigned char DAC960_LA_read_status_cmd_ident(void __iomem *base) -{ - return readb(base + DAC960_LA_STSID_OFFSET); -} - static inline unsigned short DAC960_LA_read_status(void __iomem *base) { return readw(base + DAC960_LA_STS_OFFSET); @@ -2828,11 +2799,6 @@ static inline void DAC960_PG_ack_hw_mbox_status(void __iomem *base) writel(DAC960_PG_IDB_HWMBOX_ACK_STS, base + DAC960_PG_IDB_OFFSET); } -static inline void DAC960_PG_gen_intr(void __iomem *base) -{ - writel(DAC960_PG_IDB_GEN_IRQ, base + DAC960_PG_IDB_OFFSET); -} - static inline void DAC960_PG_reset_ctrl(void __iomem *base) { writel(DAC960_PG_IDB_CTRL_RESET, base + DAC960_PG_IDB_OFFSET); @@ -2862,11 +2828,6 @@ static inline void DAC960_PG_ack_hw_mbox_intr(void __iomem *base) writel(DAC960_PG_ODB_HWMBOX_ACK_IRQ, base + DAC960_PG_ODB_OFFSET); } -static inline void DAC960_PG_ack_mem_mbox_intr(void __iomem *base) -{ - writel(DAC960_PG_ODB_MMBOX_ACK_IRQ, base + DAC960_PG_ODB_OFFSET); -} - static inline void DAC960_PG_ack_intr(void __iomem *base) { writel(DAC960_PG_ODB_HWMBOX_ACK_IRQ | DAC960_PG_ODB_MMBOX_ACK_IRQ, @@ -2880,13 +2841,6 @@ static inline bool DAC960_PG_hw_mbox_status_available(void __iomem *base) return odb & DAC960_PG_ODB_HWMBOX_STS_AVAIL; } -static inline bool DAC960_PG_mem_mbox_status_available(void __iomem *base) -{ - unsigned char odb = readl(base + DAC960_PG_ODB_OFFSET); - - return odb & DAC960_PG_ODB_MMBOX_STS_AVAIL; -} - static inline void DAC960_PG_enable_intr(void __iomem *base) { unsigned int imask = (unsigned int)-1; @@ -2902,13 +2856,6 @@ static inline void DAC960_PG_disable_intr(void __iomem *base) writel(imask, base + DAC960_PG_IRQMASK_OFFSET); } -static inline bool DAC960_PG_intr_enabled(void __iomem *base) -{ - unsigned int imask = readl(base + DAC960_PG_IRQMASK_OFFSET); - - return !(imask & DAC960_PG_IRQMASK_DISABLE_IRQ); -} - static inline void DAC960_PG_write_cmd_mbox(union myrb_cmd_mbox *mem_mbox, union myrb_cmd_mbox *mbox) { @@ -2931,12 +2878,6 @@ static inline void DAC960_PG_write_hw_mbox(void __iomem *base, writeb(mbox->bytes[12], base + DAC960_PG_MBOX12_OFFSET); } -static inline unsigned char -DAC960_PG_read_status_cmd_ident(void __iomem *base) -{ - return readb(base + DAC960_PG_STSID_OFFSET); -} - static inline unsigned short DAC960_PG_read_status(void __iomem *base) { @@ -3106,11 +3047,6 @@ static inline void DAC960_PD_ack_hw_mbox_status(void __iomem *base) writeb(DAC960_PD_IDB_HWMBOX_ACK_STS, base + DAC960_PD_IDB_OFFSET); } -static inline void DAC960_PD_gen_intr(void __iomem *base) -{ - writeb(DAC960_PD_IDB_GEN_IRQ, base + DAC960_PD_IDB_OFFSET); -} - static inline void DAC960_PD_reset_ctrl(void __iomem *base) { writeb(DAC960_PD_IDB_CTRL_RESET, base + DAC960_PD_IDB_OFFSET); @@ -3152,13 +3088,6 @@ static inline void DAC960_PD_disable_intr(void __iomem *base) writeb(0, base + DAC960_PD_IRQEN_OFFSET); } -static inline bool DAC960_PD_intr_enabled(void __iomem *base) -{ - unsigned char imask = readb(base + DAC960_PD_IRQEN_OFFSET); - - return imask & DAC960_PD_IRQMASK_ENABLE_IRQ; -} - static inline void DAC960_PD_write_cmd_mbox(void __iomem *base, union myrb_cmd_mbox *mbox) { From patchwork Thu Apr 15 22:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FF90C43470 for ; Thu, 15 Apr 2021 22:10:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56C77610FC for ; Thu, 15 Apr 2021 22:10:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236613AbhDOWKv (ORCPT ); Thu, 15 Apr 2021 18:10:51 -0400 Received: from mail-pl1-f180.google.com ([209.85.214.180]:39770 "EHLO mail-pl1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236614AbhDOWJM (ORCPT ); Thu, 15 Apr 2021 18:09:12 -0400 Received: by mail-pl1-f180.google.com with SMTP id u7so11069058plr.6 for ; Thu, 15 Apr 2021 15:08:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zH1LRW1VV4uLIOqSdoK6cThqjnNjGNHpFlDzcl/ziE8=; b=PBQcI+FSjvNoZU0hrHo7dzoV0k5h5eatqHAPEgnpLUb33hjUCWZGHLe0dBTwuS0h0X xnSYGSV014nIcfSQoqH6Fpg/JO8UFpAAn+LbY4UTDVtSOYCBm9Cnf8WlVRHoU7azqXin urNIpgI76xs/kAOz3FjRvAruLG1lTMoo3B9x1Gn1Wrs6pil/+BYcbp/sBaVbPXoMdZn5 iTDADK14AKdy7708Iw8LRT9jEN1XldCc+CXXm87bbt8pj8mzQ/Kw+DAeuxANfyi6s20+ BIdSugM+tXs4j8+EAahqDoY4TKWznJMammRML/wmPkrrLQd1IcNIdwpHn1QZGkgEI780 ivZQ== X-Gm-Message-State: AOAM530o4e8VXXlUm/NFDTtDz7RhO5Opmm+IKPrK3WMFgdCjIUla8Kyh /Eo/D8C/XiGAnKAdK/v8X26/aZARqJc= X-Google-Smtp-Source: ABdhPJyPNC2X8iYfYzLvB/NVJkxEaZSlvcckgfT+NKMk//kIuJBylHcprmhapeuMpCWGlY1S+o38EQ== X-Received: by 2002:a17:903:1c3:b029:e6:a15:751f with SMTP id e3-20020a17090301c3b02900e60a15751fmr6310059plh.44.1618524528752; Thu, 15 Apr 2021 15:08:48 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:48 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 11/20] myrs: Remove unused functions Date: Thu, 15 Apr 2021 15:08:17 -0700 Message-Id: <20210415220826.29438-12-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This was detected by building the kernel with clang and W=1. Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/scsi/myrs.c | 99 --------------------------------------------- 1 file changed, 99 deletions(-) diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index d5ec1cdea0e1..3b68c68d1716 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -2410,13 +2410,6 @@ static inline void DAC960_GEM_ack_hw_mbox_status(void __iomem *base) writel(val, base + DAC960_GEM_IDB_CLEAR_OFFSET); } -static inline void DAC960_GEM_gen_intr(void __iomem *base) -{ - __le32 val = cpu_to_le32(DAC960_GEM_IDB_GEN_IRQ << 24); - - writel(val, base + DAC960_GEM_IDB_READ_OFFSET); -} - static inline void DAC960_GEM_reset_ctrl(void __iomem *base) { __le32 val = cpu_to_le32(DAC960_GEM_IDB_CTRL_RESET << 24); @@ -2454,13 +2447,6 @@ static inline void DAC960_GEM_ack_hw_mbox_intr(void __iomem *base) writel(val, base + DAC960_GEM_ODB_CLEAR_OFFSET); } -static inline void DAC960_GEM_ack_mem_mbox_intr(void __iomem *base) -{ - __le32 val = cpu_to_le32(DAC960_GEM_ODB_MMBOX_ACK_IRQ << 24); - - writel(val, base + DAC960_GEM_ODB_CLEAR_OFFSET); -} - static inline void DAC960_GEM_ack_intr(void __iomem *base) { __le32 val = cpu_to_le32((DAC960_GEM_ODB_HWMBOX_ACK_IRQ | @@ -2477,14 +2463,6 @@ static inline bool DAC960_GEM_hw_mbox_status_available(void __iomem *base) return (le32_to_cpu(val) >> 24) & DAC960_GEM_ODB_HWMBOX_STS_AVAIL; } -static inline bool DAC960_GEM_mem_mbox_status_available(void __iomem *base) -{ - __le32 val; - - val = readl(base + DAC960_GEM_ODB_READ_OFFSET); - return (le32_to_cpu(val) >> 24) & DAC960_GEM_ODB_MMBOX_STS_AVAIL; -} - static inline void DAC960_GEM_enable_intr(void __iomem *base) { __le32 val = cpu_to_le32((DAC960_GEM_IRQMASK_HWMBOX_IRQ | @@ -2499,16 +2477,6 @@ static inline void DAC960_GEM_disable_intr(void __iomem *base) writel(val, base + DAC960_GEM_IRQMASK_READ_OFFSET); } -static inline bool DAC960_GEM_intr_enabled(void __iomem *base) -{ - __le32 val; - - val = readl(base + DAC960_GEM_IRQMASK_READ_OFFSET); - return !((le32_to_cpu(val) >> 24) & - (DAC960_GEM_IRQMASK_HWMBOX_IRQ | - DAC960_GEM_IRQMASK_MMBOX_IRQ)); -} - static inline void DAC960_GEM_write_cmd_mbox(union myrs_cmd_mbox *mem_mbox, union myrs_cmd_mbox *mbox) { @@ -2527,11 +2495,6 @@ static inline void DAC960_GEM_write_hw_mbox(void __iomem *base, dma_addr_writeql(cmd_mbox_addr, base + DAC960_GEM_CMDMBX_OFFSET); } -static inline unsigned short DAC960_GEM_read_cmd_ident(void __iomem *base) -{ - return readw(base + DAC960_GEM_CMDSTS_OFFSET); -} - static inline unsigned char DAC960_GEM_read_cmd_status(void __iomem *base) { return readw(base + DAC960_GEM_CMDSTS_OFFSET + 2); @@ -2676,11 +2639,6 @@ static inline void DAC960_BA_ack_hw_mbox_status(void __iomem *base) writeb(DAC960_BA_IDB_HWMBOX_ACK_STS, base + DAC960_BA_IDB_OFFSET); } -static inline void DAC960_BA_gen_intr(void __iomem *base) -{ - writeb(DAC960_BA_IDB_GEN_IRQ, base + DAC960_BA_IDB_OFFSET); -} - static inline void DAC960_BA_reset_ctrl(void __iomem *base) { writeb(DAC960_BA_IDB_CTRL_RESET, base + DAC960_BA_IDB_OFFSET); @@ -2712,11 +2670,6 @@ static inline void DAC960_BA_ack_hw_mbox_intr(void __iomem *base) writeb(DAC960_BA_ODB_HWMBOX_ACK_IRQ, base + DAC960_BA_ODB_OFFSET); } -static inline void DAC960_BA_ack_mem_mbox_intr(void __iomem *base) -{ - writeb(DAC960_BA_ODB_MMBOX_ACK_IRQ, base + DAC960_BA_ODB_OFFSET); -} - static inline void DAC960_BA_ack_intr(void __iomem *base) { writeb(DAC960_BA_ODB_HWMBOX_ACK_IRQ | DAC960_BA_ODB_MMBOX_ACK_IRQ, @@ -2731,14 +2684,6 @@ static inline bool DAC960_BA_hw_mbox_status_available(void __iomem *base) return val & DAC960_BA_ODB_HWMBOX_STS_AVAIL; } -static inline bool DAC960_BA_mem_mbox_status_available(void __iomem *base) -{ - u8 val; - - val = readb(base + DAC960_BA_ODB_OFFSET); - return val & DAC960_BA_ODB_MMBOX_STS_AVAIL; -} - static inline void DAC960_BA_enable_intr(void __iomem *base) { writeb(~DAC960_BA_IRQMASK_DISABLE_IRQ, base + DAC960_BA_IRQMASK_OFFSET); @@ -2749,14 +2694,6 @@ static inline void DAC960_BA_disable_intr(void __iomem *base) writeb(0xFF, base + DAC960_BA_IRQMASK_OFFSET); } -static inline bool DAC960_BA_intr_enabled(void __iomem *base) -{ - u8 val; - - val = readb(base + DAC960_BA_IRQMASK_OFFSET); - return !(val & DAC960_BA_IRQMASK_DISABLE_IRQ); -} - static inline void DAC960_BA_write_cmd_mbox(union myrs_cmd_mbox *mem_mbox, union myrs_cmd_mbox *mbox) { @@ -2776,11 +2713,6 @@ static inline void DAC960_BA_write_hw_mbox(void __iomem *base, dma_addr_writeql(cmd_mbox_addr, base + DAC960_BA_CMDMBX_OFFSET); } -static inline unsigned short DAC960_BA_read_cmd_ident(void __iomem *base) -{ - return readw(base + DAC960_BA_CMDSTS_OFFSET); -} - static inline unsigned char DAC960_BA_read_cmd_status(void __iomem *base) { return readw(base + DAC960_BA_CMDSTS_OFFSET + 2); @@ -2926,11 +2858,6 @@ static inline void DAC960_LP_ack_hw_mbox_status(void __iomem *base) writeb(DAC960_LP_IDB_HWMBOX_ACK_STS, base + DAC960_LP_IDB_OFFSET); } -static inline void DAC960_LP_gen_intr(void __iomem *base) -{ - writeb(DAC960_LP_IDB_GEN_IRQ, base + DAC960_LP_IDB_OFFSET); -} - static inline void DAC960_LP_reset_ctrl(void __iomem *base) { writeb(DAC960_LP_IDB_CTRL_RESET, base + DAC960_LP_IDB_OFFSET); @@ -2962,11 +2889,6 @@ static inline void DAC960_LP_ack_hw_mbox_intr(void __iomem *base) writeb(DAC960_LP_ODB_HWMBOX_ACK_IRQ, base + DAC960_LP_ODB_OFFSET); } -static inline void DAC960_LP_ack_mem_mbox_intr(void __iomem *base) -{ - writeb(DAC960_LP_ODB_MMBOX_ACK_IRQ, base + DAC960_LP_ODB_OFFSET); -} - static inline void DAC960_LP_ack_intr(void __iomem *base) { writeb(DAC960_LP_ODB_HWMBOX_ACK_IRQ | DAC960_LP_ODB_MMBOX_ACK_IRQ, @@ -2981,14 +2903,6 @@ static inline bool DAC960_LP_hw_mbox_status_available(void __iomem *base) return val & DAC960_LP_ODB_HWMBOX_STS_AVAIL; } -static inline bool DAC960_LP_mem_mbox_status_available(void __iomem *base) -{ - u8 val; - - val = readb(base + DAC960_LP_ODB_OFFSET); - return val & DAC960_LP_ODB_MMBOX_STS_AVAIL; -} - static inline void DAC960_LP_enable_intr(void __iomem *base) { writeb(~DAC960_LP_IRQMASK_DISABLE_IRQ, base + DAC960_LP_IRQMASK_OFFSET); @@ -2999,14 +2913,6 @@ static inline void DAC960_LP_disable_intr(void __iomem *base) writeb(0xFF, base + DAC960_LP_IRQMASK_OFFSET); } -static inline bool DAC960_LP_intr_enabled(void __iomem *base) -{ - u8 val; - - val = readb(base + DAC960_LP_IRQMASK_OFFSET); - return !(val & DAC960_LP_IRQMASK_DISABLE_IRQ); -} - static inline void DAC960_LP_write_cmd_mbox(union myrs_cmd_mbox *mem_mbox, union myrs_cmd_mbox *mbox) { @@ -3025,11 +2931,6 @@ static inline void DAC960_LP_write_hw_mbox(void __iomem *base, dma_addr_writeql(cmd_mbox_addr, base + DAC960_LP_CMDMBX_OFFSET); } -static inline unsigned short DAC960_LP_read_cmd_ident(void __iomem *base) -{ - return readw(base + DAC960_LP_CMDSTS_OFFSET); -} - static inline unsigned char DAC960_LP_read_cmd_status(void __iomem *base) { return readw(base + DAC960_LP_CMDSTS_OFFSET + 2); From patchwork Thu Apr 15 22:08:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B2FDC433B4 for ; Thu, 15 Apr 2021 22:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 144EB610FC for ; Thu, 15 Apr 2021 22:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236628AbhDOWJQ (ORCPT ); Thu, 15 Apr 2021 18:09:16 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:43999 "EHLO mail-pg1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236535AbhDOWJN (ORCPT ); Thu, 15 Apr 2021 18:09:13 -0400 Received: by mail-pg1-f173.google.com with SMTP id p12so17851799pgj.10 for ; Thu, 15 Apr 2021 15:08:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/40ULsOzuBJGbirgNhlsl95kB4g+ICHnH0SncregTg0=; b=ANWnxpZQAfso126LYe1i/A8y87ndXY987rCqOQ7UMWFKRfkhy7EPnYCZg+RmxEfVj6 r0Mnwy+78wRmsDRwHP4fi+U3G7S/W+Mosialf9fxaXvAgFdiQ4r+s7HFd3uDVlKwGQy/ fcWvZq4ALBAfLSkCGbZrqf3Rigbc8hZUqTYElyC56V3U6SxXAfJ1vEPV3jtJ+58q6qcE 4Z+x60X9zlgbqPQYOCB1vC/S+esLtlcgnCrVZS6rpBaLX+zX03D/XJnK9gIuGGsllXuH fPWe+jA7LYZGOzdFy0fsWW+KAAzm+2+6mK4Uzky1YCZG5JfJwktdZ0UpO8rRCDfRy3mM Ldig== X-Gm-Message-State: AOAM532/OqO4NS1Q+nYZWzEE/iPSRdTSO6v9gUdFvQjevbFJfBzruSfT +72NZTm2Qz7GvfjRKvivLso= X-Google-Smtp-Source: ABdhPJzp1L4XpqBsEJvyA6Iq5R+eH+nIX3rclPx4Y5CMqJdxRGCxxn8xNwXjI0+BGSUOdAgjil6UWA== X-Received: by 2002:aa7:88c6:0:b029:250:bf78:a4a3 with SMTP id k6-20020aa788c60000b0290250bf78a4a3mr4947740pff.70.1618524529931; Thu, 15 Apr 2021 15:08:49 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:49 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Nilesh Javali , Manish Rangankar Subject: [PATCH v2 12/20] qla4xxx: Remove an unused function Date: Thu, 15 Apr 2021 15:08:18 -0700 Message-Id: <20210415220826.29438-13-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This was detected by building the kernel with clang and W=1. Cc: Nilesh Javali Acked-by: Manish Rangankar Signed-off-by: Bart Van Assche --- drivers/scsi/qla4xxx/ql4_nx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index e6e35e6958f6..66a487795c53 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -3634,12 +3634,6 @@ flash_conf_addr(struct ql82xx_hw_data *hw, uint32_t faddr) return hw->flash_conf_off | faddr; } -static inline uint32_t -flash_data_addr(struct ql82xx_hw_data *hw, uint32_t faddr) -{ - return hw->flash_data_off | faddr; -} - static uint32_t * qla4_82xx_read_flash_data(struct scsi_qla_host *ha, uint32_t *dwptr, uint32_t faddr, uint32_t length) From patchwork Thu Apr 15 22:08:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0543BC43461 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB0A2610FB for ; Thu, 15 Apr 2021 22:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236649AbhDOWJR (ORCPT ); Thu, 15 Apr 2021 18:09:17 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:34611 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236589AbhDOWJP (ORCPT ); Thu, 15 Apr 2021 18:09:15 -0400 Received: by mail-pj1-f42.google.com with SMTP id em21-20020a17090b0155b029014e204a81e6so5391672pjb.1 for ; Thu, 15 Apr 2021 15:08:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ao+1gjnM4zv5kQxaxG+NtayTZuJSXP+ga3mJvJUCkuU=; b=cKNwO/i22thQco+gc3aSmmqPFuET/R4bCuMRMTEoTzxTT0fJPL9GDh+EBLBCTQFRIZ lQ6IqbgihnFNeVosCwzue1GTVHTTZMM/1Hv2ZICiHSWXG2W7qb8PFXRctgq/jygMPtGP cIloBwreOm5OLZ9OWKUSyX0eeOepb5EJtjvwXPsH/k8o1jm2YmhjoeDqqX6IhR5ZKG52 SmcHMmea57LZ0wsfV9iCWE8GbmjoJlh9CcDDiAqCIEqNoVY+o05X/uaRbyALDj3xFqgM 4MYNZfTqgm18Ole58UfuaiSrvjQzRV1IOFSdCTZbAbwyMrjV+Cs5n77Q9jYoRGbun7Oi eOHQ== X-Gm-Message-State: AOAM532F2EfHNtICkrq3X0jK/IoJ9O+69syHPUxZ78lsvrlQUXcKc8dS rz3CWQDbe3BQNUOCuLTuOP4= X-Google-Smtp-Source: ABdhPJzd6VTG7eqg8bXCFP1SLrHCVfklRBQ64U++r7XNB0Hmk9ur12A+7XHeIHPPQvlKrXIZOruJWA== X-Received: by 2002:a17:90a:5b11:: with SMTP id o17mr6436408pji.32.1618524531063; Thu, 15 Apr 2021 15:08:51 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:50 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Don Brace Subject: [PATCH v2 13/20] smartpqi: Remove unused functions Date: Thu, 15 Apr 2021 15:08:19 -0700 Message-Id: <20210415220826.29438-14-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This was detected by building the kernel with clang and W=1. Cc: Don Brace Signed-off-by: Bart Van Assche --- drivers/scsi/smartpqi/smartpqi_init.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 3b0f281daa2b..80d5c00379ee 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -443,11 +443,6 @@ static inline void pqi_cancel_rescan_worker(struct pqi_ctrl_info *ctrl_info) cancel_delayed_work_sync(&ctrl_info->rescan_work); } -static inline void pqi_cancel_event_worker(struct pqi_ctrl_info *ctrl_info) -{ - cancel_work_sync(&ctrl_info->event_work); -} - static inline u32 pqi_read_heartbeat_counter(struct pqi_ctrl_info *ctrl_info) { if (!ctrl_info->heartbeat_counter) @@ -4828,11 +4823,6 @@ static inline int pqi_enable_events(struct pqi_ctrl_info *ctrl_info) return pqi_configure_events(ctrl_info, true); } -static inline int pqi_disable_events(struct pqi_ctrl_info *ctrl_info) -{ - return pqi_configure_events(ctrl_info, false); -} - static void pqi_free_all_io_requests(struct pqi_ctrl_info *ctrl_info) { unsigned int i; From patchwork Thu Apr 15 22:08:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 469B5C43460 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1783D610F7 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236573AbhDOWJS (ORCPT ); Thu, 15 Apr 2021 18:09:18 -0400 Received: from mail-pl1-f181.google.com ([209.85.214.181]:41979 "EHLO mail-pl1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236606AbhDOWJQ (ORCPT ); Thu, 15 Apr 2021 18:09:16 -0400 Received: by mail-pl1-f181.google.com with SMTP id e2so8571938plh.8 for ; Thu, 15 Apr 2021 15:08:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZN3MZuHTHJ4rNU+gilbE6/v3nJ1AHPWmwmhT/kjNJ/I=; b=tvfip9zHVZvwMTy9nOkrM01ytI0PpRbKuMYfWVy2A0X71hmUnrG254TMF2zwrTtui6 Jy9QSzXJ0jN6P+Ja57Xzm2EeWM4DAwub5PdPJ2cx0qwHRJxevv3Ct9XTd3hQYCSdBDIZ dYpVpLVrTsCj2D4r4Tmm8DmWjMQMcaR3Y4TLagO2ZRKN1tQt4/T6mlCI6Px42xKhMRIq g27V7Py8rkxCYfs9oHP6sVWvAxmxgide2CbkEJNQnCJ3xzutuHkBXf3EEWCNM1mpCxdV JMCWqZEAqMXxxX0lFVJzNVNEvIARmLI6bYwXDUbciSZ8aNL3LwbI/AppRdGWMks1NmDT Q1Xg== X-Gm-Message-State: AOAM532pB5AgzB7Fjs/fLpxOEaZaqVZZwXUF48x0zjPtI6+z0SAbyNuH S3fC1S80xergLp6DfeWSS2Q= X-Google-Smtp-Source: ABdhPJwVXuv+15PpvqrVNlTFY4/6swCwGRfSvKsxF7Gm/ci6pyq4sqc8SyMrZqUFA/iB3t8VK2fWjQ== X-Received: by 2002:a17:90a:c781:: with SMTP id gn1mr6262083pjb.205.1618524532181; Thu, 15 Apr 2021 15:08:52 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:51 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 14/20] 53c700: Open-code status_byte(u8) calls Date: Thu, 15 Apr 2021 15:08:20 -0700 Message-Id: <20210415220826.29438-15-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The 53c700 driver is one of the two drivers that passes an u8 argument to status_byte() instead of an s32 argument. Open-code status_byte in preparation of changing SCSI status values into a structure. Cc: "James E.J. Bottomley" Signed-off-by: Bart Van Assche --- drivers/scsi/53c700.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 4fd91f81244d..ab42feab233f 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -981,8 +981,8 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, NCR_700_FINISHED_TAG_NEGOTIATION); /* check for contingent allegiance conditions */ - if(status_byte(hostdata->status[0]) == CHECK_CONDITION || - status_byte(hostdata->status[0]) == COMMAND_TERMINATED) { + if (hostdata->status[0] >> 1 == CHECK_CONDITION || + hostdata->status[0] >> 1 == COMMAND_TERMINATED) { struct NCR_700_command_slot *slot = (struct NCR_700_command_slot *)SCp->host_scribble; if(slot->flags == NCR_700_FLAG_AUTOSENSE) { From patchwork Thu Apr 15 22:08:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE84FC43470 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85076610F7 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236606AbhDOWJS (ORCPT ); Thu, 15 Apr 2021 18:09:18 -0400 Received: from mail-pj1-f49.google.com ([209.85.216.49]:35782 "EHLO mail-pj1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236569AbhDOWJR (ORCPT ); Thu, 15 Apr 2021 18:09:17 -0400 Received: by mail-pj1-f49.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so15227379pjb.0 for ; Thu, 15 Apr 2021 15:08:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YMKuvSuStmi+Y5MBD+/AJkPa4jmcUESw9esKkMO9iHU=; b=lRiNefsJwfkuD5Iukdwq5Pyi7tnzbRkMxAGB5/oadpDbH16JEoBsxSfcrEwub8pHBa deS9H6bPFq1yOb68V1KRyPnS3oWHlZuTD3sOFSoYOmB0zZTZzGreeML0UMVt8I/59cXn azhKra95FE3AoqlhWyd+EZKr7kmASbmUuzrufYNHbO7QubUFgHbH5Ngxl1ps1sc873jg Zdy4ShAf2Z2PkTk8xkfP4WJCacIyBlfBknBOjc9B3V13eJT1lYEJ68frOk+WSk9LkHGA xMVHSX/r+okjdPtTTdssWKwBdyrreXF76HHtHLNyZZPdGzT4U64R73rOyDae2qAnOwAp 86ew== X-Gm-Message-State: AOAM532wYN2rNnv8Y3RaiV7bIg/o6i5EHyBPTArZSpmJGP3+bsnr1UIs 2i0MGQ6xhtZiWfUGkgqMt28= X-Google-Smtp-Source: ABdhPJxWdD9RjVlrKoUWvN1jQUIT3V2tNmDDDFiM40lx1Zn/ck6l08cAd6k6mJW/i+I59tMp6x88Aw== X-Received: by 2002:a17:90a:a589:: with SMTP id b9mr2265139pjq.80.1618524533270; Thu, 15 Apr 2021 15:08:53 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:52 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 15/20] dc395x: Open-code status_byte(u8) calls Date: Thu, 15 Apr 2021 15:08:21 -0700 Message-Id: <20210415220826.29438-16-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The dc395x driver is one of the two drivers that passes an u8 argument to status_byte() instead of an s32 argument. Open-code status_byte() in preparation of changing SCSI status values into a structure. Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/scsi/dc395x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 1e9ec4d8c605..be87d5a7583d 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -3258,10 +3258,10 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, /* * target status.......................... */ - if (status_byte(status) == CHECK_CONDITION) { + if (status >> 1 == CHECK_CONDITION) { request_sense(acb, dcb, srb); return; - } else if (status_byte(status) == QUEUE_FULL) { + } else if (status >> 1 == QUEUE_FULL) { tempcnt = (u8)list_size(&dcb->srb_going_list); dprintkl(KERN_INFO, "QUEUE_FULL for dev <%02i-%i> with %i cmnds\n", dcb->target_id, dcb->target_lun, tempcnt); From patchwork Thu Apr 15 22:08:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CEE3C43462 for ; Thu, 15 Apr 2021 22:08:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 03301610F7 for ; Thu, 15 Apr 2021 22:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236569AbhDOWJT (ORCPT ); Thu, 15 Apr 2021 18:09:19 -0400 Received: from mail-pl1-f173.google.com ([209.85.214.173]:36494 "EHLO mail-pl1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236637AbhDOWJS (ORCPT ); Thu, 15 Apr 2021 18:09:18 -0400 Received: by mail-pl1-f173.google.com with SMTP id z22so7753496plo.3 for ; Thu, 15 Apr 2021 15:08:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xaz2gGbraDbegGathgoxn2YQGI6l3GdxLG9x+mNykh0=; b=DbGsYQCeC++LW9SYkLq6tHNK8rXF2A9P25IHWZnK22MZTITQr9l5Yi/S7Cqmbju/CL 6r0viubOCXWTjjNaGtzGesmhf2UHweaett2TByuVWAx2b/gUiqgtm+CTAgB+vSr9FVWz 1SM2ZIbQnvzEmcNq8IGF/fz0NUUocmjRyasFbfG6+zu9N1dzH1GXN4jpXFCnTt8C3ZOT UmqwhhRMvSsboBV2SE7o8QABbHkIVSEx4C3Rp8Rqph2RMjZkgzqbWK6DxHUDtXVMOzYN Gpme0W3RhuJ6B5sEhcZwZtDBYukCPb5gLcYZ+PQyz4gFyrnpdRur7VGfcEsI+Al0Jkqh uP+g== X-Gm-Message-State: AOAM533jqheLBKRQqyi8DTdXnoP8351qNAT15D0yT/CHttTxTTuggu5v f5UrqrEebmdINBDhHm4KZ6U= X-Google-Smtp-Source: ABdhPJzMHQB7/eiDViaz+17nZ63PhBcwpDYgSf3JacnJHqTcHr8I3EykZg5jya0Hyo33MfVYBR20Qw== X-Received: by 2002:a17:90a:6407:: with SMTP id g7mr5950512pjj.206.1618524534437; Thu, 15 Apr 2021 15:08:54 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:53 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Hannes Reinecke , Daniel Wagner Subject: [PATCH v2 16/20] sd: Introduce a new local variable in sd_check_events() Date: Thu, 15 Apr 2021 15:08:22 -0700 Message-Id: <20210415220826.29438-17-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Instead of using 'retval' to represent first a SCSI status and later whether or not a disk change event occurred, introduce a new variable for the latter purpose. Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche --- drivers/scsi/sd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 91c34ee972c7..cb3c37d1e009 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1623,6 +1623,7 @@ static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing) struct scsi_disk *sdkp = scsi_disk_get(disk); struct scsi_device *sdp; int retval; + bool disk_changed; if (!sdkp) return 0; @@ -1680,10 +1681,10 @@ static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing) * Medium present state has changed in either direction. * Device has indicated UNIT_ATTENTION. */ - retval = sdp->changed ? DISK_EVENT_MEDIA_CHANGE : 0; + disk_changed = sdp->changed; sdp->changed = 0; scsi_disk_put(sdkp); - return retval; + return disk_changed ? DISK_EVENT_MEDIA_CHANGE : 0; } static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr) From patchwork Thu Apr 15 22:08:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75B7AC433B4 for ; Thu, 15 Apr 2021 22:08:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CF40610FB for ; Thu, 15 Apr 2021 22:08:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236613AbhDOWJU (ORCPT ); Thu, 15 Apr 2021 18:09:20 -0400 Received: from mail-pj1-f50.google.com ([209.85.216.50]:37655 "EHLO mail-pj1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236580AbhDOWJT (ORCPT ); Thu, 15 Apr 2021 18:09:19 -0400 Received: by mail-pj1-f50.google.com with SMTP id e8-20020a17090a7288b029014e51f5a6baso8188316pjg.2 for ; Thu, 15 Apr 2021 15:08:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ocHOwrYqm9AUi6V9vYkRBF8Zd84TLHxRiJTc4dUOmZ8=; b=INwkp8aWmKKgyJHKZFhIawj0+ZITcP08y4OBrluDWedi2zgeyyVWin4BqQDn+eQc4p 24oXiDsasNpIjam2jSjVQv81h0gH/MPlUZfGPQtqGjWY6IMK4R1QmUoYRJVNpvVJuniA 9kq7ubzQ+IQ4JrQz/dpbyZVtdWaiqtDRQMYPMMId8tmv5Y78F+6GXpnFfYf90HPre/xY tFekHfam1kf7ibD8Fwzhds96wnUmtQ0OEnF9LDqD8kMKmMBtZ+Gr7qQ8MYrVTgiGz/rP Iu4SdX/co26pajWjhJMH+3uCyMLRb/E1xuuuyXaxYtMRcye4PCsuFavpuF56WdowlLRB O15A== X-Gm-Message-State: AOAM531h0X6YDyGaAlgfjb5EkMYbLmjT9A/l/zFwUyhdi6liItRxBEJs 3cXk1PhwVA3OfvnJUWphIW0= X-Google-Smtp-Source: ABdhPJz1uZOoLBkyrT/MzjBeJgkqOQYLcMbLtFjETQKAckF3hB8t+ET02vv+fHDM5InTT03vZSA2kw== X-Received: by 2002:a17:90a:5407:: with SMTP id z7mr6346470pjh.228.1618524535534; Thu, 15 Apr 2021 15:08:55 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:54 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Mike Christie Subject: [PATCH v2 17/20] target: Compare explicitly with SAM_STAT_GOOD Date: Thu, 15 Apr 2021 15:08:23 -0700 Message-Id: <20210415220826.29438-18-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Instead of leaving it implicit that SAM_STAT_GOOD == 0, compare explicitly with SAM_STAT_GOOD. Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche --- drivers/target/target_core_pscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 1c9aeab93477..dac44caf77a3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1046,7 +1046,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) int result = scsi_req(req)->result; u8 scsi_status = status_byte(result) << 1; - if (scsi_status) { + if (scsi_status != SAM_STAT_GOOD) { pr_debug("PSCSI Status Byte exception at cmd: %p CDB:" " 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0], result); From patchwork Thu Apr 15 22:08:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD683C433B4 for ; Thu, 15 Apr 2021 22:09:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7DF3610F7 for ; Thu, 15 Apr 2021 22:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236609AbhDOWJZ (ORCPT ); Thu, 15 Apr 2021 18:09:25 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:33494 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236580AbhDOWJU (ORCPT ); Thu, 15 Apr 2021 18:09:20 -0400 Received: by mail-pf1-f178.google.com with SMTP id a85so16559899pfa.0 for ; Thu, 15 Apr 2021 15:08:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HrsA+ZTOIXIqQ4alvqQ4RqCZAMiCw/ZE0lPl71+WLCc=; b=mXIOM8bzXv1XyUg9Ug3JYF0w8BncJiYUm4Bit+ykg0eQcEzRo1znGpo+bFGIcQeTGy y9PxTRvvoa9ee3Gkexb8+79rzNLR9tIbzfyAnp4nTJW4OmMRRoVRg4B+rBCJ40LUZuwP J9oLJ5AlZrj+t6ZhegXP/ejJnp4M/kx/n/OkXNtztsfvXydgC+4AtXm9qzAmW1ZttGDv HPnpRV++UP91hnNwDtS+leZRafFjUo75m8iq8/tqj+yJ866UUUxQujaGmMKFW4mF4LtG 0kgFcxhLOueHfsGVzE1dVe/W8o8K7kBakw7f7sEaE+Vln5WA5+geU21TRxjGyL07bDUv wd6g== X-Gm-Message-State: AOAM531acV6t2BLMlEIYLrX5CHbKK0UnlLxKZjCQ/HTPakB8hNiOi91w 0mIVVgQ1Q/UiJSJbvqp/81o= X-Google-Smtp-Source: ABdhPJykeVp8b4NzZ6+AeLYiDvUVOemQ9Qt1bdUGYyie8TgTfRFF/4FYhNw9KfiGmU2YojLU4C12Qg== X-Received: by 2002:a63:6c83:: with SMTP id h125mr5277459pgc.50.1618524536619; Thu, 15 Apr 2021 15:08:56 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:56 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Mike Christie Subject: [PATCH v2 18/20] target: Fix two format specifiers Date: Thu, 15 Apr 2021 15:08:24 -0700 Message-Id: <20210415220826.29438-19-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use format specifier '%u' to format the u32 data type instead of '%hu'. Cc: Mike Christie Signed-off-by: Bart Van Assche --- drivers/target/target_core_pr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index d61dc166bc5f..6fd5fec95539 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -1637,8 +1637,7 @@ core_scsi3_decode_spec_i_port( } dest_tpg = tmp_tpg; - pr_debug("SPC-3 PR SPEC_I_PT: Located %s Node:" - " %s Port RTPI: %hu\n", + pr_debug("SPC-3 PR SPEC_I_PT: Located %s Node: %s Port RTPI: %u\n", dest_tpg->se_tpg_tfo->fabric_name, dest_node_acl->initiatorname, dest_rtpi); @@ -1675,8 +1674,7 @@ core_scsi3_decode_spec_i_port( dest_se_deve = core_get_se_deve_from_rtpi(dest_node_acl, dest_rtpi); if (!dest_se_deve) { - pr_err("Unable to locate %s dest_se_deve" - " from destination RTPI: %hu\n", + pr_err("Unable to locate %s dest_se_deve from destination RTPI: %u\n", dest_tpg->se_tpg_tfo->fabric_name, dest_rtpi); From patchwork Thu Apr 15 22:08:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 423046 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0A6FC433ED for ; Thu, 15 Apr 2021 22:09:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97ED0610FB for ; Thu, 15 Apr 2021 22:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236605AbhDOWJ0 (ORCPT ); Thu, 15 Apr 2021 18:09:26 -0400 Received: from mail-pl1-f180.google.com ([209.85.214.180]:38854 "EHLO mail-pl1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236594AbhDOWJV (ORCPT ); Thu, 15 Apr 2021 18:09:21 -0400 Received: by mail-pl1-f180.google.com with SMTP id y2so12879148plg.5 for ; Thu, 15 Apr 2021 15:08:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C9geURtvhgy0oh6Os7QkxpkalLgF/JNjljCUvvDlLko=; b=CSIbgRwwvqaaPvsiUluB/WLvvqFVNb3ZTxXjBgKbIUU5+65AZqSmkZFtqVopIeE7YY /bzewWVpx7FZBEJGQYIzd3QMcA65MXNxOcjgftEZV2gZUUu09G8TEKWxOJ1DRmryG+fH 7u0IqHUqACp4w2EiEGn7ON4pDw0u4gP58FZHLK4SPb9rBB3k4ZhlVDS0+WrFEdndtVEb /QyXEhE2W67dFJmIJBS+tWZh3eM5bVTNVCRtm2qek35Lq2NOsVVJNLZj3OPqCKLMR1WD Z7kKJgl0EX0hPCFlBC6TfTcZKOapmPF70HWxGB7UMQsD16qzsyfZslFV/emXM1IDb8xs /oqg== X-Gm-Message-State: AOAM533n6GO9UvlENaN3NM8OjVgEq21F291sRVyL3C3reib5zGdDtyjw 9RDzsX3+MLhV/OIDSo4Hb6g= X-Google-Smtp-Source: ABdhPJzCBN9+snMpinSF0D7bWfbb1zt5DJIwmgLG5NTZrPM0vUb/Wb5lp3QZQSORLBxo/CBKGoxejQ== X-Received: by 2002:a17:90a:34c5:: with SMTP id m5mr6052192pjf.147.1618524537790; Thu, 15 Apr 2021 15:08:57 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:57 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Mike Christie Subject: [PATCH v2 19/20] target: Shorten ALUA error messages Date: Thu, 15 Apr 2021 15:08:25 -0700 Message-Id: <20210415220826.29438-20-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Do not print tg_pt_gp->tg_pt_gp_valid_id if we already know that it is zero. Cc: Mike Christie Signed-off-by: Bart Van Assche --- drivers/target/target_core_configfs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 9cb1ca8421c8..4b2e49341ad6 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2745,8 +2745,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item, int new_state, ret; if (!tg_pt_gp->tg_pt_gp_valid_id) { - pr_err("Unable to do implicit ALUA on non valid" - " tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id); + pr_err("Unable to do implicit ALUA on invalid tg_pt_gp ID\n"); return -EINVAL; } if (!target_dev_configured(dev)) { @@ -2797,9 +2796,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store( int new_status, ret; if (!tg_pt_gp->tg_pt_gp_valid_id) { - pr_err("Unable to do set ALUA access status on non" - " valid tg_pt_gp ID: %hu\n", - tg_pt_gp->tg_pt_gp_valid_id); + pr_err("Unable to set ALUA access status on invalid tg_pt_gp ID\n"); return -EINVAL; } @@ -2852,9 +2849,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store( \ int ret; \ \ if (!t->tg_pt_gp_valid_id) { \ - pr_err("Unable to do set " #_name " ALUA state on non" \ - " valid tg_pt_gp ID: %hu\n", \ - t->tg_pt_gp_valid_id); \ + pr_err("Unable to set " #_name " ALUA state on invalid tg_pt_gp ID\n"); \ return -EINVAL; \ } \ \ From patchwork Thu Apr 15 22:08:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 422109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6024C43460 for ; Thu, 15 Apr 2021 22:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBC8A61103 for ; Thu, 15 Apr 2021 22:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236580AbhDOWJ0 (ORCPT ); Thu, 15 Apr 2021 18:09:26 -0400 Received: from mail-pj1-f50.google.com ([209.85.216.50]:42861 "EHLO mail-pj1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236653AbhDOWJW (ORCPT ); Thu, 15 Apr 2021 18:09:22 -0400 Received: by mail-pj1-f50.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so13501295pjv.1 for ; Thu, 15 Apr 2021 15:08:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/VodvlU3eNTY3fPH2GywD3E7jf85irbiftvc47Tcplg=; b=KHIabLcwm7xc4cEySft9GC4r/ONKzM+0MWm5nbAUhKbdPdagSw2AUwsagoVLaizfFF jqtikv+5D6WRpB4Kvr1r2HX7YY19b8c8UOw2odUoE05f0ziRumShb5qbegdpZQRIlO9T wnF4de+O8p+Q6t+oH5eiPchE9mOVW3LrEWluvtp6t1XO73HhuE4EOaMN5AurEm0cNgUh jXSzOf0HLf2JAi4IYboXctem+8Rs1MSWj1jKieuSctEwNMedX3np6gb6SVbBAAMIAQ4h vRWIFDdsP06nWc+i1NhQFWd+iJhfHjYgeFNU+VhE1dyw9kQ4peJpsAbQB0c5M9XPqciI jOMw== X-Gm-Message-State: AOAM530WdH0tgJzyoH8MDm4Qwri4yPyf2/ztEMeoR/WMAR7KRdPCDzZ+ X720vbNp3iMYnIE+sIYlfgM= X-Google-Smtp-Source: ABdhPJw9QqBaFbKeH3zwJXncSMd4gEkCKBhs3FK8SJuG5CuGxwre8jpsokQUVYbxYnHoGTSyV+Minw== X-Received: by 2002:a17:90a:bd8c:: with SMTP id z12mr6283609pjr.83.1618524538860; Thu, 15 Apr 2021 15:08:58 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:f031:1d3a:7e95:2876]) by smtp.gmail.com with ESMTPSA id w4sm3311155pjk.55.2021.04.15.15.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 15:08:58 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Hannes Reinecke Subject: [PATCH v2 20/20] target/tcm_fc: Fix a kernel-doc header Date: Thu, 15 Apr 2021 15:08:26 -0700 Message-Id: <20210415220826.29438-21-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org> References: <20210415220826.29438-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the function name in the kernel-doc header above ft_prli(). Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- drivers/target/tcm_fc/tfc_sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index 23ce506d5402..593540da9346 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c @@ -410,7 +410,7 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len, } /** - * tcm_fcp_prli() - Handle incoming or outgoing PRLI for the FCP target + * ft_prli() - Handle incoming or outgoing PRLI for the FCP target * @rdata: remote port private * @spp_len: service parameter page length * @rspp: received service parameter page (NULL for outgoing PRLI)