From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ADAFC4332D for ; Thu, 18 Mar 2021 12:54:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5DB4664F6D for ; Thu, 18 Mar 2021 12:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbhCRMyJ (ORCPT ); Thu, 18 Mar 2021 08:54:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:14571 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbhCRMxp (ORCPT ); Thu, 18 Mar 2021 08:53:45 -0400 IronPort-SDR: ZKZ4HQWw6aI6VuoweXJBLis+xsUypN3yObxhF4Q4zbhOwREklVfuGK5hcjq6Z1d14yS4WrcuzO 3nJSitqrPA0w== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176798384" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="176798384" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 05:53:44 -0700 IronPort-SDR: REme8/ZrUHCGiLvCO6NgICXEijnEmBLm+3mrXPLMq7pRrUYYHzPW72PLKZzRaA9SGUQ25LmP3I 1nDZcQCDJcZA== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="450470828" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 05:53:43 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lMs9k-00DZQO-TJ; Thu, 18 Mar 2021 14:53:40 +0200 Date: Thu, 18 Mar 2021 14:53:40 +0200 From: Andy Shevchenko To: Rikard Falkeborn Cc: linux-kernel@vger.kernel.org, Lee Jones Subject: Re: [PATCH v1 1/5] mfd: intel_quark_i2c_gpio: revert "Constify static struct resources" Message-ID: References: <20210302135620.89958-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 09:59:03PM +0100, Rikard Falkeborn wrote: > On Tue, Mar 02, 2021 at 03:56:16PM +0200, Andy Shevchenko wrote: > > The structures are used as place holders, so they are modified at run-time. > > Obviously they may not be constants. > > > > BUG: unable to handle page fault for address: d0643220 > > ... > > CPU: 0 PID: 110 Comm: modprobe Not tainted 5.11.0+ #1 > > Hardware name: Intel Corp. QUARK/GalileoGen2, BIOS 0x01000200 01/01/2014 > > EIP: intel_quark_mfd_probe+0x93/0x1c0 [intel_quark_i2c_gpio] > > > > This partially reverts the commit c4a164f41554d2899bed94bdcc499263f41787b4. > > > > While at it, add a comment to avoid similar changes in the future. > > > > Fixes: c4a164f41554 ("mfd: Constify static struct resources") > > Cc: Rikard Falkeborn > > Signed-off-by: Andy Shevchenko > > --- > > drivers/mfd/intel_quark_i2c_gpio.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c > > index 55a9e017edee..124c0ee84169 100644 > > --- a/drivers/mfd/intel_quark_i2c_gpio.c > > +++ b/drivers/mfd/intel_quark_i2c_gpio.c > > @@ -72,7 +72,8 @@ static const struct dmi_system_id dmi_platform_info[] = { > > {} > > }; > > > > -static const struct resource intel_quark_i2c_res[] = { > > +/* This is used as a place holder and will be modified at run-time */ > > +static struct resource intel_quark_i2c_res[] = { > > [INTEL_QUARK_IORES_MEM] = { > > .flags = IORESOURCE_MEM, > > }, > > @@ -85,7 +86,8 @@ static struct mfd_cell_acpi_match intel_quark_acpi_match_i2c = { > > .adr = MFD_ACPI_MATCH_I2C, > > }; > > > > -static const struct resource intel_quark_gpio_res[] = { > > +/* This is used as a place holder and will be modified at run-time */ > > +static struct resource intel_quark_gpio_res[] = { > > [INTEL_QUARK_IORES_MEM] = { > > .flags = IORESOURCE_MEM, > > }, > > -- > > 2.30.1 > > > > Sorry about that :( > > Reviewed-by: Rikard Falkeborn Thanks for review! Lee, this series has a critical bug fix, should I do something or you is going to apply this soon? -- With Best Regards, Andy Shevchenko