From patchwork Fri Sep 23 13:54:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76874 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp582247qgf; Fri, 23 Sep 2016 06:54:43 -0700 (PDT) X-Received: by 10.66.228.226 with SMTP id sl2mr12551756pac.131.1474638882943; Fri, 23 Sep 2016 06:54:42 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fe8si8035782pab.205.2016.09.23.06.54.42; Fri, 23 Sep 2016 06:54:42 -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 S1034803AbcIWNyj (ORCPT + 27 others); Fri, 23 Sep 2016 09:54:39 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35184 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034619AbcIWNyh (ORCPT ); Fri, 23 Sep 2016 09:54:37 -0400 Received: by mail-pa0-f42.google.com with SMTP id oz2so40586965pac.2 for ; Fri, 23 Sep 2016 06:54:36 -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=ZxHh7Y4ibhIIpYi69Z8G2snfIvC05hX4FIwGScbeb9M=; b=Xwa7YxoefCAg0Sx3ywzerDp9NsErnj5VZ/VLsmSvg/z/vyM93ejqvSogZDmocI+Jkf TQD0hui1t9MvZhdbCDsAGKb4VE/E3Ha22deWFpGHt0IumEqLX5YkRlAW8ALjnjXxpA5A rfFtPV3qjqdBe8nqeSAer7MTpOb7ZzF8bEb1I= 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=ZxHh7Y4ibhIIpYi69Z8G2snfIvC05hX4FIwGScbeb9M=; b=A7La+hjGzovnarL/qLt73PswKMuauXbX3Mv00M6B2tHeqXFo5HDbLGaxhCAfYfuZ0e s187nzlMczAxr30GSBUhuIXOLX0o9pvGeokA9xCWOP5fj0nc599zks0s6GTpXBIKj2+o mCiMbThZ+fNi2xxjVDstzjOxIGngZp6sxCQMVbBbGwbNpBkoqC7pdZSaatvwwCtHepvM WH4Nomej7LR/BywSM2fT2R0xQ6ic9mwja3n7jLipkRzCcFRQ+5ZOdZVeaekASF3h2g4z +svjZXlK7VLjVj+kBUDi+SSoWmJgmz59JVk2xE+0TXxzjAXuAcW9pOAdJCGPXn0LsdkW u59Q== X-Gm-Message-State: AE9vXwMNmpBB3eyOgW6HsxLxty4kD02ZTMzJ37D7qkWnsOCIflVHsIC7G568PW/S/NFSz8Vh X-Received: by 10.66.156.129 with SMTP id we1mr12581342pab.149.1474638876448; Fri, 23 Sep 2016 06:54:36 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.27]) by smtp.gmail.com with ESMTPSA id q2sm11948603pfi.35.2016.09.23.06.54.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 06:54:35 -0700 (PDT) From: Baoyou Xie To: jinpu.wang@profitbricks.com, lindar_liu@usish.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: pmchba@pmcs.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] pm8001: mark symbols static where possible Date: Fri, 23 Sep 2016 21:54:22 +0800 Message-Id: <1474638862-22595-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 2 warnings when building kernel with W=1: drivers/scsi/pm8001/pm8001_sas.c:530:23: warning: no previous prototype for 'pm8001_alloc_dev' [-Wmissing-prototypes] drivers/scsi/pm8001/pm8001_hwi.c:4495:5: warning: no previous prototype for 'pm8001_chip_phy_stop_req' [-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/pm8001/pm8001_hwi.c | 4 ++-- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 04e67a1..10546fa 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -4492,8 +4492,8 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) * @num: the inbound queue number * @phy_id: the phy id which we wanted to start up. */ -int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, - u8 phy_id) +static int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, + u8 phy_id) { struct phy_stop_req payload; struct inbound_queue_table *circularQ; diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index dc33dfa..ce584c3 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -527,7 +527,7 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha, * pm8001_alloc_dev - find a empty pm8001_device * @pm8001_ha: our hba card information */ -struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) +static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) { u32 dev; for (dev = 0; dev < PM8001_MAX_DEVICES; dev++) {