From patchwork Tue Oct 24 16:06:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 157616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2048125vqx; Tue, 24 Oct 2023 09:07:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmDc8BSjDJscl4ZSG+lYm36ccAC/Lzae5o7JvAk+W5zifCo8B7XmjO0K4mAHlQ9lUdFnAi X-Received: by 2002:a05:6a20:3d87:b0:16b:b824:b25c with SMTP id s7-20020a056a203d8700b0016bb824b25cmr3399288pzi.25.1698163657032; Tue, 24 Oct 2023 09:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698163657; cv=none; d=google.com; s=arc-20160816; b=b9E3hYkBwJRhnEH9CkRmdm9KE3bPuR51SHHoUHeQdoLvYZQH605c4cLMtNxXOSZ0w6 WYZKWZPizis0ENpczy+QISdFGvjwB0m6QOk/FCDy8QS5/bnf86shKhrV2rnPlbjRs0ET IFl0NRToxVcB0zEaScc6D6xZQDY5gJQp3bIupnKWiDVkkkxa/dU1ViIdKt0JQmn9aJcU peozMhoNIjIU062o1TSkox86tAQ+krNokfteR04REUckTYIkPZX9IX0Cj0zl5WsQ+lFH bfZXHJKXkEEw/kkr73wthUBa0U3GwW/damewI8ZDWyGY09lCvou2hGJf2vtaW1wHZn/L QmhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XAwtnfDHUEdtJaux0lwE8qa/l9KmwrgLyA1TN8N7CU0=; fh=Q3D7GhAxgFaxxrYzsEjONTZWyprJjsOzFPHxeXzYRH8=; b=Ih5oV2kf4froG+afxgrbIawFWog9S4HvXImthmLwusQXULpVeRN2x1vID6t/lwY7pI z8x9oVg3iRiIy5oPovaVZazJUs5GDPTsFlJXcaMiVl1qpXQCVU7mvnyhpO4Tc/cDNquZ 3u/hVqMYsUVnY35VZ/CL422Nt4ycpLCKmman9Qe2T3p/6lBZMyqJJtBBN58dU/ZQC0fT lcYyryOHaFsJwwwa39YMy4IP4VdiXkNo+S+4xrpDboWiC+DAokx51Azod09Cx2fvoFdx hEfvH6x1HSZwM9SM10fGshrnuHl0dwNIjiWJMtsjAtTuPucTHrn3eyp2yqGiTDqZxi+7 PZGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MssigBuR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id fh11-20020a056a00390b00b00690f9e835d8si8825119pfb.132.2023.10.24.09.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 09:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MssigBuR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A70E7804755D; Tue, 24 Oct 2023 09:07:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234736AbjJXQHX (ORCPT + 27 others); Tue, 24 Oct 2023 12:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234605AbjJXQHV (ORCPT ); Tue, 24 Oct 2023 12:07:21 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0377F83 for ; Tue, 24 Oct 2023 09:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698163640; x=1729699640; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SxHTvq6BPePXOTB4pvdjl6aHwNbPEB47pf2wiGfYb1o=; b=MssigBuR5UyyazIqFLVNV3KsCNoK7agbkLyKL1Xk/0ZjhB/0bGGLYvn5 xsHQ/CzWe5TrXaOt75kbplJ5fcMI0/gBDT4FwyFeL0uu85T+XqN9K+ZZU Yb8owXvCmbcxKZllOn6aqxgI7ksGubgPkN9rQhjthsxgoxivM2e6AJ3fR 7Pv1nW3kF8UFYr3JoD0NY4HEDslIa3KSfeTdKAakUFAH/ST7EimCdK320 vbvqf72gYwHPwA32Z7L+QaOpJmK8aeMBwLRcs/NPoa1unSLkwfhic7s41 EXRtZOS9jxqhBV6MVumWjhUt3C/L2gwA2Y4IFiDaTIFSZN724fXQUydx7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="5722825" X-IronPort-AV: E=Sophos;i="6.03,248,1694761200"; d="scan'208";a="5722825" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 09:06:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="735076664" X-IronPort-AV: E=Sophos;i="6.03,248,1694761200"; d="scan'208";a="735076664" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 24 Oct 2023 09:06:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id AE48F195; Tue, 24 Oct 2023 19:06:51 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Lee Jones , linux-kernel@vger.kernel.org Cc: Peter Tyser Subject: [PATCH v1 1/1] mfd: lpc_ich: Mark *_gpio_offsets data with const Date: Tue, 24 Oct 2023 19:06:50 +0300 Message-Id: <20231024160650.3898959-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 24 Oct 2023 09:07:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780653654552778467 X-GMAIL-MSGID: 1780653654552778467 There is no reason why the GPIO resource offsets should not be const. Mark them accordingly and update a qualifier in struct lpc_ich_gpio_info definition. Signed-off-by: Andy Shevchenko --- drivers/mfd/lpc_ich.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c index ea5f01e07daf..73a0e7f9bd31 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c @@ -139,7 +139,7 @@ struct lpc_ich_gpio_info { size_t nr_devices; struct resource **resources; size_t nr_resources; - resource_size_t *offsets; + const resource_size_t *offsets; }; #define APL_GPIO_NORTH 0 @@ -151,7 +151,7 @@ struct lpc_ich_gpio_info { #define APL_GPIO_NR_RESOURCES 4 /* Offset data for Apollo Lake GPIO controllers */ -static resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = { +static const resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = { [APL_GPIO_NORTH] = 0xc50000, [APL_GPIO_NORTHWEST] = 0xc40000, [APL_GPIO_WEST] = 0xc70000, @@ -233,7 +233,7 @@ static const struct lpc_ich_gpio_info apl_gpio_info = { #define DNV_GPIO_NR_RESOURCES 2 /* Offset data for Denverton GPIO controllers */ -static resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = { +static const resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = { [DNV_GPIO_NORTH] = 0xc20000, [DNV_GPIO_SOUTH] = 0xc50000, };