From patchwork Tue Jul 2 10:09:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13719378 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 0203F157483; Tue, 2 Jul 2024 10:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914986; cv=none; b=SnEneYcXd5h92hM4QWqHXViN/ae9M/iYMDDVXq0iluBxn6NcCi9QTSLeLQ/6mWbCvTwCjSK19JwNugToRLMWTHI5lLakxqRlj3zVVGj/I/tj3EmlBiIAuIyz5EFYMjYkKjt06CfO0nIuudq/Lyai6o4gO/falqfubliYJDBGRp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914986; c=relaxed/simple; bh=Q4wxK5Xsi7At365fA/JgfON7QfEWfI2AgnMzg/4FVwE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jdfeocxvcm4QGcQTn/VfvYWWpFdLjtuizUDILeHxOzwYwK0b8uOuhx2IsVePemDQLeZXS2NJFzWp/B6GfcJcA3QmUzJwnkhHZD2f1yeF650fPZCn1ledo8FoupAX1xyx8KCb9G5q5AwAlAV2w/M6qR0knkKL9DxpAdndGMDewzc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iA5QR3w5; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iA5QR3w5" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2eaafda3b5cso38774621fa.3; Tue, 02 Jul 2024 03:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719914982; x=1720519782; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NhyCBFcJUM0/bnKu+Ibt45W+8fZqRGuE3dKlxsjvmBY=; b=iA5QR3w5K2id5egrXITTbzr0UQmsAYWJTzuMaPPKuD0S3FzRvaxhxA7GzJLb8qRUDE nJbuq/be3UDnnKayyQ7Iqd537WdgxK2SuLvqz67bDGGQtT4b9kl2oli1HXv8RqRYJqHS FBio/Sb62+QCyG5Ev6eJiQsTd8CcsCKwmw+OVRkG1MT9vqdv4YF8V/oyypMb1lgU+BpA 3KX0ps4Q7c8jfmQnKHAxzVW6RY7l+NwFA1dYOVkbTP0zS3MLpd5FgSgR5BpwO9GqDP0C ZtOP/KkEYRNHJxANUba9FXTPu9+TfVBhtV4l/kJJ3F7Qn9Vc2ukpFASALpdfyqvAJ8kR yU5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719914982; x=1720519782; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NhyCBFcJUM0/bnKu+Ibt45W+8fZqRGuE3dKlxsjvmBY=; b=EbnVvC1RB2sDNCcr7N0ZM0kWHVlzgMvtmbtfz8wbi7iMpV4myDtP6/MxNZ4odoC43F mMkucBdDM0Yhk+dIi1M2/2GluPa8P6p+QOtNylmmxhDhYLzYjwTXwS/KIyDM9jo5YXlI dqpWKWBZhYsyncpbVmLSz2YryblbRicoj1Wtx+orRBq+pCcOAEYlmdVeNErVmCHh+evW sqgDzT/occWguYal1/V/vz1s7mbhDsJ7Jhm2coYHs+l6mdsNnYl1ezXg5yqkl9DFktKt BBQr4l+NZgo9GgwgVyvBuyT6T4byADI/TR0eIP8/y66Vkcn210Rsx2nH6K7iXFbq8pFw qF8w== X-Forwarded-Encrypted: i=1; AJvYcCVdIxnFKCUw1iXcS5L5qVAGnsMgJBwG7qT7TvZeI10Lk37BLVXSDzt5oaLMC/P4tQsW706mtdw7TEnvJEvSE0OvCrM4Wmp8SIVehScr X-Gm-Message-State: AOJu0YzufYSbljkIc//14lFsmuobgl5goPh37AXCrOVujbCGmSEH3r++ ZsZBPrlbSrFT1rksRnzlCA0xN8aQds9ubYBrdDO6R8dCvO92DjcwBHiYew== X-Google-Smtp-Source: AGHT+IGyLnUUrN+QJumdzVq7TcZ5bNg3+0APvy/FgZjryyudh7H3ZkACRGuEAaTnRbGybpr2OeunFQ== X-Received: by 2002:a2e:3018:0:b0:2ec:5fe1:c762 with SMTP id 38308e7fff4ca-2ee5e6e7333mr51125601fa.46.1719914981751; Tue, 02 Jul 2024 03:09:41 -0700 (PDT) Received: from [127.0.1.1] (84-115-213-37.cable.dynamic.surfer.at. [84.115.213.37]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b06377dsm192630315e9.28.2024.07.02.03.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 03:09:41 -0700 (PDT) From: Javier Carrasco Date: Tue, 02 Jul 2024 12:09:30 +0200 Subject: [PATCH 1/3] hwmon: (ina238) Constify struct regmap_config Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240702-hwmon-const-regmap-v1-1-63f6d4765fe0@gmail.com> References: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> In-Reply-To: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> To: Jean Delvare , Guenter Roeck , Eric Tremblay , Robert Marko , Luka Perkov Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1719914978; l=765; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=Q4wxK5Xsi7At365fA/JgfON7QfEWfI2AgnMzg/4FVwE=; b=qhFxkZtD9nGlsKn+KkKxNRvSmOe+yJbo/MSZRqSC6yblufhlZ5vo7kQFmp22MoMPWUwRl5F1r GemNiTTNYpBBDvui8gNEuVc4/t9gzBYLshoVogRGtXnhhEETbbzNRg5 X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `ina238_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/hwmon/ina238.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ina238.c b/drivers/hwmon/ina238.c index 855626f1bc01..2d9f12f68d50 100644 --- a/drivers/hwmon/ina238.c +++ b/drivers/hwmon/ina238.c @@ -96,7 +96,7 @@ #define INA238_BUS_VOLTAGE_LSB 3125 /* 3.125 mV/lsb */ #define INA238_DIE_TEMP_LSB 125 /* 125 mC/lsb */ -static struct regmap_config ina238_regmap_config = { +static const struct regmap_config ina238_regmap_config = { .max_register = INA238_REGISTERS, .reg_bits = 8, .val_bits = 16, From patchwork Tue Jul 2 10:09:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13719379 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 BA151157494; Tue, 2 Jul 2024 10:09:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914987; cv=none; b=eZusdWuUGs0zI2i+3WxpQAwM5EOadyb7j3X7fOhfTxOu9sAuDtX0VZEbgXBthYUaMx9LIqrdwf65z9O8yovMT7wHz5IEXZhiX0FPBehEY03O81JQbhKsihPRPtNYn1vfBbF3ZDQTCoOsh0SoYkQROgx76nzoHr8f+fDBn0MIum0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914987; c=relaxed/simple; bh=4PG+CP1o0ziICuTxILIzZ2DVx1gJQqFm/GCOWpFvB/k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=j5kCF1o19vkOK2DuRPejSGllFli66hlN1rVrFbiAfbSUi4otYFqTlF3aK00joUQ8zMwSzfQL+QpD+IU5ROrEz2uxFsBzOcr0umzg6hDRRCDWise90aynOMVIJgYIpo3KKPHx1V4mAf/T4t/KIrIPm59Yj+7IeMn7hLe08lWIh1U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b+OGRG0D; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b+OGRG0D" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-42574064b16so24667475e9.2; Tue, 02 Jul 2024 03:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719914984; x=1720519784; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0jcWjALf5R5/n0HjufCCcQAyNsnnkzTLIqUtc9ewdMI=; b=b+OGRG0DdAngUu/jsL4TQry59L5DZQGBdn2vEXuWYJNo1b5gXiwmSMov+Q/wPXjwlN PVqGldiihI7kS/3WpWUeO/54HjDHSbtPARCKHdN+s8Am/kkgnFTaRth6akjzHRKQ1Z6C 9j4mOA2qkl5LsIggx5DQhJALll4mcfHPvKastA8tIaGLZ3ahNaRBH8QG8jBqtqGBVU2W o/iEYlZzHWu8b1gGZEZD5SCBAWfp9NgEuR25SoMRxSdbQlPQPs8bYmITAkxGz8fNzpT1 TKoBNyAl6r6rZcuOKfGe2HB58hFhoM0FVo1sUJafoteDAAYAcNByH5I0d9DowojKZQIX wawQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719914984; x=1720519784; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0jcWjALf5R5/n0HjufCCcQAyNsnnkzTLIqUtc9ewdMI=; b=asxn18lstrVoPW0lVfHo1lOXKwPMHpi8dFiOh8mxY+RFVFwEBymRFYGNXG0ufBRtNS zt/W8JIGl7iOJrBg8VSyx3fL1k6qLuTLbuCzAgUlHacbhLnbF/20+3C4O6uEcY/Cjw0E 7GsNk+fYjNpOJ2S4vPElzdq4SL4Vqhfrugw49vMByIi7VO3WipXMMWTsa5joh2k8w++V zuJU5vLi2p2oWvhr7dsvsAklb/jn04aXWdgniQBKNS/XV/oKCe6uCPPwbJT9pH941nOG 1kcDenUd4iIOwAS/sMdMnmUAPIHUqIfqrqxvC9EHKhUo24R/r3Qzlv4/s/+Okwz5s4Kt CApg== X-Forwarded-Encrypted: i=1; AJvYcCVPJwKR5GmN5ut7i9OLYkhheafhUJinG5/jzp/k58GVaFHvI9Tv/+fzaiDWM8Zk0+yjx0ahvQnpPhOIoCNk/ow9Q4SZ3zQQffeKGhWG X-Gm-Message-State: AOJu0YxDH3fvRIvbPS1pWN4Q12h75Wl7f3CmhD5yyWhZDmD7JbjNsRYp Pks0kwRscgxmJZJxTJuNOc21jp6cVoCLogRCx8cvDJwrSaFuJbp4/vWaJA== X-Google-Smtp-Source: AGHT+IFvpA58T+dkA9WmGLMzs2bgQAMgrLRSfrkdq/IVJXHtKiVp5cDfn9pVhgj8HRWQTKhLiAYjMg== X-Received: by 2002:a05:600c:3541:b0:425:62f7:92ea with SMTP id 5b1f17b1804b1-4257a02f7c9mr50439925e9.14.1719914983773; Tue, 02 Jul 2024 03:09:43 -0700 (PDT) Received: from [127.0.1.1] (84-115-213-37.cable.dynamic.surfer.at. [84.115.213.37]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b06377dsm192630315e9.28.2024.07.02.03.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 03:09:43 -0700 (PDT) From: Javier Carrasco Date: Tue, 02 Jul 2024 12:09:31 +0200 Subject: [PATCH 2/3] hwmon: (tmp513) Constify struct regmap_config Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240702-hwmon-const-regmap-v1-2-63f6d4765fe0@gmail.com> References: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> In-Reply-To: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> To: Jean Delvare , Guenter Roeck , Eric Tremblay , Robert Marko , Luka Perkov Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1719914978; l=740; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=4PG+CP1o0ziICuTxILIzZ2DVx1gJQqFm/GCOWpFvB/k=; b=UbApVp4yQ9RI6fQVaI0cYL8wfgVTfKVEWdSXWdEb5PNzrFw3xyh3jTY0ZR5zHZtftLm0P8LOA d+49wa9LGuACDrzaVi59UATMC8mSwwAf6ARGvknUt8TPUVda2+EMgXD X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `tmp51x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/hwmon/tmp513.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp513.c b/drivers/hwmon/tmp513.c index ea6f4416c124..926d28cd3fab 100644 --- a/drivers/hwmon/tmp513.c +++ b/drivers/hwmon/tmp513.c @@ -159,7 +159,7 @@ static const u8 TMP51X_CURR_INPUT[2] = { TMP51X_BUS_CURRENT_RESULT }; -static struct regmap_config tmp51x_regmap_config = { +static const struct regmap_config tmp51x_regmap_config = { .reg_bits = 8, .val_bits = 16, .max_register = TMP51X_MAX_REGISTER_ADDR, From patchwork Tue Jul 2 10:09:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13719380 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 B9EAE158855; Tue, 2 Jul 2024 10:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914989; cv=none; b=WC8yz3fTPiLr+XxQQVe9o9ymjyrVrIFc/c+nJyJRwINVDJq6TtHMsnPgU9UCsATGhnUnd4ZzqimNZ8YQLWJw3B6LH1Wmaagy3O+Mj+m0+1efHwtYUZh2LfPMjVghh7vS5+rZDv4Bcy92BDeIOiY28qcj6yNZIIfGQEH+sVECzVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719914989; c=relaxed/simple; bh=oZ25HGm1WskMrpM2SiLY9dyX8i/9H4MySbCexu3lbvU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SzMwzTZeMC9VXb/ES3vAVo/SC8W6z/oGVAsWY7MP4hvppVcDRCJPyuCOAXEY8votu281uuetKCW8L7qmQfYIsVSbfZy2dsgJTuEdQZfJux9gpabtZGuzffB9RIQWwllbAnFlbWWxQ8MZWLpJ0iyHJiLWqFL58wqTHJ3OF4cQ4ko= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ImhVz14n; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ImhVz14n" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52e7693c369so5300586e87.3; Tue, 02 Jul 2024 03:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719914985; x=1720519785; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8yfO8FKExVi6B1kfdL1UgjFknobWGZjtLRYC9nkW/P8=; b=ImhVz14niPGhflZRGgDJ2m5xiLIbdmnZR6KEplVimfrQJXnHQKzdzBOs62UhUEWOao IULF/CHPd1dT/YKq1aUaaQNJUzgunTemx146LWODIWM3JE4Td1E2Gxeg1M7hcOLZ9VVQ Vhj6oCE8YgoRFVJB2Rn4Wyj85pjHmJeNnzbX+KPfJU//tcuhjHMmikZGv2XpXlaLhnFc 3V2MCN2eotPO/De/T0mSjEnuKI+zXgZV/36gbm1FWVcK5fauFGqPEsuFwzkQZ4JAMhXN r3zpwskSV/Up8n99eAtNbsTtuaEKIlPRs0BoDO664gHnw/ygvB9ST9MItaSix0OkDACW ijNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719914985; x=1720519785; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8yfO8FKExVi6B1kfdL1UgjFknobWGZjtLRYC9nkW/P8=; b=l5FPEb1j2AxKpXGLG+X/zBYQ0CVlPV3Y3WzDaqlyrNE4IfSnJVlypwGA8Fl+OptHsn QeVlcmgPGehMzI3FH667PBsfB5rve35PKWVjwpBK6GVWibboyoxFpxKfHkiWe4DveZlB ZvRv2lUqnbtYH7jxpk6p6xc6pl68Ee0l3/Fxd8DHijerpd7PZARRw2Ei32Owt/kwOUN9 i2ZCkHOngZwIRu8rUegRTZu6kMmKyua288wzmOQ3VEInOEGQ+nWlFyTHr6Lf79b7HWtM K2rR0rOCGCGV8w/lFhMDt5w+ImvpYuCypGLoov+MBQq/QhpOKzvVRyRZ9j1di5JyqSDL hOUg== X-Forwarded-Encrypted: i=1; AJvYcCWHhGILnGNGIBRLDEuryWZkyt+oSEyksl4em5PGZ0GvkkjqfX/aNz+Tife/9x15MElpHDuyKQFCEi4Yfo81iv9c+iKCjNY6ynfZ/uJ2 X-Gm-Message-State: AOJu0YynGqTLzCBrzUTd5iXtIVZ8I6K2wwen/AwPpn9jNLQMoJUA1LhG g8pLjoJEfJBx3IbMO/MI1wfNEyKquAWwBjzjY97TzbSWoR0S4JBNcLJLRw== X-Google-Smtp-Source: AGHT+IHJlWcQgPFFqrto+UAKXu4a7cTbiGeaEMN3nuIytHJW6HEpxx8tcHu9lvfdBo0Mk1+0TlvCoA== X-Received: by 2002:a05:6512:b17:b0:52e:7d6c:dfd9 with SMTP id 2adb3069b0e04-52e826ee716mr5446774e87.44.1719914985144; Tue, 02 Jul 2024 03:09:45 -0700 (PDT) Received: from [127.0.1.1] (84-115-213-37.cable.dynamic.surfer.at. [84.115.213.37]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b06377dsm192630315e9.28.2024.07.02.03.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 03:09:44 -0700 (PDT) From: Javier Carrasco Date: Tue, 02 Jul 2024 12:09:32 +0200 Subject: [PATCH 3/3] hwmon: (tps23861) Constify struct regmap_config Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240702-hwmon-const-regmap-v1-3-63f6d4765fe0@gmail.com> References: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> In-Reply-To: <20240702-hwmon-const-regmap-v1-0-63f6d4765fe0@gmail.com> To: Jean Delvare , Guenter Roeck , Eric Tremblay , Robert Marko , Luka Perkov Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1719914978; l=719; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=oZ25HGm1WskMrpM2SiLY9dyX8i/9H4MySbCexu3lbvU=; b=zC6ngfSxFZuk7fQLQnBnQ5AgEe+WiKIP0hex01fRvlb9JNTmzTzyniyMQGKb8OIKgcEFO7t+L HWFSd9+mvuFAiTaZeNE9sjtvxq2zNQqaSffLY+Cp9GuxS8iaGZrrj7H X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `tps23861_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/hwmon/tps23861.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tps23861.c b/drivers/hwmon/tps23861.c index d33ecbac00d6..dfcfb09d9f3c 100644 --- a/drivers/hwmon/tps23861.c +++ b/drivers/hwmon/tps23861.c @@ -117,7 +117,7 @@ struct tps23861_data { struct dentry *debugfs_dir; }; -static struct regmap_config tps23861_regmap_config = { +static const struct regmap_config tps23861_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = 0x6f,