From patchwork Mon Sep 26 12:00:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 77021 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1135684qgf; Mon, 26 Sep 2016 05:01:24 -0700 (PDT) X-Received: by 10.98.192.130 with SMTP id g2mr38206273pfk.54.1474891284627; Mon, 26 Sep 2016 05:01:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si24929529pap.189.2016.09.26.05.01.24; Mon, 26 Sep 2016 05:01:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966089AbcIZMBW (ORCPT + 27 others); Mon, 26 Sep 2016 08:01:22 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34881 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965590AbcIZMBT (ORCPT ); Mon, 26 Sep 2016 08:01:19 -0400 Received: by mail-pa0-f43.google.com with SMTP id oz2so62480607pac.2 for ; Mon, 26 Sep 2016 05:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=IeMq0t4WJXTAkLKfhMSaTEJlyzTmpzmbzcVm7Tdbajk=; b=PhtqnYlNd/2IJxigFKJUbWYQNyZdQNg9iQZxOy9q46pgv5kT5RsQflhs0/i3gPFNz7 cACPBPF48DQqTOShd7iwUK5KLWYwkvI8a+0HQHRNLWch7lP9QErVtsWO4x9yl5/tWB6f S2Op5x2+d7EHj0uk+y0e72QTQ94LxG2+Maxjw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IeMq0t4WJXTAkLKfhMSaTEJlyzTmpzmbzcVm7Tdbajk=; b=GGBmm/GnisDyNbTch8CEX2XGiQvizcxOhqdZAByLAEDFRTsaAI24snftMv4hkbLpHb nFTuTAl2DtcJbS+gNjmQyZA4k3nYiFcvxEneRqZWHSCeE6Z5TLy024RZIiAJsFA/Kvtw koZyMXG7EIgcz7x54EpgPeOHXKQP3t9i3VZ2jvjKucc2lDbj6E0Glt7DswWZoNjdJYEy 1YSqUeGE9fePpBASqdepVT3x6XSHZgMqvFs2j5XRCnLyZx562pY/DJQtdQGKF2zJfla2 oTnpqiIhq/Kyeiepq91V692HepmFkHpiSIu0puwioGoFXueop+3hGhFnQm7FriSM4NgN tnnA== X-Gm-Message-State: AA6/9RnQCp/t9T6NkuBdwK+mspwJLtZcBJ/MaHZxon4J9UDQG5z/E+jgaWByuJUGedDWuGl1 X-Received: by 10.66.8.135 with SMTP id r7mr20521357paa.169.1474891278570; Mon, 26 Sep 2016 05:01:18 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.34]) by smtp.gmail.com with ESMTPSA id e1sm30790098pap.11.2016.09.26.05.01.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Sep 2016 05:01:18 -0700 (PDT) From: Baoyou Xie To: subbu.seetharaman@broadcom.com, ketan.mukadam@broadcom.com, jitendra.bhivare@broadcom.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH] scsi: be2iscsi: mark symbols static where possible Date: Mon, 26 Sep 2016 20:00:59 +0800 Message-Id: <1474891259-20031-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 6 warnings when building kernel with W=1: drivers/scsi/be2iscsi/be_main.c:65:1: warning: no previous prototype for 'beiscsi_log_enable_disp' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:78:1: warning: no previous prototype for 'beiscsi_log_enable_change' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:97:1: warning: no previous prototype for 'beiscsi_log_enable_store' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:116:1: warning: no previous prototype for 'beiscsi_log_enable_init' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:4587:5: warning: no previous prototype for 'beiscsi_iotask_v2' [-Wmissing-prototypes] drivers/scsi/be2iscsi/be_main.c:4976:6: warning: no previous prototype for 'beiscsi_hba_attrs_init' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/scsi/be2iscsi/be_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 6a6906f..68138a6 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -61,7 +61,7 @@ MODULE_PARM_DESC(be_max_phys_size, "memory that can be allocated. Range is 16 - 128"); #define beiscsi_disp_param(_name)\ -ssize_t \ +static ssize_t \ beiscsi_##_name##_disp(struct device *dev,\ struct device_attribute *attrib, char *buf) \ { \ @@ -74,7 +74,7 @@ beiscsi_##_name##_disp(struct device *dev,\ } #define beiscsi_change_param(_name, _minval, _maxval, _defaval)\ -int \ +static int \ beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ {\ if (val >= _minval && val <= _maxval) {\ @@ -93,7 +93,7 @@ beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ } #define beiscsi_store_param(_name) \ -ssize_t \ +static ssize_t \ beiscsi_##_name##_store(struct device *dev,\ struct device_attribute *attr, const char *buf,\ size_t count) \ @@ -112,7 +112,7 @@ beiscsi_##_name##_store(struct device *dev,\ } #define beiscsi_init_param(_name, _minval, _maxval, _defval) \ -int \ +static int \ beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \ { \ if (val >= _minval && val <= _maxval) {\ @@ -4584,7 +4584,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode) io_task->cmd_bhs = NULL; return -ENOMEM; } -int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg, +static int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg, unsigned int num_sg, unsigned int xferlen, unsigned int writedir) { @@ -4973,7 +4973,7 @@ static int beiscsi_bsg_request(struct bsg_job *job) return rc; } -void beiscsi_hba_attrs_init(struct beiscsi_hba *phba) +static void beiscsi_hba_attrs_init(struct beiscsi_hba *phba) { /* Set the logging parameter */ beiscsi_log_enable_init(phba, beiscsi_log_enable);