Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699798

Re: [PATCH] dmi: mark all struct dmi_system_id instances const

From Jean Delvare <jdelvare@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH] dmi: mark all struct dmi_system_id instances const
Date 2017-07-31 10:10 +0200
Message-ID <u9dW1-3NI-13@gated-at.bofh.it> (permalink)
References <tHuWB-4t8-3@gated-at.bofh.it>
Organization SUSE Linux

Show all headers | View raw


Hi Christoph,

Sorry for the delay, this patch slipped trough the cracks somehow, I
only noticed it in my mailbox today.

On Mon, 15 May 2017 22:30:56 +0200, Christoph Hellwig wrote:
> ... and __initconst if applicable.
> 
> Based on similar work for an older kernel in the Grsecurity patch.

On the principle I think it is a good idea. I am not sure if pushing it
as a single patch through my dmi tree is the best thing to do, as it
could result in conflicts. The other option is to break it out on a per
subsystem basis. That being said, I just tried to apply this 2.5 months
later and there was no single conflict, so maybe a single patch is fine.

One issue though:

> (...)
> diff --git a/drivers/platform/x86/toshiba-wmi.c b/drivers/platform/x86/toshiba-wmi.c
> index 440528676170..1756ccf69612 100644
> --- a/drivers/platform/x86/toshiba-wmi.c
> +++ b/drivers/platform/x86/toshiba-wmi.c
> @@ -64,7 +64,7 @@ static void toshiba_wmi_notify(u32 value, void *context)
>  	kfree(response.pointer);
>  }
>  
> -static struct dmi_system_id toshiba_wmi_dmi_table[] __initdata = {
> +static struct const dmi_system_id toshiba_wmi_dmi_table[] __initconst = {
>  	{
>  		.ident = "Toshiba laptop",
>  		.matches = {

"struct const dmi_system_id" doesn't build, it should be "const struct
dmi_system_id".

I'll fix that up. Also I see a new instance to fix in
drivers/input/touchscreen/htcpen.c, I'll take care of that.

Lastly checkpatch complains about the position of __initconst on 18
instances, I'll fix that as well.

Thanks,
-- 
Jean Delvare
SUSE L3 Support

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] dmi: mark all struct dmi_system_id instances const Jean Delvare <jdelvare@suse.de> - 2017-07-31 10:10 +0200

csiph-web