All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Cc: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	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	[thread overview]
Message-ID: <73516be0ef954356fcf5a9009f1ae3cf202feb64.1424573328.git.joe@perches.com> (raw)
In-Reply-To: <cover.1424573328.git.joe@perches.com>

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 <joe@perches.com>
---
 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


  parent reply	other threads:[~2015-02-22  3:01 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22  2:53 [PATCH 00/27] Convert seq_<foo> output calls to return void Joe Perches
2015-02-22  2:53 ` Joe Perches
2015-02-22  2:53 ` Joe Perches
2015-02-22  2:53 ` [PATCH 01/27] staging: lustre: Convert "return seq_printf(...)" uses Joe Perches
2015-02-22  2:53 ` Joe Perches [this message]
2015-02-22  2:53 ` [PATCH 03/27] staging: lustre: Convert uses of "int rc = seq_printf(...)" Joe Perches
2015-03-02  1:22   ` Greg Kroah-Hartman
2015-03-02  3:58     ` [PATCH 03/27 V2] " Joe Perches
2015-02-22  2:53 ` [PATCH 04/27] staging: lustre: Convert remaining uses of "= seq_printf(...)" Joe Perches
2015-02-22  2:53 ` [PATCH 05/27] x86: mtrr: if: Remove use of seq_printf return value Joe Perches
2015-02-22  2:53 ` [PATCH 06/27] power: wakeup: " Joe Perches
2015-02-22 21:38   ` Pavel Machek
2015-02-22 21:52     ` Joe Perches
2015-02-23 11:54       ` Pavel Machek
2015-02-22  2:53 ` [PATCH 07/27] ipmi: " Joe Perches
2015-02-23 23:50   ` Andrew Morton
2015-02-24  1:23     ` Joe Perches
2015-02-22  2:53 ` [PATCH 08/27] rtc: " Joe Perches
2015-02-22  2:53 ` [PATCH 09/27] ipc: " Joe Perches
2015-02-22  2:53 ` [PATCH 10/27] pxa27x_udc: " Joe Perches
2015-02-22  2:53   ` Joe Perches
2015-02-22 10:22   ` Robert Jarzmik
2015-02-22 10:22     ` Robert Jarzmik
2015-02-22  2:53 ` [PATCH 11/27] microblaze: mb: " Joe Perches
2015-02-23 11:39   ` Michal Simek
2015-02-22  2:53 ` [PATCH 12/27] nios2: cpuinfo: " Joe Perches
2015-02-22  2:53 ` [PATCH 13/27] ARM: plat-pxa: " Joe Perches
2015-02-22  2:53   ` Joe Perches
2015-02-22  2:53 ` [PATCH 14/27] openrisc: " Joe Perches
2015-02-22  2:53 ` [PATCH 15/27] cris: " Joe Perches
2015-02-22  2:53 ` [PATCH 16/27] mfd: ab8500-debugfs: " Joe Perches
2015-02-22  2:53   ` Joe Perches
2015-03-06 10:54   ` Lee Jones
2015-03-06 10:54     ` Lee Jones
2015-02-22  2:53 ` [PATCH 17/27] staging: i2o: " Joe Perches
2015-02-22  2:53 ` [PATCH 18/27] staging: rtl8192x: " Joe Perches
2015-02-22  2:53 ` [PATCH 19/27] s390: " Joe Perches
2015-02-22 12:53   ` Sebastian Ott
2015-02-22  2:53 ` [PATCH 20/27] i8k: " Joe Perches
2015-02-22  4:55   ` Guenter Roeck
2015-02-22  2:53 ` [PATCH 21/27] watchdog: bcm281xx: " Joe Perches
2015-02-23 19:29   ` [21/27] " Guenter Roeck
2015-03-27  7:57   ` [PATCH 21/27] " Wim Van Sebroeck
2015-02-22  2:53 ` [PATCH 22/27] proc: " Joe Perches
2015-02-22  2:53 ` [PATCH 23/27] cgroup: " Joe Perches
2015-02-22 13:41   ` Tejun Heo
2015-02-22 13:41     ` Tejun Heo
2015-02-22  2:53 ` [PATCH 24/27] tracing: " Joe Perches
2015-02-22  3:54   ` Steven Rostedt
2015-02-22  4:41     ` Al Viro
2015-02-22 10:39       ` Joe Perches
2015-02-23 17:20         ` Steven Rostedt
2015-02-23 17:36           ` Joe Perches
2015-02-22  2:53 ` [PATCH 25/27] lru_cache: " Joe Perches
2015-02-22  2:53 ` [PATCH 26/27] parisc: " Joe Perches
2015-02-22  2:53 ` [PATCH 27/27] regulator: dbx500: Remove use of seq_puts/seq_printf " Joe Perches
2015-02-23 13:55   ` Mark Brown
2015-02-23 14:52     ` Joe Perches
2015-02-24  8:18       ` Mark Brown
2015-02-22  4:00 ` [PATCH V2 - 15/27] cris: Remove use of seq_printf " Joe Perches
2015-02-23  7:18   ` Jesper Nilsson
     [not found] ` <cover.1424573328.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2015-02-22  4:02   ` [PATCH V2 - 08/27] rtc: " Joe Perches
2015-02-22  4:02     ` Joe Perches
2015-02-26 12:10 ` [PATCH 11/27 v2] microblaze: mb: " Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73516be0ef954356fcf5a9009f1ae3cf202feb64.1424573328.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=HPDD-discuss@ml01.01.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.