Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624AbcLHAWI (ORCPT ); Wed, 7 Dec 2016 19:22:08 -0500 Received: from casper.infradead.org ([85.118.1.10]:55416 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbcLHAWH (ORCPT ); Wed, 7 Dec 2016 19:22:07 -0500 Date: Thu, 8 Dec 2016 00:22:02 +0000 (GMT) From: James Simmons To: Oleg Drokin cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header In-Reply-To: <1481150494-1853127-6-git-send-email-green@linuxhacker.ru> Message-ID: References: <1481150494-1853127-1-git-send-email-green@linuxhacker.ru> <1481150494-1853127-6-git-send-email-green@linuxhacker.ru> 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-20161208_002202_885719_99453B3A X-CRM114-Status: GOOD ( 12.06 ) 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 Content-Length: 1626 Lines: 43 > This avoids frowned upon extern in the C file, and also > shuts down a sparse warning of > drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static? Reviewed-by: James Simmons > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/osc/osc_internal.h | 2 ++ > drivers/staging/lustre/lustre/osc/osc_request.c | 2 -- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h > index 688783d..5cce82b 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_internal.h > +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h > @@ -181,6 +181,8 @@ static inline struct osc_device *obd2osc_dev(const struct obd_device *d) > return container_of0(d->obd_lu_dev, struct osc_device, od_cl.cd_lu_dev); > } > > +extern struct lu_kmem_descr osc_caches[]; > + > extern struct kmem_cache *osc_quota_kmem; > struct osc_quota_info { > /** linkage for quota hash table */ > diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c > index 7143564..f691297 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_request.c > +++ b/drivers/staging/lustre/lustre/osc/osc_request.c > @@ -2766,8 +2766,6 @@ static struct obd_ops osc_obd_ops = { > .quotactl = osc_quotactl, > }; > > -extern struct lu_kmem_descr osc_caches[]; > - > static int __init osc_init(void) > { > struct lprocfs_static_vars lvars = { NULL }; > -- > 2.7.4 > >