From patchwork Sun Sep 25 05:53:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76939 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp598753qgf; Sat, 24 Sep 2016 22:53:33 -0700 (PDT) X-Received: by 10.98.9.25 with SMTP id e25mr27084374pfd.143.1474782813092; Sat, 24 Sep 2016 22:53:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk10si17078820pac.237.2016.09.24.22.53.32 for ; Sat, 24 Sep 2016 22:53:33 -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 S1754144AbcIYFxb (ORCPT ); Sun, 25 Sep 2016 01:53:31 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35655 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752431AbcIYFxa (ORCPT ); Sun, 25 Sep 2016 01:53:30 -0400 Received: by mail-pa0-f53.google.com with SMTP id oz2so52393296pac.2 for ; Sat, 24 Sep 2016 22:53:30 -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=8q6X7/rPPfnlj5DhPLRWeoNgWKS0r4jpXD10VthGxfI=; b=ICeba9SXYfPc8SenpHWDqonV0BfwibrBqESRfqw58AiHxwKImhaZW/QlgXcwj27/Yr T0vlX2mLmVAC0qJkeXlUOlLOL9kv9VObemmCYsCy0aKksr/vW7LBOJCijiqEANj1fhKd kyKmYqCdYUFixp7ZkeSFyTKXDd0Yk0bS01wp0= 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=8q6X7/rPPfnlj5DhPLRWeoNgWKS0r4jpXD10VthGxfI=; b=afwGBuJuW1/qrSdJ1E65mG7GBpB4gMtq52Am3dEJJ5JD0jvAukyZlrDvakItLWqbpX Eh9X+ZR3DJ608Z7xXgHiJgeLPfJ5r/hLNuoPVS8rjJONRtss1N0Qy1H1Lr9YrFbI11Hl 2F+JRlL5arm0C2WaYWhBdoFPVN5Xh5yZWjaCfBBHHMKklNJIKbLvT3/UvKNHOLcVukJc 2RDuwc8eSXv76LVc9Q1+UFKdLF7cUchEkJVC6fZ3t7ak1qkh1M1cu7yHTKMM8pptv5pB MaSLtSkmF3KkHbbwJDLNUzj9rzoPZrb1mgjEdtgZYGcO/NqFKn7pXdJtIUDwYFhDma4N pSYw== X-Gm-Message-State: AE9vXwMxaVViKXSTtD1/PqNmCPWUJ4IR5I2+jycpwVix/JQiyj3nkkeDRXOzifVyQ9F4KdTa X-Received: by 10.66.86.105 with SMTP id o9mr26959657paz.108.1474782809736; Sat, 24 Sep 2016 22:53:29 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id an11sm21841137pac.26.2016.09.24.22.53.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Sep 2016 22:53:29 -0700 (PDT) From: Baoyou Xie To: kashyap.desai@avagotech.com, sumit.saxena@avagotech.com, uday.lingala@avagotech.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: megaraidlinux.pdl@avagotech.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 2/3] megaraid_sas: clean function declarations in megaraid_sas_fusion.c up Date: Sun, 25 Sep 2016 13:53:13 +0800 Message-Id: <1474782793-12031-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 10 warnings when building kernel with W=1: drivers/scsi/megaraid/megaraid_sas_base.c:226:21: warning: no previous prototype for 'megasas_get_cmd' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:252:1: warning: no previous declaration for 'megasas_return_cmd' [-Wmissing-declarations] drivers/scsi/megaraid/megaraid_sas_base.c:998:1: warning: no previous prototype for 'megasas_issue_polled' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:1936:6: warning: no previous prototype for 'megaraid_sas_kill_hba' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:1965:1: warning: no previous prototype for 'megasas_check_and_restore_queue_depth' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:2043:6: warning: no previous prototype for 'megasas_start_timer' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:2366:5: warning: no previous prototype for 'megasas_sriov_start_heartbeat' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:2436:6: warning: no previous prototype for 'megasas_sriov_heartbeat_handler' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:3878:6: warning: no previous prototype for 'megasas_free_cmds' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:3915:5: warning: no previous prototype for 'megasas_alloc_cmds' [-Wmissing-prototypes] In fact, these functions are declared in drivers/scsi/megaraid/megaraid_sas_fusion.c, but should be declared in a header file. thus can be recognized in other file. So this patch moves the declarations into drivers/scsi/megaraid/megaraid_sas.h. Signed-off-by: Baoyou Xie --- drivers/scsi/megaraid/megaraid_sas.h | 19 +++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 15 --------------- 2 files changed, 19 insertions(+), 15 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/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index ca86c88..d1a6ea5 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -2380,4 +2380,23 @@ void megasas_update_sdev_properties(struct scsi_device *sdev); int megasas_reset_fusion(struct Scsi_Host *shost, int reason); int megasas_task_abort_fusion(struct scsi_cmnd *scmd); int megasas_reset_target_fusion(struct scsi_cmnd *scmd); +struct megasas_cmd *megasas_get_cmd(struct megasas_instance *instance); +void +megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); +int +megasas_issue_polled(struct megasas_instance *instance, + struct megasas_cmd *cmd); +void megaraid_sas_kill_hba(struct megasas_instance *instance); +void +megasas_check_and_restore_queue_depth(struct megasas_instance *instance); +void megasas_start_timer(struct megasas_instance *instance, + struct timer_list *timer, + void *fn, unsigned long interval); +int megasas_sriov_start_heartbeat(struct megasas_instance *instance, + int initial); +void megasas_sriov_heartbeat_handler(unsigned long instance_addr); + +void megasas_free_cmds(struct megasas_instance *instance); +int megasas_alloc_cmds(struct megasas_instance *instance); + #endif /*LSI_MEGARAID_SAS_H */ diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index e7b77e1..6210922 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -59,9 +59,6 @@ #include "megaraid_sas.h" -extern void megasas_free_cmds(struct megasas_instance *instance); -extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance - *instance); extern void megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, u8 alt_status); @@ -69,24 +66,12 @@ int wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, int seconds); -void -megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); -int megasas_alloc_cmds(struct megasas_instance *instance); int megasas_clear_intr_fusion(struct megasas_register_set __iomem *regs); -int -megasas_issue_polled(struct megasas_instance *instance, - struct megasas_cmd *cmd); -void -megasas_check_and_restore_queue_depth(struct megasas_instance *instance); int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); -void megaraid_sas_kill_hba(struct megasas_instance *instance); extern u32 megasas_dbg_lvl; -void megasas_sriov_heartbeat_handler(unsigned long instance_addr); -int megasas_sriov_start_heartbeat(struct megasas_instance *instance, - int initial); void megasas_start_timer(struct megasas_instance *instance, struct timer_list *timer, void *fn, unsigned long interval);