From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935253AbcIRTnj (ORCPT ); Sun, 18 Sep 2016 15:43:39 -0400 Received: from casper.infradead.org ([85.118.1.10]:41990 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933407AbcIRTnc (ORCPT ); Sun, 18 Sep 2016 15:43:32 -0400 Date: Sun, 18 Sep 2016 20:43:18 +0100 (BST) From: James Simmons To: Baoyou Xie cc: oleg.drokin@intel.com, andreas.dilger@intel.com, gregkh@linuxfoundation.org, di.wang@intel.com, john.hammond@intel.com, fan.yong@intel.com, lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, arnd@arndb.de, xie.baoyou@zte.com.cn Subject: Re: [PATCH] staging: lustre: lmv: add missing function declaration In-Reply-To: <1474198793-25108-1-git-send-email-baoyou.xie@linaro.org> Message-ID: References: <1474198793-25108-1-git-send-email-baoyou.xie@linaro.org> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160918_204318_710425_5DD2FD44 X-CRM114-Status: GOOD ( 12.30 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > We get 1 warning when building kernel with W=1: > drivers/staging/lustre/lustre/lmv/lmv_obd.c:2774:5: warning: no previous prototype for 'lmv_pack_md' [-Wmissing-prototypes] > > In fact, this function is not declared in any file,but should be > declared in a header file, thus can be recognized in other file. > > So this patch adds the declarations into > drivers/staging/lustre/lustre/include/lustre_lmv.h. > > Signed-off-by: Baoyou Xie > --- > drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 ++ > 1 file changed, 2 insertions(+) Nak. I'm not seeing this error with W=1. Also if you look lmv_pack_md() is only used in lmv_obd.c and the function appears early in the file before it is used, so no prototype missing errors should happen. > diff --git a/drivers/staging/lustre/lustre/include/lustre_lmv.h b/drivers/staging/lustre/lustre/include/lustre_lmv.h > index 085e596..21302c7 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_lmv.h > +++ b/drivers/staging/lustre/lustre/include/lustre_lmv.h > @@ -119,3 +119,5 @@ static inline void lmv_le_to_cpu(union lmv_mds_md *lmv_dst, > } > > +int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm, > + int stripe_count); > #endif > -- > 2.7.4 > >