From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbdGaIB6 (ORCPT ); Mon, 31 Jul 2017 04:01:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:58512 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750739AbdGaIB5 (ORCPT ); Mon, 31 Jul 2017 04:01:57 -0400 Date: Mon, 31 Jul 2017 10:01:53 +0200 From: Jean Delvare To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmi: mark all struct dmi_system_id instances const Message-ID: <20170731100153.5a9d0c11@endymion> In-Reply-To: <20170515203056.22626-1-hch@lst.de> References: <20170515203056.22626-1-hch@lst.de> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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