Return-Path: Received: from mnm [127.0.0.1] by localhost with POP3 (fetchmail-5.9.0) for akpm@localhost (single-drop); Thu, 15 Jan 2004 17:31:07 -0800 (PST) Received: from fire-1.osdl.org (air1.pdx.osdl.net [172.20.0.5]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i0G1RVo09478 for ; Thu, 15 Jan 2004 17:27:31 -0800 Received: from note.orchestra.cse.unsw.EDU.AU (root@note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by fire-1.osdl.org (8.12.8/8.12.8) with SMTP id i0G1RSAv030387 for ; Thu, 15 Jan 2004 17:27:29 -0800 Received: From notabene ([129.94.211.194] == dulcimer.orchestra.cse.unsw.EDU.AU) (for ) (for ) By note With Smtp ; Fri, 16 Jan 2004 12:27:26 +1100 Received: from neilb by notabene with local (Exim 3.36 #1 (Debian)) id 1AhIlf-0002nw-00; Fri, 16 Jan 2004 12:27:23 +1100 From: NeilBrown To: Andrew Morton Date: Fri, 16 Jan 2004 12:27:23 +1100 X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D X-MIMEDefang-Filter: osdl$Revision: 1.1 $ X-Scanned-By: MIMEDefang 2.36 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on mnm X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=2.0 tests=BAYES_00 autolearn=ham version=2.60 This way, the "static char buf" is defined only once instead of once per file. ----------- Diffstat output ------------ ./fs/nfsd/nfsfh.c | 18 ++++++++++++++++++ ./include/linux/nfsd/nfsfh.h | 17 ++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff ./fs/nfsd/nfsfh.c~current~ ./fs/nfsd/nfsfh.c --- ./fs/nfsd/nfsfh.c~current~ 2004-01-16 12:19:51.000000000 +1100 +++ ./fs/nfsd/nfsfh.c 2004-01-16 12:22:12.000000000 +1100 @@ -489,3 +489,21 @@ fh_put(struct svc_fh *fhp) return; } +/* + * Shorthand for dprintk()'s + */ +char * SVCFH_fmt(struct svc_fh *fhp) +{ + struct knfsd_fh *fh = &fhp->fh_handle; + + static char buf[80]; + sprintf(buf, "%d: %08x %08x %08x %08x %08x %08x", + fh->fh_size, + fh->fh_base.fh_pad[0], + fh->fh_base.fh_pad[1], + fh->fh_base.fh_pad[2], + fh->fh_base.fh_pad[3], + fh->fh_base.fh_pad[4], + fh->fh_base.fh_pad[5]); + return buf; +} diff ./include/linux/nfsd/nfsfh.h~current~ ./include/linux/nfsd/nfsfh.h --- ./include/linux/nfsd/nfsfh.h~current~ 2004-01-13 14:56:17.000000000 +1100 +++ ./include/linux/nfsd/nfsfh.h 2004-01-16 12:22:12.000000000 +1100 @@ -186,21 +186,8 @@ static inline void mk_fsid_v2(u32 *fsidv /* * Shorthand for dprintk()'s */ -inline static char * SVCFH_fmt(struct svc_fh *fhp) -{ - struct knfsd_fh *fh = &fhp->fh_handle; - - static char buf[80]; - sprintf(buf, "%d: %08x %08x %08x %08x %08x %08x", - fh->fh_size, - fh->fh_base.fh_pad[0], - fh->fh_base.fh_pad[1], - fh->fh_base.fh_pad[2], - fh->fh_base.fh_pad[3], - fh->fh_base.fh_pad[4], - fh->fh_base.fh_pad[5]); - return buf; -} +extern char * SVCFH_fmt(struct svc_fh *fhp); + /* * Function prototypes */