From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: linux-modules@vger.kernel.org
Cc: lucas.de.marchi@gmail.com, Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Subject: [PATCH 3/3] libkmod: kmod_log_null: qualify ctx argument as const
Date: Sun, 29 Nov 2020 18:47:37 +0200 [thread overview]
Message-ID: <20201129164737.135866-3-yauheni.kaliuta@redhat.com> (raw)
In-Reply-To: <20201129164737.135866-1-yauheni.kaliuta@redhat.com>
kmod_log_null() does not change ctx (does nothing).
Fix warnings
In file included from libkmod/libkmod-index.c:33:
libkmod/libkmod-index.c: In function ‘index_mm_open’:
libkmod/libkmod-index.c:757:6: warning: passing argument 1 of ‘kmod_log_null’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
757 | DBG(ctx, "file=%s\n", filename);
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
---
libkmod/libkmod-internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
index b22ac2a5f89e..398af9ce756a 100644
--- a/libkmod/libkmod-internal.h
+++ b/libkmod/libkmod-internal.h
@@ -11,7 +11,7 @@
#include "libkmod.h"
static _always_inline_ _printf_format_(2, 3) void
- kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {}
+ kmod_log_null(const struct kmod_ctx *ctx, const char *format, ...) {}
#define kmod_log_cond(ctx, prio, arg...) \
do { \
--
2.29.2
next prev parent reply other threads:[~2020-11-29 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 16:47 [PATCH 1/3] libkmod: kmod_builtin_get_modinfo: free modinfo on error Yauheni Kaliuta
2020-11-29 16:47 ` [PATCH 2/3] depmod: output_builtin_alias_bin: free idx on error path Yauheni Kaliuta
2020-11-29 16:47 ` Yauheni Kaliuta [this message]
2020-12-01 10:06 ` [PATCH 1/3] libkmod: kmod_builtin_get_modinfo: free modinfo on error Lucas De Marchi
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=20201129164737.135866-3-yauheni.kaliuta@redhat.com \
--to=yauheni.kaliuta@redhat.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
/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 NNTP newsgroup(s).