From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: smatch@vger.kernel.org
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: [PATCH] check_kvmalloc_NOFS: Report the correct function name that triggered the warning
Date: Thu, 26 May 2022 07:02:49 +0200 [thread overview]
Message-ID: <6ad9570f2f3231fca7b515e9e3d79cb8bbbd7f6c.1653541351.git.christophe.jaillet@wanadoo.fr> (raw)
The warning message has a hard-coded 'kvmalloc' but several other functions
can trigger this warning.
So, report the correct function name to be less puzzling.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
check_kvmalloc_NOFS.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check_kvmalloc_NOFS.c b/check_kvmalloc_NOFS.c
index c32f6805b78e..fba9564e84fa 100644
--- a/check_kvmalloc_NOFS.c
+++ b/check_kvmalloc_NOFS.c
@@ -33,7 +33,7 @@ static void match_alloc(const char *fn, struct expression *expr, void *_arg)
!(sval.uvalue & GFP_ATOMIC()))
return;
- sm_error("kvmalloc() does not make sense for no sleep code");
+ sm_error("%s() does not make sense for no sleep code", fn);
}
void check_kvmalloc_NOFS(int id)
--
2.34.1
reply other threads:[~2022-05-26 5:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ad9570f2f3231fca7b515e9e3d79cb8bbbd7f6c.1653541351.git.christophe.jaillet@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=smatch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).