Commit 328aff9b authored by Vlastimil Babka's avatar Vlastimil Babka Committed by Treehugger Robot
Browse files

FROMGIT: mm, slab: cleanup slab_bug() parameters



slab_err() has variadic printf arguments but instead of passing them to
slab_bug() it does vsnprintf() to a buffer and passes %s, buf.

To allow passing them directly, turn slab_bug() to __slab_bug() with a
va_list parameter, and slab_bug() a wrapper with fmt, ... parameters.
Then slab_err() can call __slab_bug() without the intermediate buffer.

Also constify fmt everywhere, which also simplifies object_err()'s
call to slab_bug().

Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>

Link: https://lore.kernel.org/linux-mm/20250226081206.680495-1-hyesoo.yu@samsung.com/


(cherry picked from commit 050abb34621035722e1a6f89eb010955d2be9533
 https: //git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-6.15/fixes-cleanups)
Bug: 399511949
Change-Id: I0e535dfe9cdd5d21dfd6c88f7d310c0bbf415cb9
Signed-off-by: default avatarHyesoo Yu <hyesoo.yu@samsung.com>
parent 4aa6c22f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment