From: Randy Dunlap <randy.dunlap@Oracle.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
linux-next@vger.kernel.org, Corey Minyard <minyard@acm.org>
Subject: [PATCH -next] ipmi: fix module param sparse warnings
Date: Thu, 24 Jun 2010 15:21:22 -0700 [thread overview]
Message-ID: <20100624152122.bfc0472a.randy.dunlap@oracle.com> (raw)
From: Randy Dunlap <randy.dunlap@oracle.com>
The <arg> parameter in module_param_cb() should be a pointer,
i.e., like one of these:
union {
void *arg;
const struct kparam_string *str;
const struct kparam_array *arr;
};
sparse complains:
drivers/char/ipmi/ipmi_watchdog.c:303:1: error: cannot dereference this type
drivers/char/ipmi/ipmi_watchdog.c:307:1: error: cannot dereference this type
drivers/char/ipmi/ipmi_watchdog.c:311:1: error: cannot dereference this type
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Corey Minyard <minyard@acm.org>
---
Note: patch is against linux-next, since these lines have changed recently.
drivers/char/ipmi/ipmi_watchdog.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-next-20100528.orig/drivers/char/ipmi/ipmi_watchdog.c
+++ linux-next-20100528/drivers/char/ipmi/ipmi_watchdog.c
@@ -300,15 +300,15 @@ MODULE_PARM_DESC(timeout, "Timeout value
module_param(pretimeout, timeout, 0644);
MODULE_PARM_DESC(pretimeout, "Pretimeout value in seconds.");
-module_param_cb(action, ¶m_ops_str, action_op, 0644);
+module_param_cb(action, ¶m_ops_str, &action_op, 0644);
MODULE_PARM_DESC(action, "Timeout action. One of: "
"reset, none, power_cycle, power_off.");
-module_param_cb(preaction, ¶m_ops_str, preaction_op, 0644);
+module_param_cb(preaction, ¶m_ops_str, &preaction_op, 0644);
MODULE_PARM_DESC(preaction, "Pretimeout action. One of: "
"pre_none, pre_smi, pre_nmi, pre_int.");
-module_param_cb(preop, ¶m_ops_str, preop_op, 0644);
+module_param_cb(preop, ¶m_ops_str, &preop_op, 0644);
MODULE_PARM_DESC(preop, "Pretimeout driver operation. One of: "
"preop_none, preop_panic, preop_give_data.");
next reply other threads:[~2010-06-24 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 22:21 Randy Dunlap [this message]
2010-06-25 12:50 ` [PATCH -next] ipmi: fix module param sparse warnings Rusty Russell
2010-06-25 16:21 ` Randy Dunlap
2010-06-28 9:35 ` Rusty Russell
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=20100624152122.bfc0472a.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=minyard@acm.org \
--cc=rusty@rustcorp.com.au \
/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).