From patchwork Tue Apr 13 17:06:55 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: 420569 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.7 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 C8757C433ED for ; Tue, 13 Apr 2021 17:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB3F6613B7 for ; Tue, 13 Apr 2021 17:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347071AbhDMRHm (ORCPT ); Tue, 13 Apr 2021 13:07:42 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:37507 "EHLO mail-pj1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347068AbhDMRHl (ORCPT ); Tue, 13 Apr 2021 13:07:41 -0400 Received: by mail-pj1-f44.google.com with SMTP id e8-20020a17090a7288b029014e51f5a6baso4010552pjg.2 for ; Tue, 13 Apr 2021 10:07:22 -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=PdJFkoJzXRb0jL4k/y599upw7UPIXxZdzCNS8xD139VrmwcJ9QRg6rDeukMA2QU+Jn HTReSVY2u6lPtMKZI516uOLbbV32AikEr/hSd8gOYwYnhMvW5NIqpKvXuwlhcnSGFcWf UZcvd/yGPUlBxei+D3BcTpoV8WT/SHSxu4O38XAF7/zj2Wf8sLHSOunLAosdw9tkCTFa OiqYoVHpxIXLzAf91VNHQuFyBj5wd9GJG29ydVdcjL9v1phV+k3dWsnxkTvSU3ix0Xby oOPZVaawZ7lDxlw8lTAQKtfiK+rycgiqpzxW73TNLni/Kkrc06Lk26twFrhgy6kOsInD Hbmg== X-Gm-Message-State: AOAM531Dwatk/nuI8jYzoeAxv3QzxZfBA7hq8hABBa0p5yAqIf2R8FFc bCD5L8CKpDHJNlOWXwXM09k= X-Google-Smtp-Source: ABdhPJxwAGslvNWEU/i3ZnSEPYPteOhMqDvvK1EuFZLWYUSVhXXxnCK31Xrv7+7hwLyRYCmIru/rjg== X-Received: by 2002:a17:90a:a895:: with SMTP id h21mr1064174pjq.13.1618333642009; Tue, 13 Apr 2021 10:07:22 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:21 -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 01/20] Make the scsi_alloc_sgtables() documentation more accurate Date: Tue, 13 Apr 2021 10:06:55 -0700 Message-Id: <20210413170714.2119-2-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:06:56 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: 421467 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.7 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 4F942C433ED for ; Tue, 13 Apr 2021 17:07:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C5D1613B6 for ; Tue, 13 Apr 2021 17:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347080AbhDMRHp (ORCPT ); Tue, 13 Apr 2021 13:07:45 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:36541 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347072AbhDMRHn (ORCPT ); Tue, 13 Apr 2021 13:07:43 -0400 Received: by mail-pj1-f42.google.com with SMTP id f2-20020a17090a4a82b02900c67bf8dc69so11031438pjh.1 for ; Tue, 13 Apr 2021 10:07:23 -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=Ts9na5wb+6MmmRvkyfl+sDtUkoVr6mITPtRA1P1E0ytkwJ0TjDk8eRNaoBDaR+fzpR R08LDc/EGuwCs5Zzg3+Wkpn7WHDzS7bqlyX9qeH/15A88yfzDW2MD+TTzKZPKuS5kltR B25IDNMnBHBmJXq2X7wyj69QQfvsUSem1CGsRx2MLI3LTKrUZpgvqol3kPwdNWIDA+vj URPALxGtk0+xRX6ewYBn+iSFaDmfF78u7cShz5C4B2c19G+Lh01xMRS34+HlmnU1zyVq +hjVBqcLmzhmozRvIJV5aT3muafk0d2mJjGCdQZA5aKGY0kzoGA/jhdhk8JjDJqpyjQt MyQg== X-Gm-Message-State: AOAM531U11/PAqgTmPxkRil1gFI0wspG2eXdNqAGlxPAUYT7bxHKfjVJ CbCRrt1B77vDkqvY2rBwFFw= X-Google-Smtp-Source: ABdhPJyPAr2JNVZpgLjkPo9m+ojHKh0g4zPS2nDSoDZlHjvLTqMCoOgPgSDlfIupLSt9O7FRZU7GcA== X-Received: by 2002:a17:90b:3b4a:: with SMTP id ot10mr1054696pjb.48.1618333643248; Tue, 13 Apr 2021 10:07:23 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:22 -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 02/20] Remove an incorrect comment Date: Tue, 13 Apr 2021 10:06:56 -0700 Message-Id: <20210413170714.2119-3-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:06:57 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: 420568 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.7 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 1BAE3C433B4 for ; Tue, 13 Apr 2021 17:07:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 002BB613B6 for ; Tue, 13 Apr 2021 17:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347085AbhDMRHq (ORCPT ); Tue, 13 Apr 2021 13:07:46 -0400 Received: from mail-pl1-f171.google.com ([209.85.214.171]:34484 "EHLO mail-pl1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347074AbhDMRHo (ORCPT ); Tue, 13 Apr 2021 13:07:44 -0400 Received: by mail-pl1-f171.google.com with SMTP id t22so8252188ply.1 for ; Tue, 13 Apr 2021 10:07:24 -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=QizS3za0RJMfw4j1uQqija54Ci6H9VFKfrKR8bKgw61CAU2vHiX1DOnbIttaR2DMx0 ZHoouPcx2ytxigiX9jjvNtG8F7+2E4UVyaw6ZvlmCR/NCPX5ucDQNQA8x+Bmx3ow+mkL 4K7t+JNepMZicNf9gqgl2kVxcAPPoVZvLJxWY8hgX2nS+ryybpGNtPgAtOuceq5zKUmI 8MGiyMMtEk2K+jvaQoNGdvljzC/3NR/cL5qs3h7R4VyqrCa3xqs0BWqrfLW2WYicCJH2 b/4BH6EIVv1C5ocqVinvOYde1J25er0UKDrhp5fxsGp2KlGFZF3F0B0G8TGKyrGMjqYa vnpg== X-Gm-Message-State: AOAM533jO9N2Oo7r+sQYohzx2kAW1wjGrtVUhDjNrsps9Mrnh0cLUCBR iMoXv+kL9bh4JxLTH0OqIK8= X-Google-Smtp-Source: ABdhPJzsO797x7VYuKEyiJoLEuexqAA0t4fgsf4OMKmMXu6lwnl6K9X5LtPM+0EDa1hUmQTqCE8cZw== X-Received: by 2002:a17:90a:588b:: with SMTP id j11mr1040962pji.170.1618333644532; Tue, 13 Apr 2021 10:07:24 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:24 -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 03/20] Rename scsi_softirq_done() into scsi_complete() Date: Tue, 13 Apr 2021 10:06:57 -0700 Message-Id: <20210413170714.2119-4-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:06:58 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: 420566 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.7 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 ADDACC433B4 for ; Tue, 13 Apr 2021 17:07:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89182613B6 for ; Tue, 13 Apr 2021 17:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347092AbhDMRH6 (ORCPT ); Tue, 13 Apr 2021 13:07:58 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:39613 "EHLO mail-pj1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347094AbhDMRHu (ORCPT ); Tue, 13 Apr 2021 13:07:50 -0400 Received: by mail-pj1-f54.google.com with SMTP id ot17-20020a17090b3b51b0290109c9ac3c34so11016660pjb.4 for ; Tue, 13 Apr 2021 10:07:30 -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=pM2Mgptbo9ZHN9U8GVWTTJWRRwno3EMpwAEgvQW/5GcTQZQesA+CrqbBJvT0FveFb4 0GJc5dKOAoPT3ObbsPmBEOoyShPZ0DZlrJcHYbVUepzostDosvHltAPHhMNBO4qZB1Ww vPA4AvTL+nT7RWGuoxE39rW771PhmFglflN6Vh21NkbW+ulzWUKr51aolldit+tQhaog 5/rF+jDWgDzMkWSqFK4rt6YXFvW6ecrl1C0YwB2WdNVBM/iAsNNc6THjHqBAr/xo43mR 8QdpzxhWK9vbO7brLt2fcjGvxPFVDTp1K9TDKgrAgNVHwMJhvVH8/39XfzZ26gW0WoNh jOkA== X-Gm-Message-State: AOAM531hAF5qH4+7yR21PusRbA5EgmYMgynS+CJIGMrdFI96g1W0QTG2 44FjyH61ZnwvGJretzrvbAc= X-Google-Smtp-Source: ABdhPJwyCCqe0YYdjhkRPfnwII+pA/ccpXV0woiJZKGot6KT40d1nBfFqiAVK6bMNqsMipcRA4KTFw== X-Received: by 2002:a17:902:b709:b029:e7:49bd:6833 with SMTP id d9-20020a170902b709b02900e749bd6833mr33446183pls.57.1618333645696; Tue, 13 Apr 2021 10:07:25 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:25 -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 04/20] Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case Date: Tue, 13 Apr 2021 10:06:58 -0700 Message-Id: <20210413170714.2119-5-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:06:59 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: 421466 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.7 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 B2175C433ED for ; Tue, 13 Apr 2021 17:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E48860C3E for ; Tue, 13 Apr 2021 17:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347088AbhDMRHv (ORCPT ); Tue, 13 Apr 2021 13:07:51 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:36750 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347087AbhDMRHr (ORCPT ); Tue, 13 Apr 2021 13:07:47 -0400 Received: by mail-pf1-f177.google.com with SMTP id b26so6693197pfr.3 for ; Tue, 13 Apr 2021 10:07:27 -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=T4sDWAhC8O96F3Z8Tok33tJ0ZoazOzca6MQI8yPcxnLVO9WI0pygmC6CCTWHadhxyR fD/Gl4rXc+8TKR0l1k+zBNFB4MlGoTrwUrzvdDVSods2eu3D3kRR/LOv8+uOOrWwvoS4 ylgFg7t3RZxf4UTWpCD3n2OZzAweoRb10Fc2Frx/NYyjGyWiziKx+EmnWA+JLzLeMObN 7J0mMaNSIyzoiAJelYZ9mWNymt1Sj5KJK4aOSt7AvzO0QKRXbwxYbqFyWEkzTzb/67P8 6SP5zNA4U+K+f/IJvHgwXM6y/fDOFaGZQmjq4CK5eXDx3Bn2DtCP3IyKDGeeCHtfPd9I obnQ== X-Gm-Message-State: AOAM5315dRWzF2aEzcp2P8guDYHC7zUnS9uN6xrgAH3z939yEY3fGVvX CWUU3hVheAqAYePGwsrbbCA= X-Google-Smtp-Source: ABdhPJx8DxseS/NbxgDWkLjyt9RJM2XFDub2SvPMtib8y+vUcc/P/0kqsA8s6LuqoClvWkcp37Nywg== X-Received: by 2002:a63:3e06:: with SMTP id l6mr32974911pga.140.1618333646956; Tue, 13 Apr 2021 10:07:26 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:26 -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 05/20] Introduce enum scsi_disposition Date: Tue, 13 Apr 2021 10:06:59 -0700 Message-Id: <20210413170714.2119-6-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:00 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: 420567 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.7 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 41B48C433B4 for ; Tue, 13 Apr 2021 17:07:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2550F613B6 for ; Tue, 13 Apr 2021 17:07:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244458AbhDMRHw (ORCPT ); Tue, 13 Apr 2021 13:07:52 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:44743 "EHLO mail-pf1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347068AbhDMRHs (ORCPT ); Tue, 13 Apr 2021 13:07:48 -0400 Received: by mail-pf1-f169.google.com with SMTP id m11so11836718pfc.11 for ; Tue, 13 Apr 2021 10:07:28 -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=rMNn829W0jasUgWoMPxZP5VrHsfPXNzYOr/jzPHHObRhrN4c1fOnW0zKpdZvFAECjw v3sU3naCHcQHPuhoqTDYSxHSpTlyqkdRAPLjSMvihYxDdWIEx24i1THkVRxOYBczAfoq eiy0Ld8XfhWcwQyYZxzhg8H8LLIbNkihKC4H/qYblkUdM5AIRV9pcbEWJthUfNP4+9ss n45rMXqmQKCYtNqsk/nwq/ffl+gbAyjkuenDODBXIKbNoRTSXfbPcGcqMgE/UL6gueii hrv0s/Eza7fxQey2Q7b+LJUqOL7mF1lc/XrgpRoy/n2yV/YnUInRBwoZmCh57BKwfksv YjbQ== X-Gm-Message-State: AOAM530QLT8/nq7z08cUmVGTadW3epb0sTGhFd1ex2XPyw1VFxgJ7xy4 gSJXJQa7IRDPJOOcAcqGQ40= X-Google-Smtp-Source: ABdhPJwLjMjTN8R44v2mBmGwy9MLKCpKC62rHSmtmGcvi9JROJUdhx9rF1jtgONVriSrXn/2alJINg== X-Received: by 2002:a63:af51:: with SMTP id s17mr32147749pgo.405.1618333648180; Tue, 13 Apr 2021 10:07:28 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:27 -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 06/20] aacraid: Remove an unused function Date: Tue, 13 Apr 2021 10:07:00 -0700 Message-Id: <20210413170714.2119-7-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:01 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: 421465 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.7 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 96253C43460 for ; Tue, 13 Apr 2021 17:07:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 754C5613BA for ; Tue, 13 Apr 2021 17:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347099AbhDMRHw (ORCPT ); Tue, 13 Apr 2021 13:07:52 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:34403 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347090AbhDMRHt (ORCPT ); Tue, 13 Apr 2021 13:07:49 -0400 Received: by mail-pf1-f178.google.com with SMTP id 10so2957935pfl.1 for ; Tue, 13 Apr 2021 10:07:29 -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=aHJuEXhqJmJCBOINtwNidT0cBHHfuKhAAtKormOKH3SCb/Y6MW+ooJ5NHt+xGRCzf0 AwVdTFa00Pg7ci8I0WSxCnUtIw5x53iovW96cnwP8S/8nWqy8OHnDYpISiPJeOSQzMLb exAG7t5ZprBb9YytMahAPkqZlcfHIxlB1RhKGrCYvcI9AOoBKP1DY0emGGV75DvVjr/H gbr8o1xqY6e4kmpX9vvkQFn/Ca9lW1jxHIXdAZQy2I1Qt2H4X1qQN4tig3+0F6oUxRJI 18lpdqeAe1bMhMShtbr/sebCjMpNsztiipQ0TLrHqLryL7DV4lOAZ4V1lIOGLjudN8V4 8Xbg== X-Gm-Message-State: AOAM5330tataxz6+dJ3K+eFV0fYaq7LNOKyaq1HYioJysH+oMI10AdOt ecXfUe8eWz5u3z3Un10W4dM= X-Google-Smtp-Source: ABdhPJxmmi0pKZV86vq2yXUE4ypKSOrqFu4lyEEGyUEvS/hXFnKH7wYelypwR0z1626eb9pcXc25Ng== X-Received: by 2002:a65:43c9:: with SMTP id n9mr3046151pgp.19.1618333649270; Tue, 13 Apr 2021 10:07:29 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:28 -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 07/20] libfc: Fix a format specifier Date: Tue, 13 Apr 2021 10:07:01 -0700 Message-Id: <20210413170714.2119-8-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:02 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: 421464 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.7 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 32827C433ED for ; Tue, 13 Apr 2021 17:07:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15482613B8 for ; Tue, 13 Apr 2021 17:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347110AbhDMRH7 (ORCPT ); Tue, 13 Apr 2021 13:07:59 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:46871 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347093AbhDMRHu (ORCPT ); Tue, 13 Apr 2021 13:07:50 -0400 Received: by mail-pg1-f176.google.com with SMTP id t140so12379904pgb.13 for ; Tue, 13 Apr 2021 10:07:30 -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=JBUplI6k+7Oqkxk10/ty2yttDhw/BH/ofItlq8mQAfnxQiSd4l2AfX7HbQedtQVAbS myDO3iHDmrg10s4ozKSmRt8mVCI6I+9zbznGpNSk9fHgmumA/P/pN/ZjP1HdWaPjsSC5 4OqfasPhMtTXAJ/9OTpwW6LizsybSMjDCrKYcbSpQxId+b1MBli8GRZH8pb6pR2REw1G 4cYBDaWbU6jywwtdq5aWDix6rsBLLMUrI3T8+e9zTqwkfupX2JUzU7EvKa7WcNIl4FTi bqXF9QO6ZgFGHd77F5Pgwv1TZZBXsjEbflYJRomfczCNFRclNZOMQDBpcs4oW2wiva51 yZAw== X-Gm-Message-State: AOAM5318OaJdewiCh7ne3DuDT8k5WqBwFnCq6boZ+6N35+VltBmbr6U1 I99zwg36mgnFRyTYHVUEqFw= X-Google-Smtp-Source: ABdhPJwo6b01WnuS89QISFZwIDRy4ASQwT4W7mO/gNPvNzZ3Z5H7lHHsaYCg8gojhmzVWzTPHnS4uA== X-Received: by 2002:a63:6a05:: with SMTP id f5mr33314804pgc.433.1618333650408; Tue, 13 Apr 2021 10:07:30 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:29 -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 08/20] fcoe: Suppress a compiler warning Date: Tue, 13 Apr 2021 10:07:02 -0700 Message-Id: <20210413170714.2119-9-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:03 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: 420565 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.7 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 6CDD9C433B4 for ; Tue, 13 Apr 2021 17:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43753613B8 for ; Tue, 13 Apr 2021 17:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347112AbhDMRIB (ORCPT ); Tue, 13 Apr 2021 13:08:01 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:33625 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347096AbhDMRHv (ORCPT ); Tue, 13 Apr 2021 13:07:51 -0400 Received: by mail-pg1-f176.google.com with SMTP id t22so12429577pgu.0 for ; Tue, 13 Apr 2021 10:07:32 -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=jlia9mFkxf+1O2GS+1+5o6VXqsIZLpimcEJ8NdFf5fo=; b=ACbM/S8wu+5UNHMP+yiK3KezvG4qk2lHLc9oDi7nMUMKq9hq/hae843czaQSHcJvpB vpQ8+wuwU7qTapfawxiF0VrUMeVM3osxIooiUotvswEzXUs7c3HlZu2p4IbAgAxQzb/S LkdJ8ObyZFj7FGhyWMy7YpGy5tbZRYNnAoZ37h9WAAJX6rSttKATVwrr2MjjLzuHgnZB e3ClI9PUa3KZx4AAGzTJ5UNM47hmVWBCsumsDv6vQj7WVSN6fguZfCucyz6oFZxt0K5C omgn2FWVU0vbaNwamHmqfh9QowG+PdXqU1phQoKV4dfqv3hPN1P+N4A1xsqnFufXApYi GLKA== X-Gm-Message-State: AOAM533Q6NsH3nV/cTJEjQSofVLv5eoU3N/21k3wlVsVbes1HVoqQH9w 6LSaTayOlUZeEqW1ON9tDFZgvkx23LTycQ== X-Google-Smtp-Source: ABdhPJzzIP7O+z3nvx2Ejgl/Vfigg3DlEFFaAvmVUVDJ9mZUb9IZfvcG8MNv/nPTl6KEuF7M0PurYQ== X-Received: by 2002:a62:5cc7:0:b029:24b:3525:9dbd with SMTP id q190-20020a625cc70000b029024b35259dbdmr13511804pfb.3.1618333651609; Tue, 13 Apr 2021 10:07:31 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:31 -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 , Lee Duncan , Chris Leech Subject: [PATCH 09/20] iscsi: Suppress two clang format mismatch warnings Date: Tue, 13 Apr 2021 10:07:03 -0700 Message-Id: <20210413170714.2119-10-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Suppress two instances of the following clang compiler warning: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat] Cc: Lee Duncan Cc: Chris Leech Signed-off-by: Bart Van Assche --- drivers/scsi/libiscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 7ad11e42306d..0c3082d09712 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -3587,10 +3587,11 @@ int iscsi_conn_get_addr_param(struct sockaddr_storage *addr, case ISCSI_PARAM_CONN_PORT: case ISCSI_PARAM_LOCAL_PORT: if (sin) - len = sprintf(buf, "%hu\n", be16_to_cpu(sin->sin_port)); + len = sprintf(buf, "%hu\n", + (u16)be16_to_cpu(sin->sin_port)); else len = sprintf(buf, "%hu\n", - be16_to_cpu(sin6->sin6_port)); + (u16)be16_to_cpu(sin6->sin6_port)); break; default: return -EINVAL; From patchwork Tue Apr 13 17:07:04 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: 421463 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.7 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 6469BC433B4 for ; Tue, 13 Apr 2021 17:07:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46E28613B6 for ; Tue, 13 Apr 2021 17:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347114AbhDMRIB (ORCPT ); Tue, 13 Apr 2021 13:08:01 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:40670 "EHLO mail-pj1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347097AbhDMRHw (ORCPT ); Tue, 13 Apr 2021 13:07:52 -0400 Received: by mail-pj1-f42.google.com with SMTP id b8-20020a17090a5508b029014d0fbe9b64so11011035pji.5 for ; Tue, 13 Apr 2021 10:07:33 -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=JXqcO0mo1jvQhCkUZbSKFvuMevaaxD+UwFr0GsG4WejN33q/u+kz6gw6ZUiHs8Byt6 lRaEFhTAgSWppVvdEuvGRC1hh8q5VuqSY/TcGx77pWs19mu3RJLWOoqUNRGCBPlcRWZl 4B0Dc0bOEEZNgjJ6/NWWQalCaWX/XVqCKHXTc8F6SaN3K6sYB8LquJvZChZqhiyChkRq fdOJK0F5Y8dD2I5E0WDuzsB0pHmUL+JW8pC3oA6IkyTrnH9cZzykHeBxUVFm71daf7jx DmF/cN8N7oypvvoPEs15/TzBkpLCKH8uah/1iSy8/Zu+DoEI0RF1Zxe8wywwMcgDNEvM 8a0Q== X-Gm-Message-State: AOAM532rNt47ZynZeLR99IrGeCV8/7IeTstByUienlUCtOY1eXaAbYLp AnHfmEDgt0gRH3EvmuHkIbeVJrNXwXbpmA== X-Google-Smtp-Source: ABdhPJwKJC8vnPML3Y1TMvyphTThWW2fVXodOHLabLzDA8nKX89PnGxgEh95MH3Z9QwfZSuf0+24Xg== X-Received: by 2002:a17:90b:1d88:: with SMTP id pf8mr1058713pjb.114.1618333652840; Tue, 13 Apr 2021 10:07:32 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:32 -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 10/20] mpt3sas: Fix two kernel-doc headers Date: Tue, 13 Apr 2021 10:07:04 -0700 Message-Id: <20210413170714.2119-11-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:05 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: 420564 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.7 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 6697EC433ED for ; Tue, 13 Apr 2021 17:07:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C2D7613B7 for ; Tue, 13 Apr 2021 17:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347121AbhDMRIE (ORCPT ); Tue, 13 Apr 2021 13:08:04 -0400 Received: from mail-pj1-f45.google.com ([209.85.216.45]:54021 "EHLO mail-pj1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347102AbhDMRHy (ORCPT ); Tue, 13 Apr 2021 13:07:54 -0400 Received: by mail-pj1-f45.google.com with SMTP id t23so8798056pjy.3 for ; Tue, 13 Apr 2021 10:07:34 -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=Z3Cl9SUOIeMdaBK3R+kQYSJRdkh/jn5xtU9a3o/llCEABCJgqfndbRClmpYUHorAUC wGsIyc+AAegjCYXPEtW7DhJ4wfvpfNyrgUjJFJzqyIMzptgOCkdXwmV//DDdtnZB8H9H UII608+LyNfihW0tMVexz/MVz/78LNkHapC2C6Wn/ToSP3RL2ItU8B2FPYQtW1XE88RN ZV4GUshPUbkgtwDYYafVa7nYDcNG29owZaUC1cc8fFgaK9+jdbcBFAxbHEElksPnJzxt Q4aSTzoeJrFOzrNdutaWi/Arh+dNcC18Q4PYHfXTZjVj3/xKtUAC2+G7BLNxTdMh8zSI 3zZg== X-Gm-Message-State: AOAM530cWLWj3uAbkpZNMgZEqFmbkvxHyj8Yz21epVCEZoGs2a0S6PUN VNAnL2wweNkIuHX/sYiVCUlKvjHbmzLpLw== X-Google-Smtp-Source: ABdhPJyRXWoDXMiCqXNcPqQJRrRf8cJt9deffflCHJWNcQd1y7qbnqZKrxORRuQYstgo7aPWSBnpmQ== X-Received: by 2002:a17:90a:6582:: with SMTP id k2mr1036073pjj.11.1618333653950; Tue, 13 Apr 2021 10:07:33 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:33 -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 11/20] myrb: Remove unused functions Date: Tue, 13 Apr 2021 10:07:05 -0700 Message-Id: <20210413170714.2119-12-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07:06 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: 421462 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.7 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 2D68CC433B4 for ; Tue, 13 Apr 2021 17:07:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13DC0613A9 for ; Tue, 13 Apr 2021 17:07:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344208AbhDMRIH (ORCPT ); Tue, 13 Apr 2021 13:08:07 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:43829 "EHLO mail-pj1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347105AbhDMRHz (ORCPT ); Tue, 13 Apr 2021 13:07:55 -0400 Received: by mail-pj1-f44.google.com with SMTP id x21-20020a17090a5315b029012c4a622e4aso9325943pjh.2 for ; Tue, 13 Apr 2021 10:07:35 -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=Zi347CZoaqcjGJRfiUa3JhEnE7YQfImdFWv8rsckmu7y4cSySzuRPTJoJ1gT8X6T3J 3Z27ernjmA714iM13zQuqEAUSkLHG7dKTp3WV+aWysn6+H+NUKOi84UHjY8o9MbLvM0m 8rRZpGM/PYVsah04jvO+ZHBtRe81S6r0XYW5xMQKtbYWKG8WDK2xkx3KXl1r/+q9I/od R89CJcsc1G8l612rKG7xUWz8fC1t6jFiBdMe7oliZDZBXr3h/K5XqgDZ1dDetKqHjUcc PRR4WRLbD8k53ZyZj6nHSbW8GnbD3AMUO0aI8y20DxhJGhFV2eJuNvavkI1PGGFGUzpI kmBw== X-Gm-Message-State: AOAM530SuvYgXS8NhRIqNBNJiQMgVPaSAZ7VftPV0E1ylM4Ztrb7mde7 qgXBFBMDEMsA+FA6Rd15qvc= X-Google-Smtp-Source: ABdhPJwdsH2oHQ/9vKYITGtNnrzc+yqwnC7WBKW5iCU42kQO404uVn6abzta0gPbsyeGywP8OScvUQ== X-Received: by 2002:a17:90a:314:: with SMTP id 20mr1104489pje.72.1618333655342; Tue, 13 Apr 2021 10:07:35 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:34 -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 12/20] myrs: Remove unused functions Date: Tue, 13 Apr 2021 10:07:06 -0700 Message-Id: <20210413170714.2119-13-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07: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: 420563 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.7 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 3BA7EC43460 for ; Tue, 13 Apr 2021 17:07:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E3B1613B6 for ; Tue, 13 Apr 2021 17:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347101AbhDMRIH (ORCPT ); Tue, 13 Apr 2021 13:08:07 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:38725 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347107AbhDMRH5 (ORCPT ); Tue, 13 Apr 2021 13:07:57 -0400 Received: by mail-pg1-f179.google.com with SMTP id w10so12400637pgh.5 for ; Tue, 13 Apr 2021 10:07: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=KyzGQZGlaIODTSdYd0HFN+mM1e1JJYuhpfCa7VaCvm8=; b=OquyHRlvSiWmbzwwPFACnFcCQ/m29IYYs3JJPADPsKF0OLwD9phoRam2l5HOJkr3FT /opwRM1j7RhXr9BzvXPrnCkpfldL81RHK82gey7IuiajJjK9I2JhoWGoUcqKdPxIQBC2 HAGDF9WpazgZ7uxdUquIAs9V/ZHrsJCJ1g/NseGgAW7JvM7Tqm5NWGadkSSF73Xf+WgT t+DBNp3JUvdD2JZQ44QyiZ4nhLhaIYEN4jWRYO4iOoBzvd2k4eZCPhviyy9miB/kbX29 5z6m83L/+6Pjva8bijPxZhESsCNvbDH9ICHNVrTYEblbzFOEPvg+SeMtSK7ERsEMNSHA 9wwA== X-Gm-Message-State: AOAM5317rOxgyUopQy8hDJWALEWke2xb/o/YZuL1Lwqu5SA6i1vkZqos 0Jdlnmz9/TB4LzUqs96y4vk= X-Google-Smtp-Source: ABdhPJzLvlDX04JFDZTE//UXVv8YujspKtaLmDUOnu1N5uA30bepnxUNiRvjmw84fXn52wCrDXol7w== X-Received: by 2002:a62:160c:0:b029:20a:7b41:f10f with SMTP id 12-20020a62160c0000b029020a7b41f10fmr29949276pfw.67.1618333656505; Tue, 13 Apr 2021 10:07:36 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:35 -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 13/20] qla4xxx: Remove an unused function Date: Tue, 13 Apr 2021 10:07:07 -0700 Message-Id: <20210413170714.2119-14-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Cc: 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 Tue Apr 13 17:07: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: 421461 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.7 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 1001FC433ED for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDEF7613B6 for ; Tue, 13 Apr 2021 17:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347116AbhDMRIJ (ORCPT ); Tue, 13 Apr 2021 13:08:09 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:38694 "EHLO mail-pf1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347108AbhDMRH5 (ORCPT ); Tue, 13 Apr 2021 13:07:57 -0400 Received: by mail-pf1-f179.google.com with SMTP id y16so11844204pfc.5 for ; Tue, 13 Apr 2021 10:07: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=Ao+1gjnM4zv5kQxaxG+NtayTZuJSXP+ga3mJvJUCkuU=; b=Xb9E3lXLyiir3IFU59SkBQPnPpQ2lR/4Fhxb86i+VgSxZqi3xvySpc9jNBqK/AK3x2 8jSOMdmjkGso6lVR4EZtKkIHWa6mVCvKrTGC0KWwz+7plXFGADhZkv+rpb5wE+vtrOc5 jiWeqjnS/+vIugOfzr82zg7TR7b252HKR1y0oCakY5Q1GgLLKBTPHHxUe6CxobjQsibf Rf8+qG1JD4q/8zR8RSf5owUAOvRVzneoG1YoWoX7pYnAPBy/pPkYDMNBI3M3nHmZ5uAt kQCmxzyqU/O1ihwjKptGbiLLMqJNPKqkHPtBR23LpRBVdGuocKsPeNNfgDkGgIa/fVch h/Vw== X-Gm-Message-State: AOAM533wBkwFtLkDFNuE2X2WXMaCDgwiEp+dnzbz8AN49R5rAwZGPgxu /fcsuhESXK1iMy9QE4Mf2y4= X-Google-Smtp-Source: ABdhPJy9OP850yN48GnFIKjHf9SjtwzA4AnEAr+Q2aRsYth2ZFOjkvS4YN8+8+21KMTrXKGG4bo1SQ== X-Received: by 2002:a05:6a00:16d0:b029:249:adf8:6fb8 with SMTP id l16-20020a056a0016d0b0290249adf86fb8mr15798999pfc.58.1618333657748; Tue, 13 Apr 2021 10:07:37 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 , Don Brace Subject: [PATCH 14/20] smartpqi: Remove unused functions Date: Tue, 13 Apr 2021 10:07:08 -0700 Message-Id: <20210413170714.2119-15-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07: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: 421458 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.7 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 C2473C43461 for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC3C5613B7 for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347128AbhDMRIK (ORCPT ); Tue, 13 Apr 2021 13:08:10 -0400 Received: from mail-pf1-f173.google.com ([209.85.210.173]:33436 "EHLO mail-pf1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347094AbhDMRH7 (ORCPT ); Tue, 13 Apr 2021 13:07:59 -0400 Received: by mail-pf1-f173.google.com with SMTP id a85so11395150pfa.0 for ; Tue, 13 Apr 2021 10:07: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=ZN3MZuHTHJ4rNU+gilbE6/v3nJ1AHPWmwmhT/kjNJ/I=; b=GUpDWhC8FWZrbZoXEgYH3ZNjPmdOzrodigcFcH74WxgJ/xcTcczghczb7v2toyy1X6 3J9qZDOTogY1qGunGFZVKkVC40ZtpcIVW8stYUbUCk75+Zooy+BIhCNXmskxgotdakEP B1Dib92oRy3y9IR3jR6EadSBkKUaIrP/U5INyWAJYI/GEDnyxak8Ua1rOsN4AOmDraIk KZqGKzTkrXJldhtXX3OXWbh4UDIM1ZJlV2yH2+xvAotq0t/Hp0gEL/UO2i+nrpj9+C8C 8B2MnabhttIR3fkRlLkOeenfL01FEQzxLtzJ6Wj16BHdD8NjRHgXc0V6gZ5bE866Z9PJ /ZNw== X-Gm-Message-State: AOAM530Xw8uCZxTM0ulJln62cOO5yLsofeMRIRfUSQYYcwRxN5NkSXXl v7+miSeUf0gIqlFMkl8Piw9JtSgszps6LQ== X-Google-Smtp-Source: ABdhPJz3WBLR6eztDTMTUaPgNxmOU6TC/G86GP4jAPT7UW9vQWVFP4tBNtND2g9MuMARvWQ2Cdn4nw== X-Received: by 2002:a62:2943:0:b029:24b:f35d:2565 with SMTP id p64-20020a6229430000b029024bf35d2565mr12294817pfp.52.1618333659171; Tue, 13 Apr 2021 10:07:39 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 , "James E.J. Bottomley" Subject: [PATCH 15/20] 53c700: Open-code status_byte(u8) calls Date: Tue, 13 Apr 2021 10:07:09 -0700 Message-Id: <20210413170714.2119-16-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07: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: 420562 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.7 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 8A90BC433B4 for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71137613B7 for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347108AbhDMRIK (ORCPT ); Tue, 13 Apr 2021 13:08:10 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:34553 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347091AbhDMRIA (ORCPT ); Tue, 13 Apr 2021 13:08:00 -0400 Received: by mail-pg1-f181.google.com with SMTP id z16so12389267pga.1 for ; Tue, 13 Apr 2021 10:07:40 -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=MqJp6XP03tZgL+gsyd7rGI+ORqjCIKyoYrQ0i3EpoyRGoPE4e1EY6b6xnIkt6nrFSX dChPSKJkAeQD+MFuShY566/2l4OPilNp2D/zHYx7tBYl6CWq+1hdp6cgGZvoA+1MDllQ E74LChyVr2XKAE6WWnklca1za7lcpDbJCID0Mq/nlQmo3aQa/F6Nrkk1QbIp2Q1FcFR9 B45RvXAKYVlKlOlCu4IlSDtbW3SMErAHFB+SsmKWtGj544CDUKiKXyopW6+e9du7VYHT RXZ6iVKOzNSWsrs3MuYzA6x70rZ6n6UDzc6Tbu4IAq66uSBq1/hb2QGXBx9ciP+nURxl USUw== X-Gm-Message-State: AOAM531+t06Sra/cG/Ilqz3sZv6uxgCaD4MVlxoUephZ3DlQG6FbTqXc 1I6jhKWuWCK09i7BFOMzPo0= X-Google-Smtp-Source: ABdhPJwvhbPlZVnPFhv2Y6Xqsj/+2RfYAH/FG1g29A8wfu0gbhz+UnRfgLsn0AE1jXo+cdojULZcmA== X-Received: by 2002:aa7:9f45:0:b029:24e:6fe8:5bf0 with SMTP id h5-20020aa79f450000b029024e6fe85bf0mr8394542pfr.79.1618333660292; Tue, 13 Apr 2021 10:07:40 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 , Hannes Reinecke Subject: [PATCH 16/20] dc395x: Open-code status_byte(u8) calls Date: Tue, 13 Apr 2021 10:07:10 -0700 Message-Id: <20210413170714.2119-17-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07: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: 420561 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.7 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 1B964C43462 for ; Tue, 13 Apr 2021 17:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0412B613B7 for ; Tue, 13 Apr 2021 17:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347130AbhDMRIL (ORCPT ); Tue, 13 Apr 2021 13:08:11 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:34412 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347096AbhDMRIB (ORCPT ); Tue, 13 Apr 2021 13:08:01 -0400 Received: by mail-pf1-f172.google.com with SMTP id 10so2958289pfl.1 for ; Tue, 13 Apr 2021 10:07: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=Xaz2gGbraDbegGathgoxn2YQGI6l3GdxLG9x+mNykh0=; b=cUptomzjqb086jXG8LF1mU0+pp7ukdYpq4WkpHJhRwo0YRAm/9vyBSb8HkkbDV0ibp Ld1qM3Vpgo9fg4oUzneSditGh0F9WEB3FC8LcE3e/2W7wjza4iOm8+/ORE5vS5+wPXc9 sjuSJDA6lrhKvcLTusJVB9CX68oBoimje7YvpVdXrYNqs9/smm1Yp39zV/rlbpTZsxgi h6bCkCpZ59AxAm0IBrDO3/8528g05VDLqXrJDAlXbBn8dCNHCGplZWO571f62pyWv+UV zy/9oFLm8bXpj9JOZrJOjDai7YClylPjsLVz0Ka9/EdrEGtPpiCj72SEZShah/NC5Pzp nutA== X-Gm-Message-State: AOAM532vhjKS1e6ztBJQspTd3GzlKrja5cClRlkkzEdEdvstqHjHcenI rXI8gNYHw0E+O61y+0hfmZE= X-Google-Smtp-Source: ABdhPJzwOEPnPAEyq7QbzMQVI7rVmsgjVgvkDzBoJRx79uG9/DSGM8zK/e1HzPivXaehWsnA/GRXKg== X-Received: by 2002:a05:6a00:1511:b029:24c:e3f9:cce6 with SMTP id q17-20020a056a001511b029024ce3f9cce6mr10793447pfu.28.1618333661486; Tue, 13 Apr 2021 10:07:41 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07:40 -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 17/20] sd: Introduce a new local variable in sd_check_events() Date: Tue, 13 Apr 2021 10:07:11 -0700 Message-Id: <20210413170714.2119-18-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 Tue Apr 13 17:07: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: 421460 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.7 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 56AA1C43460 for ; Tue, 13 Apr 2021 17:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38E84613B7 for ; Tue, 13 Apr 2021 17:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347131AbhDMRIL (ORCPT ); Tue, 13 Apr 2021 13:08:11 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:38735 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347115AbhDMRIC (ORCPT ); Tue, 13 Apr 2021 13:08:02 -0400 Received: by mail-pg1-f179.google.com with SMTP id w10so12400836pgh.5 for ; Tue, 13 Apr 2021 10:07: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=QoCVFea0rBzcHUxlyOuca8dkEEiPNeb8FPBb/uBAino=; b=ONsxeWq8NEtQzuwUeiDsCkX07ribWknIHx3KgLNbpD5DQLOjWndA0sIzYDfSAq651H /cBH0p8nQAGaRfgYvoNLXxrfBYJQSLnRX4DRvpCQiqprrxgbNSN9X4AFluWpShmYo1M6 lzzk7rxDFn3Kv0rgeDiUEwgxCR1hV3u+z3Uchy7zo3qe4lLaRhfvSOaGcHMGUK0G71Bz 9yL2/HAI3gyz1WukjotyNdIYJw8OFYzagqRLT/h6BMNN8ne8JGShxwkqWIyfwOwUbqN5 rUDb5kArc3puI6C3icNw7qmzqQH2ZihtaFy66LnWcWYmoF9RFS/7BSV7O5nvkT7tG8nc IHwQ== X-Gm-Message-State: AOAM531fuiP6IMeBAShlfsUXsK+HJQWBzDmtU0c1p60YO8V1J1W2B31z rxF79n5lBNvQZAF1wa6VXDU= X-Google-Smtp-Source: ABdhPJxsUGgxGibxaLa0ulhjD70k7xQQeOU90VCG9/bQlXcZW9qUGBthZZ4QazDJXzLGV5WkiWiIhg== X-Received: by 2002:a62:ab06:0:b029:249:db1c:3d7d with SMTP id p6-20020a62ab060000b0290249db1c3d7dmr15612945pff.72.1618333662633; Tue, 13 Apr 2021 10:07:42 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 , Mike Christie Subject: [PATCH 18/20] target: Compare explicitly with SAM_STAT_GOOD Date: Tue, 13 Apr 2021 10:07:12 -0700 Message-Id: <20210413170714.2119-19-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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. Cc: 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 Tue Apr 13 17:07: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: 421459 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.7 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 B9A0AC43470 for ; Tue, 13 Apr 2021 17:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0A8C613B7 for ; Tue, 13 Apr 2021 17:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347133AbhDMRIL (ORCPT ); Tue, 13 Apr 2021 13:08:11 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:38735 "EHLO mail-pg1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347120AbhDMRIE (ORCPT ); Tue, 13 Apr 2021 13:08:04 -0400 Received: by mail-pg1-f177.google.com with SMTP id w10so12400868pgh.5 for ; Tue, 13 Apr 2021 10:07: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=rFXmVizIQL6C4Iz8cpLnIDm4ABF9jZDW6wKSe2yCIWU=; b=mkorC6Lti5awlJMtTy4T6ovjOWEJcvvJpzdguCKSIjYcpDEDtV1+fVkHc2fHoJ8Jga KsuvAAupaCoWhOfzQuU52rPt9T9Z7xKEdHDo8mgGiZCY4jP3oeHN4oeyn7WUlHOQM7Wo k35yTPSbrvx/08TCpnqv9J5BBhLvtVEJLuqOItVdSihy/vEM6hOn3Z8eV+oirNL3F+Ss eCdLevP2WnWxoM4yFJ3VuP359fcEQycVH6VMtzD5YvB8rNv4VYzkodCF90VUgwx99uwa Mg8rYDSHZyp/s08HPFj4hU1wr3GTvehx69jsMr4GvQk1qtNfvvAacWyFXx6MRn25bndi DiEQ== X-Gm-Message-State: AOAM530I8IVzNcukBkIf7QHSCmSkOPBBxUf09fXNQvgrwz/9Bwak5Ay0 2QwLsFD7q/WM7qkz+4xI1gI= X-Google-Smtp-Source: ABdhPJzA/O6U3qzBBt0SRWMjhILbReHXBiHpnIrzd8wlObcYGvlCJt2kNbV/57rWiW0OsD9ao54TDg== X-Received: by 2002:a63:145a:: with SMTP id 26mr23823559pgu.300.1618333663857; Tue, 13 Apr 2021 10:07:43 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 , Mike Christie Subject: [PATCH 19/20] target: Fix several format specifiers Date: Tue, 13 Apr 2021 10:07:13 -0700 Message-Id: <20210413170714.2119-20-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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 and int data types instead of '%hu'. Cc: Mike Christie Signed-off-by: Bart Van Assche --- drivers/target/target_core_configfs.c | 6 +++--- drivers/target/target_core_pr.c | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 9cb1ca8421c8..01005a9e5128 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2746,7 +2746,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item, 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); + " tg_pt_gp ID: %u\n", tg_pt_gp->tg_pt_gp_valid_id); return -EINVAL; } if (!target_dev_configured(dev)) { @@ -2798,7 +2798,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store( 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", + " valid tg_pt_gp ID: %u\n", tg_pt_gp->tg_pt_gp_valid_id); return -EINVAL; } @@ -2853,7 +2853,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store( \ \ 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", \ + " valid tg_pt_gp ID: %u\n", \ t->tg_pt_gp_valid_id); \ return -EINVAL; \ } \ 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 Tue Apr 13 17:07: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: 420560 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.7 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 9FA16C43600 for ; Tue, 13 Apr 2021 17:07:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85762613B7 for ; Tue, 13 Apr 2021 17:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347119AbhDMRIM (ORCPT ); Tue, 13 Apr 2021 13:08:12 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:39815 "EHLO mail-pf1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347124AbhDMRIF (ORCPT ); Tue, 13 Apr 2021 13:08:05 -0400 Received: by mail-pf1-f175.google.com with SMTP id c17so11839623pfn.6 for ; Tue, 13 Apr 2021 10:07: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=/VodvlU3eNTY3fPH2GywD3E7jf85irbiftvc47Tcplg=; b=GVxmyLe8tQq3AREld7O0tHW0MJfoZg0oCYzCaTJxIDzF+M70Qcvlb9Y9kKlufp0bmH AIqozYMc0jp+VNCBUyfJqxskAla99ULCO7UkTQoFglYGYSrwat67w1JHwAMmbxtvb3uS vYjirPbzL3N10qpq165n0aH9OPKX4acSwwUUvYsBPiN6kbR1APaRoPPOlNny/20Z3Ta3 Y+xUDUOlxudvbslkuQAaMLGGv91OuSX1IRNkKgkcgEMhw/H2zwDZ56HkbvEaR1Igskdm yFS75z+6jfc4VaLyZ4XrffL6CanVqsuqX/CV6N1XWvplzLnKUPfUKUFc0rC7+Vfx7N2n CjkQ== X-Gm-Message-State: AOAM530pOvuZhy4GtZx3V+vRETnPeeZysnjijvdpSzvSK+o1/Fw1PhFR 8GsN4jRg+iiLhR41JVgLc+s= X-Google-Smtp-Source: ABdhPJwZNbnsMdfYPM9FfUzFdt7T/2J3RoCJ9ja2vLMJyzRPKvN7RC3rOzwiqVj4a0fAwfUxtUYLNw== X-Received: by 2002:a63:1f4d:: with SMTP id q13mr22632029pgm.453.1618333665054; Tue, 13 Apr 2021 10:07:45 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:345f:c70d:97e0:e2ef]) by smtp.gmail.com with ESMTPSA id z10sm6736078pfe.218.2021.04.13.10.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 10:07: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 20/20] target/tcm_fc: Fix a kernel-doc header Date: Tue, 13 Apr 2021 10:07:14 -0700 Message-Id: <20210413170714.2119-21-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210413170714.2119-1-bvanassche@acm.org> References: <20210413170714.2119-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)