mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] lib-stackdepotc-use-array_size-helper-in-jhash2.patch removed from -mm tree
@ 2020-12-16 17:08 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-16 17:08 UTC (permalink / raw)
  To: gustavoars, mm-commits


The patch titled
     Subject: lib/stackdepot.c: use array_size() helper in jhash2()
has been removed from the -mm tree.  Its filename was
     lib-stackdepotc-use-array_size-helper-in-jhash2.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: lib/stackdepot.c: use array_size() helper in jhash2()

Use array_size() helper instead of the open-coded version in jhash2(). 
These sorts of multiplication factors need to be wrapped in array_size().

Also, use the preferred form for passing the size of an object type.

Link: https://lkml.kernel.org/r/cb8a682e4bba4dbddd2bd8aca7f8c02fea89639b.1601565471.git.gustavoars@kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/stackdepot.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/lib/stackdepot.c~lib-stackdepotc-use-array_size-helper-in-jhash2
+++ a/lib/stackdepot.c
@@ -154,8 +154,8 @@ static struct stack_record *stack_table[
 static inline u32 hash_stack(unsigned long *entries, unsigned int size)
 {
 	return jhash2((u32 *)entries,
-			       size * sizeof(unsigned long) / sizeof(u32),
-			       STACK_HASH_SEED);
+		      array_size(size,  sizeof(*entries)) / sizeof(u32),
+		      STACK_HASH_SEED);
 }
 
 /* Use our own, non-instrumented version of memcmp().
_

Patches currently in -mm which might be from gustavoars@kernel.org are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-16 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 17:08 [merged] lib-stackdepotc-use-array_size-helper-in-jhash2.patch removed from -mm tree akpm

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).