From patchwork Sat Sep 17 12:04:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76440 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp130741qgf; Sat, 17 Sep 2016 05:06:31 -0700 (PDT) X-Received: by 10.98.138.207 with SMTP id o76mr31396913pfk.100.1474113991018; Sat, 17 Sep 2016 05:06:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si16335466pfj.288.2016.09.17.05.06.24; Sat, 17 Sep 2016 05:06:31 -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 S932485AbcIQMFI (ORCPT + 27 others); Sat, 17 Sep 2016 08:05:08 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35830 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753234AbcIQME6 (ORCPT ); Sat, 17 Sep 2016 08:04:58 -0400 Received: by mail-pa0-f44.google.com with SMTP id oz2so29465198pac.2 for ; Sat, 17 Sep 2016 05:04:57 -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=Qa9h/o9NO5EH062PQVy64EX/hpSdEGCEsBY2eMkkH4g=; b=L8YBiLZU5ZWWX//KgOGUP5nfmlfDJdmOw410qyJLxUxGabjqny38wQkGO24f8SJGBC LwTPZ2BLXYlUkYwMDxQBzU8BvlU8BjosKqKhIt3kmbTN2zN1oTCOMxNWksSOlEMvnB30 8ziZvFYCev0k0xO6UWgYwhpDsY+uCOyrS0o8I= 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=Qa9h/o9NO5EH062PQVy64EX/hpSdEGCEsBY2eMkkH4g=; b=k1yBbx3fLkb31J4Hu2+K+do/URNmVQEwqBcy7aa04BsbSxcNyGDGmtZuujDNXKhDNb 1g1Euufkp+qxvCyKw/vVU5DKJLtJYEwnF72PLE7cUdkLPBRqa/vpHB3f21jn6D/ge4WM lXcjE6nsCKhDe5QrvAuh6ZTuyiKJ5Wv9qgGedpzbJtE4gcxeqYk9NXtiGvoQPrmGSp+c Be7w9xvd4r1CDdRIGfpGbQEVwPy8bbQFZy1Pat9pZYgLwCvcaZvxqSBp9d0C0mX45pH5 e83ZbU4HLPH0sV6hSo8tQIwjOjmdq85jMene11L3Rh9G+hdBQF411/RbOPMdhBhycft5 8e0w== X-Gm-Message-State: AE9vXwM/Opf21ISww9mTwmm/yGhpPDLFD00LdQtAv90qebpZ5nY8kQlmgGfYpdkehqzYcVzK X-Received: by 10.67.11.107 with SMTP id eh11mr1740211pad.89.1474113897130; Sat, 17 Sep 2016 05:04:57 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.112]) by smtp.gmail.com with ESMTPSA id y2sm18791219pan.31.2016.09.17.05.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Sep 2016 05:04:56 -0700 (PDT) From: Baoyou Xie To: oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, gregkh@linuxfoundation.org, john.hammond@intel.com, di.wang@intel.com, dmitry.eremin@intel.com, jian.yu@intel.com Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] staging: lustre: lmv: mark symbols static where possible Date: Sat, 17 Sep 2016 20:04:36 +0800 Message-Id: <1474113876-20343-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 a few warnings when building kernel with W=1: drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes] drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous prototype for 'lmv_read_page' [-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/staging/lustre/lustre/lmv/lmv_obd.c | 38 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) -- 2.7.4 diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index dc752d5..5783359 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1636,7 +1636,7 @@ static int lmv_close(struct obd_export *exp, struct md_op_data *op_data, * For striped-directory, it will locate MDT by name. And also * it will reset op_fid1 with the FID of the chosen stripe. **/ -struct lmv_tgt_desc * +static struct lmv_tgt_desc * lmv_locate_target_for_name(struct lmv_obd *lmv, struct lmv_stripe_md *lsm, const char *name, int namelen, struct lu_fid *fid, u32 *mds) @@ -2418,9 +2418,9 @@ static int lmv_read_striped_page(struct obd_export *exp, return rc; } -int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data, - struct md_callback *cb_op, __u64 offset, - struct page **ppage) +static int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data, + struct md_callback *cb_op, __u64 offset, + struct page **ppage) { struct lmv_stripe_md *lsm = op_data->op_mea1; struct obd_device *obd = exp->exp_obd; @@ -2771,8 +2771,9 @@ static int lmv_pack_md_v1(const struct lmv_stripe_md *lsm, return 0; } -int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm, - int stripe_count) +static int +lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm, + int stripe_count) { int lmm_size = 0, rc = 0; bool allocated = false; @@ -2966,15 +2967,15 @@ int lmv_unpack_md(struct obd_export *exp, struct lmv_stripe_md **lsmp, } EXPORT_SYMBOL(lmv_unpack_md); -int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, - struct lov_mds_md *lmm, int disk_len) +static int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, + struct lov_mds_md *lmm, int disk_len) { return lmv_unpack_md(exp, (struct lmv_stripe_md **)lsmp, (union lmv_mds_md *)lmm, disk_len); } -int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, - struct lov_stripe_md *lsm) +static int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, + struct lov_stripe_md *lsm) { const struct lmv_stripe_md *lmv = (struct lmv_stripe_md *)lsm; struct obd_device *obd = exp->exp_obd; @@ -3177,9 +3178,10 @@ static int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, return rc; } -int lmv_get_fid_from_lsm(struct obd_export *exp, - const struct lmv_stripe_md *lsm, - const char *name, int namelen, struct lu_fid *fid) +static int +lmv_get_fid_from_lsm(struct obd_export *exp, + const struct lmv_stripe_md *lsm, + const char *name, int namelen, struct lu_fid *fid) { const struct lmv_oinfo *oinfo; @@ -3269,14 +3271,16 @@ static int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp, return rc; } -int lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm, - struct mdt_body *body, ldlm_blocking_callback cb_blocking) +static int +lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm, + struct mdt_body *body, ldlm_blocking_callback cb_blocking) { return lmv_revalidate_slaves(exp, body, lsm, cb_blocking, 0); } -int lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm, - struct cl_attr *attr) +static int +lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm, + struct cl_attr *attr) { int i;