lkml.org 
[lkml]   [2019]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] sctp: chunk.c: correct format string for size_t in printk
From
Date
On Thu, 2019-02-28 at 11:36 +0000, Matthias Maennich wrote:
> According to Documentation/core-api/printk-formats.rst, size_t should be
> printed with %zu, rather than %Zu.
>
> In addition, using %Zu triggers a warning on clang (-Wformat-extra-args):
[]
> diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
[]
> @@ -192,7 +192,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
> if (unlikely(!max_data)) {
> max_data = sctp_min_frag_point(sctp_sk(asoc->base.sk),
> sctp_datachk_len(&asoc->stream));
> - pr_warn_ratelimited("%s: asoc:%p frag_point is zero, forcing max_data to default minimum (%Zu)",
> + pr_warn_ratelimited("%s: asoc:%p frag_point is zero, forcing max_data to default minimum (%zu)",
> __func__, asoc, max_data);

trivia: the format is also missing a terminating '\n'

\
 
 \ /
  Last update: 2019-03-01 23:23    [W:0.116 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site