Skip to content

Commit

Permalink
kmemtrace: Better alternative to "kmemtrace: fix printk format warnin…
Browse files Browse the repository at this point in the history
…gs".

Fix the problem "kmemtrace: fix printk format warnings" attempted to fix,
but resulted in marker-probe format mismatch warnings. Instead of carrying
size_t into probes, we get rid of it by casting to unsigned long, just as
we did with gfp_t.

This way, we don't need to change marker format strings and we don't have
to rely on other format specifiers like "%zu", making for consistent use
of more generic data types (since there are no format specifiers for
gfp_t, for example).

Signed-off-by: Eduard - Gabriel Munteanu <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
  • Loading branch information
edgmnt authored and Pekka Enberg committed Dec 29, 2008
1 parent 4a80b24 commit 73cd6af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/kmemtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ static inline void kmemtrace_mark_alloc_node(enum kmemtrace_type_id type_id,
trace_mark(kmemtrace_alloc, "type_id %d call_site %lu ptr %lu "
"bytes_req %lu bytes_alloc %lu gfp_flags %lu node %d",
type_id, call_site, (unsigned long) ptr,
bytes_req, bytes_alloc, (unsigned long) gfp_flags, node);
(unsigned long) bytes_req, (unsigned long) bytes_alloc,
(unsigned long) gfp_flags, node);
}

static inline void kmemtrace_mark_free(enum kmemtrace_type_id type_id,
Expand Down

0 comments on commit 73cd6af

Please sign in to comment.