From patchwork Sun Sep 25 05:54:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76940 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp599023qgf; Sat, 24 Sep 2016 22:54:49 -0700 (PDT) X-Received: by 10.98.82.200 with SMTP id g191mr26999128pfb.84.1474782889473; Sat, 24 Sep 2016 22:54:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si17595346pfj.147.2016.09.24.22.54.49 for ; Sat, 24 Sep 2016 22:54:49 -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 S1754607AbcIYFys (ORCPT ); Sun, 25 Sep 2016 01:54:48 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35012 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbcIYFyr (ORCPT ); Sun, 25 Sep 2016 01:54:47 -0400 Received: by mail-pf0-f172.google.com with SMTP id s13so20435487pfd.2 for ; Sat, 24 Sep 2016 22:54:47 -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=Dvysmzw0wFoAcrHzrMjDb3HSItCVgNtDHOfMEM+ODHE=; b=FMfzFCtl2JAqpeAvDv319riwjDrHfkGU8s1R2pPAUqPRO6MQiMBcbAJCN3FHaq4DL5 1Cl8WqH9LzIEh8oB7QqL2E+ohNXCEx0wd2LXTHdo6gcwm2FFBGIaqNGvMrOa1yOOQtp3 rJNGjuiSWuWaoXghxSq4Gff51LcyZ/PxkGmwM= 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=Dvysmzw0wFoAcrHzrMjDb3HSItCVgNtDHOfMEM+ODHE=; b=I6ttqHxlA7diqusMn6B1Q+OhGT3vWyzPhfHl1GjByjO0E4awqaZszx1buh1/t1fKe2 mxtCX4GS+P2YnwQGtsg7Ysx1yijpJuPD3HZOwKWBuZGcWccb1xbXBsohMTySPkIlfoFp soBy98aHTUBV/qiLgX/jKbZndp2ZM9MY8MRfBEEovo4bZg/EKKCUZ55yQ26hIS0PSt8N ehEGh5JSlJ9WxVxdmMZoM3PnyCHdg71LWPSv2A7w1iy61y18p7RPBmwlEL/AMFoyp5wX wT8Zp+WLSa524+DeIQYYHYQWDqupjlZgXTc1K3twJQrYuqVczpgs24SGlRGmxrU6tFYh yT/Q== X-Gm-Message-State: AE9vXwNzCNMT0CgvoB8pLOeI4fvaqCnD1RcOIIoGvQ/l9oCb9tFC+eISA1PfFSPIVACWY1+A X-Received: by 10.98.157.199 with SMTP id a68mr27351768pfk.75.1474782887196; Sat, 24 Sep 2016 22:54:47 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id d2sm15758457pfe.94.2016.09.24.22.54.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Sep 2016 22:54:46 -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 3/3] megaraid_sas: clean function declarations in megaraid_sas_base.c up Date: Sun, 25 Sep 2016 13:54:35 +0800 Message-Id: <1474782875-15708-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 8 warnings when building kernel with W=1: drivers/scsi/megaraid/megaraid_sas_fusion.c:281:1: warning: no previous prototype for 'megasas_free_cmds_fusion' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:714:1: warning: no previous prototype for 'megasas_ioc_init_fusion' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:1038:1: warning: no previous prototype for 'megasas_get_map_info' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:1061:1: warning: no previous prototype for 'megasas_sync_map_info' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:2599:1: warning: no previous prototype for 'megasas_release_fusion' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:2833:7: warning: no previous prototype for 'megasas_reset_reply_desc' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:3354:5: warning: no previous prototype for 'megasas_check_mpio_paths' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_fusion.c:3664:6: warning: no previous prototype for 'megasas_fusion_ocr_wq' [-Wmissing-prototypes] In fact, these functions are declared in drivers/scsi/megaraid/megaraid_sas_base.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 | 15 ++++++++++++++- drivers/scsi/megaraid/megaraid_sas_base.c | 14 -------------- 2 files changed, 14 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 d1a6ea5..aad81c6 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -2398,5 +2398,18 @@ 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); - +void +megasas_free_cmds_fusion(struct megasas_instance *instance); +int +megasas_ioc_init_fusion(struct megasas_instance *instance); +u8 +megasas_get_map_info(struct megasas_instance *instance); +int +megasas_sync_map_info(struct megasas_instance *instance); +void +megasas_release_fusion(struct megasas_instance *instance); +void megasas_reset_reply_desc(struct megasas_instance *instance); +int megasas_check_mpio_paths(struct megasas_instance *instance, + struct scsi_cmnd *scmd); +void megasas_fusion_ocr_wq(struct work_struct *work); #endif /*LSI_MEGARAID_SAS_H */ diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 1b033da..73f4e27 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -189,25 +189,11 @@ u32 megasas_build_and_issue_cmd(struct megasas_instance *instance, struct scsi_cmnd *scmd); static void megasas_complete_cmd_dpc(unsigned long instance_addr); -void -megasas_release_fusion(struct megasas_instance *instance); -int -megasas_ioc_init_fusion(struct megasas_instance *instance); -void -megasas_free_cmds_fusion(struct megasas_instance *instance); -u8 -megasas_get_map_info(struct megasas_instance *instance); -int -megasas_sync_map_info(struct megasas_instance *instance); int wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, int seconds); -void megasas_reset_reply_desc(struct megasas_instance *instance); -void megasas_fusion_ocr_wq(struct work_struct *work); static int megasas_get_ld_vf_affiliation(struct megasas_instance *instance, int initial); -int megasas_check_mpio_paths(struct megasas_instance *instance, - struct scsi_cmnd *scmd); static int megasas_issue_dcmd(struct megasas_instance *instance, struct megasas_cmd *cmd)