From patchwork Sat Sep 17 13:30: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: 76442 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp160823qgf; Sat, 17 Sep 2016 06:31:37 -0700 (PDT) X-Received: by 10.66.145.73 with SMTP id ss9mr31655562pab.82.1474119097622; Sat, 17 Sep 2016 06:31:37 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62si11502923pfa.7.2016.09.17.06.31.37; Sat, 17 Sep 2016 06:31:37 -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 S1751651AbcIQNbc (ORCPT + 27 others); Sat, 17 Sep 2016 09:31:32 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:35542 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbcIQNbY (ORCPT ); Sat, 17 Sep 2016 09:31:24 -0400 Received: by mail-pf0-f177.google.com with SMTP id z123so36045778pfz.2 for ; Sat, 17 Sep 2016 06:31:24 -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=Wisd0xmGk2fdGxp6J/NR26XuKN1XeIk7PVRG5jixgZ8=; b=Uj8rswupFHZLqymevoSmiVLQ9MKav0JEsMLU5K0gvEMK7DJ/oY5dhWEUPHZv942074 Ax3xL6p6VI4sowLWkdiKbGdUHjzJ1/m7PjmHxqhEYdhVZdpze0rdrqq/cQMJcvXCC1Yr ihaUOJxZvOdbuJoi3TT9X51HeO0IjpESJ5HrE= 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=Wisd0xmGk2fdGxp6J/NR26XuKN1XeIk7PVRG5jixgZ8=; b=YQQLyiIjyLdLAvY7xER/1Sd0rmxLi8YMILMwRBSS0A8y30UMxjYdC1VwLbpZxQML6y AxT5GvNyLP4FPNo34OFI0c1LL0Bw3cNItZGVLu/Dn/S1Vjy2illhyfOakW0R2TGMuEUw 9M8jmwsiv01Hqb3m8VtUaJnpdbojWYyG+PaAmx1kW4v0/ZbS/91F9NGKNza7tzm4HteV gKD08alOWrF336Hs165Qk7nKpMO2ji++q8ZhUhSkbswVNBp1KthLA/iVMxMHvzsKzOPC yyUk9tHpcEuoA+mlnsunh40pCtHWS9yzAq8768A0OAmE+PcBiHeSDE6KBTvlkhZpFOgl k/TA== X-Gm-Message-State: AE9vXwPMHQb+P4Yln/XwCu3XTfy1uBRg2Cm1kC9NPAiqMLfZqE0WRTrRCaSa7zUAa365yHvj X-Received: by 10.98.7.4 with SMTP id b4mr31285936pfd.136.1474119084277; Sat, 17 Sep 2016 06:31:24 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.112]) by smtp.gmail.com with ESMTPSA id i62sm18777924pfg.89.2016.09.17.06.31.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Sep 2016 06:31:23 -0700 (PDT) From: Baoyou Xie To: oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, gregkh@linuxfoundation.org, john.hammond@intel.com, shraddha.6596@gmail.com, di.wang@intel.com, ksenija.stanojevic@gmail.com, mike.rapoport@gmail.com, andrew.perepechko@seagate.com, kirill.shutemov@linux.intel.com, emoly.liu@intel.com, arnd@arndb.de, amir.shehata@intel.com, dmitry.eremin@intel.com Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd.c up Date: Sat, 17 Sep 2016 21:30:35 +0800 Message-Id: <1474119035-15629-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 3 warnings when building kernel with W=1: drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous prototype for 'lustre_check_exclusion' [-Wmissing-prototypes] drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous prototype for 'lustre_register_fs' [-Wmissing-prototypes] drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous prototype for 'lustre_unregister_fs' [-Wmissing-prototypes] In fact, the first function is declared in drivers/staging/lustre/lustre/obdclass/obd_config.c, and the other two functions are declared in drivers/staging/lustre/lustre/obdclass/class_obd.c, but all of these functions should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/staging/lustre/lustre/include/obd_class.h. Signed-off-by: Baoyou Xie --- drivers/staging/lustre/lustre/include/obd_class.h | 3 +++ drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ---- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 9965a01..4a8a459 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -1696,6 +1696,9 @@ struct lwp_register_item { extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); /* obd_mount.c */ +int lustre_unregister_fs(void); +int lustre_register_fs(void); +int lustre_check_exclusion(struct super_block *sb, char *svname); /* sysctl.c */ int obd_sysctl_init(void); diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index 397929a..381b8ba 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c @@ -451,8 +451,6 @@ static int __init obdclass_init(void) { int i, err; - int lustre_register_fs(void); - LCONSOLE_INFO("Lustre: Build Version: " LUSTRE_VERSION_STRING "\n"); spin_lock_init(&obd_types_lock); @@ -519,8 +517,6 @@ static int __init obdclass_init(void) static void obdclass_exit(void) { - int lustre_unregister_fs(void); - lustre_unregister_fs(); misc_deregister(&obd_psdev); diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index b7dcadb..036f396 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -1047,8 +1047,6 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, } EXPORT_SYMBOL(class_process_proc_param); -extern int lustre_check_exclusion(struct super_block *sb, char *svname); - /** Parse a configuration llog, doing various manipulations on them * for various reasons, (modifications for compatibility, skip obsolete * records, change uuids, etc), then class_process_config() resulting