* [PATCH 0/2] ipmi: Make ipmi_usr_hndl const
@ 2017-01-10 13:40 minyard
2017-01-10 13:40 ` [PATCH 1/2] ipmi: make " minyard
2017-01-10 13:40 ` [PATCH 2/2] acpi:ipmi: Make IPMI user handler const minyard
0 siblings, 2 replies; 5+ messages in thread
From: minyard @ 2017-01-10 13:40 UTC (permalink / raw)
To: linux-kernel, openipmi-developer
This makes the handlers for IPMI users able to be const, then
sets all the users const. Trivial, but I need an ack from the
ACPI people on this. Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ipmi: make ipmi_usr_hndl const
2017-01-10 13:40 [PATCH 0/2] ipmi: Make ipmi_usr_hndl const minyard
@ 2017-01-10 13:40 ` minyard
2017-01-10 13:40 ` [PATCH 2/2] acpi:ipmi: Make IPMI user handler const minyard
1 sibling, 0 replies; 5+ messages in thread
From: minyard @ 2017-01-10 13:40 UTC (permalink / raw)
To: linux-kernel, openipmi-developer; +Cc: Corey Minyard
From: Corey Minyard <cminyard@mvista.com>
It's only function pointers.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
drivers/char/ipmi/ipmi_devintf.c | 2 +-
drivers/char/ipmi/ipmi_msghandler.c | 4 ++--
drivers/char/ipmi/ipmi_watchdog.c | 2 +-
include/linux/ipmi.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index a21407d..f45119c 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -108,7 +108,7 @@ static int ipmi_fasync(int fd, struct file *file, int on)
return (result);
}
-static struct ipmi_user_hndl ipmi_hndlrs =
+static const struct ipmi_user_hndl ipmi_hndlrs =
{
.ipmi_recv_hndl = file_receive_handler,
};
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 92e53ac..9f69995 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -102,7 +102,7 @@ struct ipmi_user {
struct kref refcount;
/* The upper layer that handles receive messages. */
- struct ipmi_user_hndl *handler;
+ const struct ipmi_user_hndl *handler;
void *handler_data;
/* The interface this user is bound to. */
@@ -919,7 +919,7 @@ static int intf_err_seq(ipmi_smi_t intf,
int ipmi_create_user(unsigned int if_num,
- struct ipmi_user_hndl *handler,
+ const struct ipmi_user_hndl *handler,
void *handler_data,
ipmi_user_t *user)
{
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 4035495..30b9e83 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -985,7 +985,7 @@ static void ipmi_wdog_pretimeout_handler(void *handler_data)
pretimeout_since_last_heartbeat = 1;
}
-static struct ipmi_user_hndl ipmi_hndlrs = {
+static const struct ipmi_user_hndl ipmi_hndlrs = {
.ipmi_recv_hndl = ipmi_wdog_msg_handler,
.ipmi_watchdog_pretimeout = ipmi_wdog_pretimeout_handler
};
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 78c5d5a..f1045b2 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -100,7 +100,7 @@ struct ipmi_user_hndl {
/* Create a new user of the IPMI layer on the given interface number. */
int ipmi_create_user(unsigned int if_num,
- struct ipmi_user_hndl *handler,
+ const struct ipmi_user_hndl *handler,
void *handler_data,
ipmi_user_t *user);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] acpi:ipmi: Make IPMI user handler const
2017-01-10 13:40 [PATCH 0/2] ipmi: Make ipmi_usr_hndl const minyard
2017-01-10 13:40 ` [PATCH 1/2] ipmi: make " minyard
@ 2017-01-10 13:40 ` minyard
2017-02-09 14:02 ` Rafael J. Wysocki
1 sibling, 1 reply; 5+ messages in thread
From: minyard @ 2017-01-10 13:40 UTC (permalink / raw)
To: linux-kernel, openipmi-developer
Cc: Corey Minyard, linux-acpi, Zhao Yakui, Lv Zheng
From: Corey Minyard <cminyard@mvista.com>
ipmi_create_user() now takes the user handlers as const, make
it const in the ACPI IPMI code.
Cc: linux-acpi@vger.kernel.org
Cc: Zhao Yakui <yakui.zhao@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
drivers/acpi/acpi_ipmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c
index f77956c..747c2ba 100644
--- a/drivers/acpi/acpi_ipmi.c
+++ b/drivers/acpi/acpi_ipmi.c
@@ -56,7 +56,7 @@ struct acpi_ipmi_device {
struct ipmi_driver_data {
struct list_head ipmi_devices;
struct ipmi_smi_watcher bmc_events;
- struct ipmi_user_hndl ipmi_hndlrs;
+ const struct ipmi_user_hndl ipmi_hndlrs;
struct mutex ipmi_lock;
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] acpi:ipmi: Make IPMI user handler const
2017-01-10 13:40 ` [PATCH 2/2] acpi:ipmi: Make IPMI user handler const minyard
@ 2017-02-09 14:02 ` Rafael J. Wysocki
2017-02-09 15:07 ` Corey Minyard
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2017-02-09 14:02 UTC (permalink / raw)
To: minyard
Cc: linux-kernel, openipmi-developer, Corey Minyard, linux-acpi,
Zhao Yakui, Lv Zheng
On Tuesday, January 10, 2017 07:40:13 AM minyard@acm.org wrote:
> From: Corey Minyard <cminyard@mvista.com>
>
> ipmi_create_user() now takes the user handlers as const, make
> it const in the ACPI IPMI code.
>
> Cc: linux-acpi@vger.kernel.org
> Cc: Zhao Yakui <yakui.zhao@intel.com>
> Cc: Lv Zheng <lv.zheng@intel.com>
> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Please let me know if you want me to apply this.
Otherwise, feel free to add my ACK to it and route it whatever way you think
is appropriate.
> ---
> drivers/acpi/acpi_ipmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c
> index f77956c..747c2ba 100644
> --- a/drivers/acpi/acpi_ipmi.c
> +++ b/drivers/acpi/acpi_ipmi.c
> @@ -56,7 +56,7 @@ struct acpi_ipmi_device {
> struct ipmi_driver_data {
> struct list_head ipmi_devices;
> struct ipmi_smi_watcher bmc_events;
> - struct ipmi_user_hndl ipmi_hndlrs;
> + const struct ipmi_user_hndl ipmi_hndlrs;
> struct mutex ipmi_lock;
>
> /*
>
Thanks,
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] acpi:ipmi: Make IPMI user handler const
2017-02-09 14:02 ` Rafael J. Wysocki
@ 2017-02-09 15:07 ` Corey Minyard
0 siblings, 0 replies; 5+ messages in thread
From: Corey Minyard @ 2017-02-09 15:07 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-kernel, openipmi-developer, Corey Minyard, linux-acpi,
Zhao Yakui, Lv Zheng
On 02/09/2017 08:02 AM, Rafael J. Wysocki wrote:
> On Tuesday, January 10, 2017 07:40:13 AM minyard@acm.org wrote:
>> From: Corey Minyard <cminyard@mvista.com>
>>
>> ipmi_create_user() now takes the user handlers as const, make
>> it const in the ACPI IPMI code.
>>
>> Cc: linux-acpi@vger.kernel.org
>> Cc: Zhao Yakui <yakui.zhao@intel.com>
>> Cc: Lv Zheng <lv.zheng@intel.com>
>> Signed-off-by: Corey Minyard <cminyard@mvista.com>
> Please let me know if you want me to apply this.
>
> Otherwise, feel free to add my ACK to it and route it whatever way you think
> is appropriate.
Thanks, I'll add your ACK and apply it through the IPMI tree.
-corey
>> ---
>> drivers/acpi/acpi_ipmi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c
>> index f77956c..747c2ba 100644
>> --- a/drivers/acpi/acpi_ipmi.c
>> +++ b/drivers/acpi/acpi_ipmi.c
>> @@ -56,7 +56,7 @@ struct acpi_ipmi_device {
>> struct ipmi_driver_data {
>> struct list_head ipmi_devices;
>> struct ipmi_smi_watcher bmc_events;
>> - struct ipmi_user_hndl ipmi_hndlrs;
>> + const struct ipmi_user_hndl ipmi_hndlrs;
>> struct mutex ipmi_lock;
>>
>> /*
>>
> Thanks,
> Rafael
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-09 15:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 13:40 [PATCH 0/2] ipmi: Make ipmi_usr_hndl const minyard
2017-01-10 13:40 ` [PATCH 1/2] ipmi: make " minyard
2017-01-10 13:40 ` [PATCH 2/2] acpi:ipmi: Make IPMI user handler const minyard
2017-02-09 14:02 ` Rafael J. Wysocki
2017-02-09 15:07 ` Corey Minyard
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).