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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 1D6A3C433E0 for ; Fri, 5 Mar 2021 10:23:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86D1764F5B for ; Fri, 5 Mar 2021 10:23:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86D1764F5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OHfNCDzdRm17gBDxfP84GVksKHcqLXYqGwmLyiAPmPQ=; b=D3n6XGWiI5YZps1S05/nNt/zO qS7sfdgrkVIih71v3V4VqM4SXCf15ndZBK67KdMx0W55+KaFiqVIjwKG+b7qi7YTbAZSOQCl7kFO7 E6esM45ONnfDtnSCdfnMmKuZVIdOznaeEuZ21+6eAA9doShZoDjKSe4od+xJjtYltxSoPq0HnI1js Tqod1dNIsLsJlfr6ts/pv9jt1ZriauPkZ1aIeKChkp5IUx6GEJy1wqC/SZK6hMgaNBcdosBCnWOtP B2cF9gunX/olow+PnqX3V+VEvvY9ci8vUwPr761Tsyj1igHuCnBGkZNwuBeRCF099xYEsitmGZ0DE HWCUs9meg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI7aU-00EWUb-11; Fri, 05 Mar 2021 10:21:38 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lI7ZH-00EW1c-6D for linux-arm-kernel@desiato.infradead.org; Fri, 05 Mar 2021 10:20:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iM5wBRocEWH0MW0kXlp5gqEtLsHOuxliV/UMZNvg6yE=; b=DralUpWhNp5Tg8WHb1Xtc8lO1m FlvqaJDbr2zSdG5KGuyH4zj/0CStKa0My4hPiy0KY4cON/gNr+DtglGN14w5o0/MqDM1FyTyX5vDH kqlFZudg0MR4WhRxDtBhJMdlP5bIgAs1AhQfM174yi7aoXWlsSEufdwyluPKoNhkwPy9caEgxNg2/ jIVJNn2TelLxrKMMu2BBHoEOzwjEn7Ys7SWYApp/iyOfuerwIFbv5hWu2+EJO+xxV64657MxhhGUn 7uujzdE9LJHhH/3Q9176PV10PBsDZhjJX8/7yWa20XstNjj5IYGRRZDVHJxhgIl2EiiYdZfxbmbDq mnL366Qg==; Received: from mga01.intel.com ([192.55.52.88]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lI7Ya-00BCEZ-J0 for linux-arm-kernel@lists.infradead.org; Fri, 05 Mar 2021 10:20:06 +0000 IronPort-SDR: hhnxyBbV6Oksytb/crQi1m8LgPrn/uRfXuMTsbKZSV5SWkkegfv7h8tZ6zj2Fyre9QQbP9tXWz Uw0zUjx0rSKQ== X-IronPort-AV: E=McAfee;i="6000,8403,9913"; a="207351398" X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="207351398" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 02:18:36 -0800 IronPort-SDR: WWc9C3FxVSf9WalrZTEPUKZssB4unKhpo9fXKPA2/ab2PH4KOwIAqukM+KCAiTat61SUL21f7g WLK58LpPz8kQ== X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="507951556" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 02:18:34 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lI7XU-00A60q-40; Fri, 05 Mar 2021 12:18:32 +0200 Date: Fri, 5 Mar 2021 12:18:32 +0200 From: Andy Shevchenko To: Rikard Falkeborn Cc: Lee Jones , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mfd: stmpe: Revert "Constify static struct resource" Message-ID: References: <20210304230709.3217-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210304230709.3217-1-rikard.falkeborn@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_101948_363367_B4537241 X-CRM114-Status: GOOD ( 19.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 05, 2021 at 12:07:09AM +0100, Rikard Falkeborn wrote: > In stmpe_devices_init(), the start and end field of these structs are > modified, so they can not be const. Add a comment to those structs that > lacked it to reduce the risk that this happens again. > > This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b. FWIW, Reviewed-by: Andy Shevchenko > Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource") > Reported-by: Andy Shevchenko > Signed-off-by: Rikard Falkeborn > --- > Changes > V1-V2: Add comments to the structs that they are dynamically modified > Rewrite commit message. > > V1: https://lore.kernel.org/lkml/20210302234710.74455-1-rikard.falkeborn@gmail.com/ > > drivers/mfd/stmpe.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c > index 90f3292230c9..1dd39483e7c1 100644 > --- a/drivers/mfd/stmpe.c > +++ b/drivers/mfd/stmpe.c > @@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc); > * GPIO (all variants) > */ > > -static const struct resource stmpe_gpio_resources[] = { > +static struct resource stmpe_gpio_resources[] = { > /* Start and end filled dynamically */ > { > .flags = IORESOURCE_IRQ, > @@ -336,7 +336,8 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = { > * Keypad (1601, 2401, 2403) > */ > > -static const struct resource stmpe_keypad_resources[] = { > +static struct resource stmpe_keypad_resources[] = { > + /* Start and end filled dynamically */ > { > .name = "KEYPAD", > .flags = IORESOURCE_IRQ, > @@ -357,7 +358,8 @@ static const struct mfd_cell stmpe_keypad_cell = { > /* > * PWM (1601, 2401, 2403) > */ > -static const struct resource stmpe_pwm_resources[] = { > +static struct resource stmpe_pwm_resources[] = { > + /* Start and end filled dynamically */ > { > .name = "PWM0", > .flags = IORESOURCE_IRQ, > @@ -445,7 +447,8 @@ static struct stmpe_variant_info stmpe801_noirq = { > * Touchscreen (STMPE811 or STMPE610) > */ > > -static const struct resource stmpe_ts_resources[] = { > +static struct resource stmpe_ts_resources[] = { > + /* Start and end filled dynamically */ > { > .name = "TOUCH_DET", > .flags = IORESOURCE_IRQ, > @@ -467,7 +470,8 @@ static const struct mfd_cell stmpe_ts_cell = { > * ADC (STMPE811) > */ > > -static const struct resource stmpe_adc_resources[] = { > +static struct resource stmpe_adc_resources[] = { > + /* Start and end filled dynamically */ > { > .name = "STMPE_TEMP_SENS", > .flags = IORESOURCE_IRQ, > -- > 2.30.1 > -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel