Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1672109rdb; Sat, 23 Dec 2023 18:01:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFur6vxLoyy1hFDAj9m8yVlaE7567kA39X3uB3Wzt9mJUJf4d2PAQATwrC+SPDJTxSx38qe X-Received: by 2002:a05:6214:2023:b0:67f:6579:6732 with SMTP id 3-20020a056214202300b0067f65796732mr6851836qvf.47.1703383268431; Sat, 23 Dec 2023 18:01:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703383268; cv=none; d=google.com; s=arc-20160816; b=ebakz+yNhwXUA3gkM4q0dsIZHNWntjEzXRMbzBesstHd3CkYCjDzA/IRy+tuSw4IHx t/2CnI7Mdl2tAQC87JfMAfp5c5tZbq8AfKumtnxFQKocMI3kMxTDmrT2JQGpJrL3VgXT Ar1heljljUhilD11pJmV5aAYnRqfrWShqk3X41YG6OuOOpaNrNxVKVueGnUcHvBQJySm /l+UN1Z6Ytq0LfD8253UkBERpw/c154KQv86Y+4s95/b2AgKRyL1mnQf0eO+G387YOwk BBlPF4UHD5Of9w+FaaKfOA0FSI8FsrNo0jBHhl1tdQQvu2EAZOwwMzU1IKTpEHS8wtm9 E1og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=lPu9Fli201JAuiG39K2q49j/kuGYFdL9b7eb+AA0dxY=; fh=ArSOtC/3BGoI4N9PyiAZSfHdYkyuAxlYmp9BiFTwaW0=; b=UuhJJ03mt0yJg1svGIgGdRDih9cqDEGUU7TUEfYNhpvvb9MXPGKuxfo67R2acs6UWC hv+FxOXt73l59ukXOOWJ3tZ6//sseLkdZIpZZWklUFmvfXkYWG/L51gJ5IOxDRrca/ha 7QSclkaY4NTYqZ3phN0aRmUEVe9CHL//iUYQbb1IKCZq6EbmkZAMZBSQU0b1DC3LA1t2 419a9p+RoWUZl1siVS8l5sdXdpZ7MyCTHrD/bRtSnb8JAUhtvpmrem6o0Yfj1fD99v0Y kKwj4r9lL5P8iGCkdJMZqEpJZ/mlbGLs6y+ki6WbmswlIIXkW7JqDNX3u2YEm8/birdB OrBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHFqtvDR; spf=pass (google.com: domain of linux-kernel+bounces-10623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x11-20020a0ce0cb000000b0067f89610cdcsi6239655qvk.180.2023.12.23.18.01.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 18:01:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHFqtvDR; spf=pass (google.com: domain of linux-kernel+bounces-10623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 130F21C2102F for ; Sun, 24 Dec 2023 02:01:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D465A3F; Sun, 24 Dec 2023 02:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qHFqtvDR" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E72D7EA for ; Sun, 24 Dec 2023 02:00:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-35fb39c9dcaso13316565ab.2 for ; Sat, 23 Dec 2023 18:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703383257; x=1703988057; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lPu9Fli201JAuiG39K2q49j/kuGYFdL9b7eb+AA0dxY=; b=qHFqtvDRIuVFvXvDq35vawcLK4ajdiTrpgMHi9i7cL/znfIOowrhcPASqqFHhzsX8q sid2fe3SkzoXP3ko8St7uWspjJ7xRBBy8uFaxfHYZq+ADBgpuX9n46aKe6OyJgSOFDte GkM1LU9WH8RKLUU8cj5GeQ9DgK7ckTo8iGFTYdItueaJi8nUCtEx9+lc9xKrpVOwJCL6 Y7aDVkr86P2+FEviXz9hqdhvk+GrFZoC7VpGcsMiCjEpcmZUNZ7yrhMY9mDRQxzXuzzc rVjDbP9YYrXxuBXwXO2PqDATpse/EmG0Q7SI6u32d7hNth6KZqXaTwY9N76rGyU94NtS BGfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703383257; x=1703988057; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lPu9Fli201JAuiG39K2q49j/kuGYFdL9b7eb+AA0dxY=; b=l0kqVriaTQPt5I5KzDUO9MVRUyLu2mXuUiFpAMwEOyDI/8EQ0h3w69yXaGlTuh3SUS 7j3q/wDXWY30u0w22sv71xAFGVO6fBvdcIPrIynpKTZvNWp25NR1ksmLjRXKZbDF7gce MlXa2jRTbsnSVW/A0TAGjI8L3FBa/MzWHs8cdViaPoha1pA/qa4l9xa2LMUM/O/8AkCV SqABUHRJycdD3kvaf3x+rpBQ1jgYHUHRmarKTj5dmQW+EcMOFP6StOe4dzRvqyPy+4xP NSBlaCvTvGcf8Psg2bccpFbx7FQ7GF8azDsYzlub2AFkw6Lyo8rrlWhlpwU4dW1270d9 pngQ== X-Gm-Message-State: AOJu0Yyy5bwY1nXQe/oUkTEePwwdrf45U/b4eIFqMrbieev/ebe449bc yk+iWSSNoISuMNZzTn3xet0uqTaRe4Q2EOVsSN9hWqj8DtqSXA== X-Received: by 2002:a05:6e02:1b02:b0:35f:ac66:e863 with SMTP id i2-20020a056e021b0200b0035fac66e863mr6301362ilv.50.1703383257581; Sat, 23 Dec 2023 18:00:57 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231223191902.22857-1-krzysztof.kozlowski@linaro.org> In-Reply-To: <20231223191902.22857-1-krzysztof.kozlowski@linaro.org> From: Sam Protsenko Date: Sat, 23 Dec 2023 20:00:46 -0600 Message-ID: Subject: Re: [PATCH] pinctrl: samsung: constify iomem pointers To: Krzysztof Kozlowski Cc: Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 23, 2023 at 1:19=E2=80=AFPM Krzysztof Kozlowski wrote: > > Constify few pointers to iomem, where the destination memory is not > modified, for code safety and readability. > > Signed-off-by: Krzysztof Kozlowski > --- Reviewed-by: Sam Protsenko > drivers/pinctrl/samsung/pinctrl-exynos.c | 4 ++-- > drivers/pinctrl/samsung/pinctrl-samsung.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/s= amsung/pinctrl-exynos.c > index d3d4b5d036c8..871c1eb46ddf 100644 > --- a/drivers/pinctrl/samsung/pinctrl-exynos.c > +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c > @@ -693,7 +693,7 @@ static void exynos_pinctrl_suspend_bank( > struct samsung_pin_bank *bank) > { > struct exynos_eint_gpio_save *save =3D bank->soc_priv; > - void __iomem *regs =3D bank->eint_base; > + const void __iomem *regs =3D bank->eint_base; > > save->eint_con =3D readl(regs + EXYNOS_GPIO_ECON_OFFSET > + bank->eint_offset); > @@ -714,7 +714,7 @@ static void exynosauto_pinctrl_suspend_bank(struct sa= msung_pinctrl_drv_data *drv > struct samsung_pin_bank *bank= ) > { > struct exynos_eint_gpio_save *save =3D bank->soc_priv; > - void __iomem *regs =3D bank->eint_base; > + const void __iomem *regs =3D bank->eint_base; > > save->eint_con =3D readl(regs + bank->pctl_offset + bank->eint_co= n_offset); > save->eint_mask =3D readl(regs + bank->pctl_offset + bank->eint_m= ask_offset); > diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/= samsung/pinctrl-samsung.c > index dbf38767f15f..ed07e23e0912 100644 > --- a/drivers/pinctrl/samsung/pinctrl-samsung.c > +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c > @@ -565,7 +565,7 @@ static void samsung_gpio_set(struct gpio_chip *gc, un= signed offset, int value) > /* gpiolib gpio_get callback function */ > static int samsung_gpio_get(struct gpio_chip *gc, unsigned offset) > { > - void __iomem *reg; > + const void __iomem *reg; > u32 data; > struct samsung_pin_bank *bank =3D gpiochip_get_data(gc); > const struct samsung_pin_bank_type *type =3D bank->type; > @@ -1204,7 +1204,7 @@ static int __maybe_unused samsung_pinctrl_suspend(s= truct device *dev) > > for (i =3D 0; i < drvdata->nr_banks; i++) { > struct samsung_pin_bank *bank =3D &drvdata->pin_banks[i]; > - void __iomem *reg =3D bank->pctl_base + bank->pctl_offset= ; > + const void __iomem *reg =3D bank->pctl_base + bank->pctl_= offset; > const u8 *offs =3D bank->type->reg_offset; > const u8 *widths =3D bank->type->fld_width; > enum pincfg_type type; > -- > 2.34.1 > >