Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbbBVDBk (ORCPT ); Sat, 21 Feb 2015 22:01:40 -0500 Received: from smtprelay0250.hostedemail.com ([216.40.44.250]:49023 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752284AbbBVCyk (ORCPT ); Sat, 21 Feb 2015 21:54:40 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1542:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3867:4321:4605:5007:6261:8603:9592:10004:10848:11026:11473:11657:11658:11914:12043:12296:12438:12517:12519:12555:12679:13161:13229:14394:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: bee05_62b35cf54272e X-Filterd-Recvd-Size: 3582 From: Joe Perches To: Andrew Morton , linux-kernel@vger.kernel.org Cc: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org Subject: [PATCH 02/27] staging: lustre: Convert seq_ hash functions to return void Date: Sat, 21 Feb 2015 18:53:29 -0800 Message-Id: <73516be0ef954356fcf5a9009f1ae3cf202feb64.1424573328.git.joe@perches.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2862 Lines: 75 These functions don't need to return anything. No caller uses the return value. Miscellanea: Integrate the individual strings to reduce object size ~100 bytes. Signed-off-by: Joe Perches --- drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 4 ++-- drivers/staging/lustre/lustre/libcfs/hash.c | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h index 808e494..79a6299 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h @@ -785,8 +785,8 @@ static inline void __cfs_hash_set_theta(struct cfs_hash *hs, int min, int max) /* Generic debug formatting routines mainly for proc handler */ struct seq_file; -int cfs_hash_debug_header(struct seq_file *m); -int cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m); +void cfs_hash_debug_header(struct seq_file *m); +void cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m); /* * Generic djb2 hash algorithm for character arrays. diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 7c74073..a55567e 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -2008,14 +2008,10 @@ void cfs_hash_rehash_key(struct cfs_hash *hs, const void *old_key, } EXPORT_SYMBOL(cfs_hash_rehash_key); -int cfs_hash_debug_header(struct seq_file *m) +void cfs_hash_debug_header(struct seq_file *m) { - seq_printf(m, "%-*s%6s%6s%6s%6s%6s%6s%6s%7s%8s%8s%8s%s\n", - CFS_HASH_BIGNAME_LEN, - "name", "cur", "min", "max", "theta", "t-min", "t-max", - "flags", "rehash", "count", "maxdep", "maxdepb", - " distribution"); - return 0; + seq_printf(m, "%-*s cur min max theta t-min t-max flags rehash count maxdep maxdepb distribution\n", + CFS_HASH_BIGNAME_LEN, "name"); } EXPORT_SYMBOL(cfs_hash_debug_header); @@ -2043,7 +2039,7 @@ cfs_hash_full_nbkt(struct cfs_hash *hs) CFS_HASH_RH_NBKT(hs) : CFS_HASH_NBKT(hs); } -int cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m) +void cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m) { int dist[8] = { 0, }; int maxdep = -1; @@ -2098,7 +2094,5 @@ int cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m) seq_printf(m, "%d%c", dist[i], (i == 7) ? '\n' : '/'); cfs_hash_unlock(hs, 0); - - return 0; } EXPORT_SYMBOL(cfs_hash_debug_str); -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/