linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace-cmd: remove ununsed knuth_hash*() routines
@ 2019-06-26  6:01 Greg Thelen
  2019-06-26 19:34 ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Thelen @ 2019-06-26  6:01 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-devel, Greg Thelen

Neither knuth_hash16() nor knuth_hash() are used.
Delete them.

Signed-off-by: Greg Thelen <gthelen@google.com>
---
 lib/trace-cmd/trace-filter-hash.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/lib/trace-cmd/trace-filter-hash.c b/lib/trace-cmd/trace-filter-hash.c
index 39b28790e0bc..c56628f69ff0 100644
--- a/lib/trace-cmd/trace-filter-hash.c
+++ b/lib/trace-cmd/trace-filter-hash.c
@@ -29,26 +29,6 @@ static inline uint8_t knuth_hash8(uint32_t val)
 	return UINT8_C(val) * UINT8_C(157);
 }
 
-static inline uint16_t knuth_hash16(uint32_t val)
-{
-	/*
-	 * Multiplicative hashing function.
-	 * Multiplication by the Prime number, closest to the golden
-	 * ratio of 2^16.
-	 */
-	return UINT16_C(val) * UINT16_C(40507);
-}
-
-static inline uint32_t knuth_hash(uint32_t val)
-{
-	/*
-	 * Multiplicative hashing function.
-	 * Multiplication by the Prime number, closest to the golden
-	 * ratio of 2^32.
-	 */
-	return val * UINT32_C(2654435761);
-}
-
 struct tracecmd_filter_id_item *
 tracecmd_filter_id_find(struct tracecmd_filter_id *hash, int id)
 {
-- 
2.22.0.410.gd8fdbe21b5-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-05 13:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  6:01 [PATCH] trace-cmd: remove ununsed knuth_hash*() routines Greg Thelen
2019-06-26 19:34 ` Steven Rostedt
2019-06-27 15:40   ` Yordan Karadzhov (VMware)
2019-06-27 16:15     ` Steven Rostedt
2019-06-28 15:55       ` Greg Thelen
2019-06-29  6:27       ` [PATCH v2] " Greg Thelen
2019-07-01 12:23         ` Yordan Karadzhov (VMware)
2019-07-05 13:31         ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).