From patchwork Sat Aug 27 15:49:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 74858 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp877615qga; Sat, 27 Aug 2016 08:50:14 -0700 (PDT) X-Received: by 10.98.33.72 with SMTP id h69mr16346176pfh.28.1472313014861; Sat, 27 Aug 2016 08:50:14 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sj4si27909464pab.213.2016.08.27.08.50.14 for ; Sat, 27 Aug 2016 08:50:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754236AbcH0PuN (ORCPT ); Sat, 27 Aug 2016 11:50:13 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:32993 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753511AbcH0PuM (ORCPT ); Sat, 27 Aug 2016 11:50:12 -0400 Received: by mail-pa0-f44.google.com with SMTP id cy9so15269882pac.0 for ; Sat, 27 Aug 2016 08:50:12 -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=D94GI/zRtcZrf8vTomNvd8Sfjdd3Eg/zU2q5xybzadc=; b=k2yVDjgQGEljGiwVsoc7ugX3ZSD9NuYNt/WOcdKRIvfpO/UvTU5/IpBvuHxqwfeN2D q0DhFwI6BENPz58J/fRvrC/r2eFW/neOx2VvzpBoc8J5WG3Rv+Qfc9xlfz+Nu0mriUyf 6Zt+2OjKCONNTufXqGHvPZEm8DKqv6BqSH+oo= 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=D94GI/zRtcZrf8vTomNvd8Sfjdd3Eg/zU2q5xybzadc=; b=LxsdSZmMAcmxEcibbzCxKfq/wCapvBkgNZtp79OZoY4x0CZT0vKuKVMvGJSyrmC/H4 rKdkMA2T150omTNtqZNzUypjjyUYDs0v/+N+xPgFjRf8AO5Os8AEUtpQIU62ksGnNOt+ wNPeQOsLEbsahetCl/4q44xXQ19sM6tI1VabBYnx0AE4dNAFlQEIheUAin9lJ6bR6y63 ccM6T5ucYo3OTnnXHqImsKxC2nC322HE2FdLiwd7CByxbXz41ELkwCYterkgv2qIvlYN MufPpjU7L58i15Bs2wsdeV2pGRIyrpFUw2AkjAOwu+ZnvaeOAz5qInDwZffY3UNJfn4p arqw== X-Gm-Message-State: AE9vXwMnj5lncp7FgRZYUTiI750nXLNWHICsjpLJsR6QodwQ7OGSmyvUj8tI7ZG7PDutFzOG X-Received: by 10.66.235.100 with SMTP id ul4mr16187173pac.50.1472313012087; Sat, 27 Aug 2016 08:50:12 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.142]) by smtp.gmail.com with ESMTPSA id ah5sm37075560pad.30.2016.08.27.08.50.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Aug 2016 08:50:11 -0700 (PDT) From: Baoyou Xie To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@linaro.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] fix:pmcraid: mark symbols static where possible Date: Sat, 27 Aug 2016 23:49:24 +0800 Message-Id: <1472312964-20944-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org We get 4 warnings about global functions without a declaration in the scsi pmcraid driver when building with W=1: drivers/scsi/pmcraid.c:309:6: warning: no previous prototype for 'pmcraid_init_cmdblk' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:404:6: warning: no previous prototype for 'pmcraid_return_cmd' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:1713:6: warning: no previous prototype for 'pmcraid_ioasc_logger' [-Wmissing-prototypes] drivers/scsi/pmcraid.c:3141:1: warning: no previous prototype for 'pmcraid_init_ioadls' [-Wmissing-prototypes] In fact, these functions are only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie --- drivers/scsi/pmcraid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index b2a8820..68a5c34 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -306,7 +306,7 @@ static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth) * Return Value * None */ -void pmcraid_init_cmdblk(struct pmcraid_cmd *cmd, int index) +static void pmcraid_init_cmdblk(struct pmcraid_cmd *cmd, int index) { struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb); dma_addr_t dma_addr = cmd->ioa_cb_bus_addr; @@ -401,7 +401,7 @@ static struct pmcraid_cmd *pmcraid_get_free_cmd( * Return Value: * nothing */ -void pmcraid_return_cmd(struct pmcraid_cmd *cmd) +static void pmcraid_return_cmd(struct pmcraid_cmd *cmd) { struct pmcraid_instance *pinstance = cmd->drv_inst; unsigned long lock_flags; @@ -1710,7 +1710,7 @@ static struct pmcraid_ioasc_error *pmcraid_get_error_info(u32 ioasc) * @ioasc: ioasc code * @cmd: pointer to command that resulted in 'ioasc' */ -void pmcraid_ioasc_logger(u32 ioasc, struct pmcraid_cmd *cmd) +static void pmcraid_ioasc_logger(u32 ioasc, struct pmcraid_cmd *cmd) { struct pmcraid_ioasc_error *error_info = pmcraid_get_error_info(ioasc); @@ -3137,7 +3137,7 @@ static int pmcraid_eh_host_reset_handler(struct scsi_cmnd *scmd) * returns pointer pmcraid_ioadl_desc, initialized to point to internal * or external IOADLs */ -struct pmcraid_ioadl_desc * +static struct pmcraid_ioadl_desc * pmcraid_init_ioadls(struct pmcraid_cmd *cmd, int sgcount) { struct pmcraid_ioadl_desc *ioadl;