From patchwork Wed Apr 15 09:38:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11490659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58CA9112C for ; Wed, 15 Apr 2020 09:12:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AD48208FE for ; Wed, 15 Apr 2020 09:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408361AbgDOJMP (ORCPT ); Wed, 15 Apr 2020 05:12:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39052 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408347AbgDOJMK (ORCPT ); Wed, 15 Apr 2020 05:12:10 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1E9E24F0DF89DDA865DB; Wed, 15 Apr 2020 17:12:06 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Wed, 15 Apr 2020 17:11:59 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH 1/3] scsi: fnic: make some symbols static Date: Wed, 15 Apr 2020 17:38:07 +0800 Message-ID: <20200415093809.9365-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/fnic/vnic_dev.c:257:5: warning: symbol 'vnic_dev_cmd1' was not declared. Should it be static? drivers/scsi/fnic/vnic_dev.c:319:5: warning: symbol 'vnic_dev_cmd2' was not declared. Should it be static? drivers/scsi/fnic/vnic_dev.c:414:5: warning: symbol 'vnic_dev_init_devcmd1' was not declared. Should it be static? drivers/scsi/fnic/vnic_dev.c:425:5: warning: symbol 'vnic_dev_init_devcmd2' was not declared. Should it be static? drivers/scsi/fnic/vnic_dev.c:495:6: warning: symbol 'vnic_dev_deinit_devcmd2' was not declared. Should it be static? drivers/scsi/fnic/vnic_dev.c:506:5: warning: symbol 'vnic_dev_cmd_no_proxy' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/fnic/vnic_dev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c index 1b88a3b53eee..a2beee6e09f0 100644 --- a/drivers/scsi/fnic/vnic_dev.c +++ b/drivers/scsi/fnic/vnic_dev.c @@ -254,7 +254,7 @@ void vnic_dev_free_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring *ring) } } -int vnic_dev_cmd1(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, int wait) +static int vnic_dev_cmd1(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, int wait) { struct vnic_devcmd __iomem *devcmd = vdev->devcmd; int delay; @@ -316,7 +316,7 @@ int vnic_dev_cmd1(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, int wait) return -ETIMEDOUT; } -int vnic_dev_cmd2(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, +static int vnic_dev_cmd2(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, int wait) { struct devcmd2_controller *dc2c = vdev->devcmd2; @@ -411,7 +411,7 @@ int vnic_dev_cmd2(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, } -int vnic_dev_init_devcmd1(struct vnic_dev *vdev) +static int vnic_dev_init_devcmd1(struct vnic_dev *vdev) { vdev->devcmd = vnic_dev_get_res(vdev, RES_TYPE_DEVCMD, 0); if (!vdev->devcmd) @@ -422,7 +422,7 @@ int vnic_dev_init_devcmd1(struct vnic_dev *vdev) } -int vnic_dev_init_devcmd2(struct vnic_dev *vdev) +static int vnic_dev_init_devcmd2(struct vnic_dev *vdev) { int err; unsigned int fetch_index; @@ -492,7 +492,7 @@ int vnic_dev_init_devcmd2(struct vnic_dev *vdev) } -void vnic_dev_deinit_devcmd2(struct vnic_dev *vdev) +static void vnic_dev_deinit_devcmd2(struct vnic_dev *vdev) { vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); vnic_wq_disable(&vdev->devcmd2->wq); @@ -503,7 +503,7 @@ void vnic_dev_deinit_devcmd2(struct vnic_dev *vdev) } -int vnic_dev_cmd_no_proxy(struct vnic_dev *vdev, +static int vnic_dev_cmd_no_proxy(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, u64 *a0, u64 *a1, int wait) { int err; From patchwork Wed Apr 15 09:38:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11490661 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F848112C for ; Wed, 15 Apr 2020 09:12:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 720EF2137B for ; Wed, 15 Apr 2020 09:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408356AbgDOJMO (ORCPT ); Wed, 15 Apr 2020 05:12:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39072 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408348AbgDOJML (ORCPT ); Wed, 15 Apr 2020 05:12:11 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 25C2ACC36F596187A371; Wed, 15 Apr 2020 17:12:06 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Wed, 15 Apr 2020 17:12:00 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH 2/3] scsi: fnic: make fnic_list and fnic_list_lock static Date: Wed, 15 Apr 2020 17:38:08 +0800 Message-ID: <20200415093809.9365-2-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200415093809.9365-1-yanaijie@huawei.com> References: <20200415093809.9365-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/fnic/fnic_main.c:52:1: warning: symbol 'fnic_list' was not declared. Should it be static? drivers/scsi/fnic/fnic_main.c:53:1: warning: symbol 'fnic_list_lock' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/fnic/fnic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 18584ab27c32..7910b573bacb 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -49,8 +49,8 @@ static struct kmem_cache *fnic_sgl_cache[FNIC_SGL_NUM_CACHES]; static struct kmem_cache *fnic_io_req_cache; -LIST_HEAD(fnic_list); -DEFINE_SPINLOCK(fnic_list_lock); +static LIST_HEAD(fnic_list); +static DEFINE_SPINLOCK(fnic_list_lock); /* Supported devices by fnic module */ static struct pci_device_id fnic_id_table[] = { From patchwork Wed Apr 15 09:38:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11490663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A45081 for ; Wed, 15 Apr 2020 09:12:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7FA120775 for ; Wed, 15 Apr 2020 09:12:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2635920AbgDOJMj (ORCPT ); Wed, 15 Apr 2020 05:12:39 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39176 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408349AbgDOJMN (ORCPT ); Wed, 15 Apr 2020 05:12:13 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 30489A6CD76B3349AA29; Wed, 15 Apr 2020 17:12:11 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Wed, 15 Apr 2020 17:12:00 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH 3/3] scsi: fnic: make vnic_wq_get_ctrl and vnic_wq_alloc_ring static Date: Wed, 15 Apr 2020 17:38:09 +0800 Message-ID: <20200415093809.9365-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200415093809.9365-1-yanaijie@huawei.com> References: <20200415093809.9365-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/fnic/vnic_wq.c:28:5: warning: symbol 'vnic_wq_get_ctrl' was not declared. Should it be static? drivers/scsi/fnic/vnic_wq.c:40:5: warning: symbol 'vnic_wq_alloc_ring' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/fnic/vnic_wq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fnic/vnic_wq.c b/drivers/scsi/fnic/vnic_wq.c index 015af2cdabaf..442972c04e65 100644 --- a/drivers/scsi/fnic/vnic_wq.c +++ b/drivers/scsi/fnic/vnic_wq.c @@ -25,7 +25,7 @@ #include "vnic_wq.h" -int vnic_wq_get_ctrl(struct vnic_dev *vdev, struct vnic_wq *wq, +static int vnic_wq_get_ctrl(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index, enum vnic_res_type res_type) { wq->ctrl = vnic_dev_get_res(vdev, res_type, index); @@ -37,7 +37,7 @@ int vnic_wq_get_ctrl(struct vnic_dev *vdev, struct vnic_wq *wq, } -int vnic_wq_alloc_ring(struct vnic_dev *vdev, struct vnic_wq *wq, +static int vnic_wq_alloc_ring(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int desc_count, unsigned int desc_size) { return vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size);