From patchwork Wed Jul 3 21:46:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722887 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 594F31849CD; Wed, 3 Jul 2024 21:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043211; cv=none; b=TJcdwexi9To9wC/HOW3Tiy+ruCGcumpWNZIxgvb1tkHv4iZ9TCNPNthnogy3r0/5ONWcQr3UB9GPzqeuElIN9wONGmtqdUPAxN+MvlIhQqaSG5LJKnCgpTbtYsTYVr6BPnl4fZyTCZ5PN2lC7X2Ytrq/4pkw1vhKqJBvZnd/0EY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043211; c=relaxed/simple; bh=1oDjGHCO2layNYkfZA2bIwWBOWSIfVnG6v2XJ1ap/v0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jzR/Ho8PUlw/EocKJwpJflUw4vAg041qQKYccLxLn5F+r0H34Zn7QG1BDaPihFUbkuf8S5tV6O3I/ubZssrKjEdXBZzzV22axABw05AbovxCPor5q1odbEZx1XBjoCXF85y8o8JX9ERizt8o+yxAtqoJgw2JJ2THKcWxKFNj63Y= 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=JAlbfuH/; arc=none smtp.client-ip=209.85.221.51 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="JAlbfuH/" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-36796a9b636so2885f8f.2; Wed, 03 Jul 2024 14:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720043209; x=1720648009; 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=CvfR2umXKVAqP0RbGK82JzC52vHO5MvpD+H+v3NMVEI=; b=JAlbfuH/2e4GI2CcqRc+wl97Lc0mR+rZqk6iouWauTnBSQ46sIZue/6WQxBwhIvuTP /c7LBFvdN1dCL03vBJ7FtW7i2H7dasaSZmPE9EmzKlTrdRJ1MCWCgrErjTfnahqm4kte DKIWwV9b0Tv7IfcAswxzHcKF9y5Y8NoK6D1+PVLsXaDr/ZSDvG2A/MaNaMHIx0puOJ38 qBdKvf+cdODJCMxcek/a8P//tJCjEPisqCjRuWpNiaFCoGcO6845XvzP0RrwWSzZ5FUg SnJ1DurhF0QT3gXszCCHuEH4hmhV5L7d6Vb3F5LPR0AlBL6gPb/+SnEmPXUFyFyRFTUa hF/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720043209; x=1720648009; 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=CvfR2umXKVAqP0RbGK82JzC52vHO5MvpD+H+v3NMVEI=; b=mxDSyCzGm1Agv+pInCNJE1SwUaBacqEO85pfXZr2ZgcAGJVUTem3T+6HCz5Z6cZWy2 Ar03TcmXhB3kfYx1udOAASWbRq6SloksSM+hRbNzkDm/1djSRQx9GfseiBElNiqldqq/ VgnpY/O38vCk2I4uN05AHoR3pxmvyTTNNgcXQqjTXKrJhwRYIto8sA5Yt2Y5cj1gN1KP STvx+K3mzp305zIJ4Ls0dDoKeEJB7anKXcUF6lxCBQXsSYL0LGeYqr1mvhO18HymWCrp 9j9uMItw4IyPYN+EjCTVf2eIKYrUHSsJ/AxPBTcQ0iX+m3LFeRh0q9puSO5yLOjLS77I vmgQ== X-Forwarded-Encrypted: i=1; AJvYcCWPe95XhylkKeyB+V6gTNoBTql5gb903EhAvPwHYFKmDOx2MXsNao4x/zRNE8GA/VJhG8aMWveW9y3p9A6h9KPhsNhwDXEGkcfQgB4W X-Gm-Message-State: AOJu0YxGV8NxXehZrMZhQg5BkfclMxvz7OZrh0sV6Tu5pYo8YpK7hyU1 Rw/lWA6GmWgN1tQMqRh3jKg+RAfXD1few6xSBsD4i0BRbjrJGu2v X-Google-Smtp-Source: AGHT+IGIhyYX8lWJWtnryx9cjf0owhsC2zuHNtl81Jk9QXtS+KkskbAOwZG1RSOn+f5IY3f5YuvCfQ== X-Received: by 2002:adf:e30b:0:b0:367:9b22:28cb with SMTP id ffacd0b85a97d-3679b222c93mr288976f8f.59.1720043208626; Wed, 03 Jul 2024 14:46:48 -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 ffacd0b85a97d-3678fbe89cdsm3628068f8f.61.2024.07.03.14.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:46:48 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:46:33 +0200 Subject: [PATCH 1/4] net: dsa: qca8k: constify struct regmap_config Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-net-const-regmap-v1-1-ff4aeceda02c@gmail.com> References: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> In-Reply-To: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720043205; l=841; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=1oDjGHCO2layNYkfZA2bIwWBOWSIfVnG6v2XJ1ap/v0=; b=QUTdZ9XycnJwmRiVIIdLVzN8qOQ59L3EE8J0BXA4v+vnU4PB1792E0twt+/8/JURDZNGdWfBM KhJ3BAhazRXDdvaxS+FPZeIPuSKqYO83xB6dwRC7ewJm5lUuhpb3Mht X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-Patchwork-Delegate: kuba@kernel.org `qca8k_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 Reviewed-by: Vladimir Oltean --- drivers/net/dsa/qca/qca8k-8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c index b3c27cf538e8..f8d8c70642c4 100644 --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c @@ -565,7 +565,7 @@ qca8k_regmap_update_bits(void *ctx, uint32_t reg, uint32_t mask, uint32_t write_ return qca8k_regmap_update_bits_mii(priv, reg, mask, write_val); } -static struct regmap_config qca8k_regmap_config = { +static const struct regmap_config qca8k_regmap_config = { .reg_bits = 16, .val_bits = 32, .reg_stride = 4, From patchwork Wed Jul 3 21:46:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722888 X-Patchwork-Delegate: kuba@kernel.org 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 DF2D419415A; Wed, 3 Jul 2024 21:46:51 +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=1720043213; cv=none; b=n4MED36h7vSIRm3mGQac/2Ln7j+Xgf/YnZBqjw3kzTjbPBuymw05DH1qADfDrDfVjj88Yfe2gfMyMAF2hhB9SJ7eQfoWkzKm8/FMaE3+BkbBUbnXrNjzSU1t3hKL33kDw2/95jyP+VcNjmMma6wcByxh+DgJDd5mTRFiZzm4Ryk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043213; c=relaxed/simple; bh=3qSiq1DaY7T+lFjqMIVDhf9Y3/hYRCA9oeS+Mu/i9Tk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q81iwasajv7ASUXPpddcXz75EJHQtf+P4hjhmDhlZGKi3zEZQFT9N1DE7SU7OvPGznhPNud7AHbb8t8N7nsjIaf+pniDMLuofjwirl99yG08GL21lpxrYn1v0my9nO+WG0WOjmKwpZWm9ahV25ElVCrJ5os2whflbjVM6mMRR6E= 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=MmN5KjQn; 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="MmN5KjQn" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-42578fe58a6so33533485e9.3; Wed, 03 Jul 2024 14:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720043210; x=1720648010; 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=M+IpGYidkZlq3jAxOL88W5QAkvSJT2mwGo6JiSVcess=; b=MmN5KjQnS8CHQeIDuU4uyLypXgKDzJoPnk8dBS2rfRFXWrG6zSm0BfhKaaxhShK2NX 0CiSB1YZV8Z4kIxQPJuxM0kILp3/RJ26Pnailr4PK5T5kDQOGXw6buPmjrtogCc1/Nwn 2l4aCJTWtqem2rHKMkpycp/MpljDCgojUh441Zu6m5VX+jd8b7SGyEyf26axc7zz1d6E 4KJNe3SElSSbIsI09qVpHBda6Hbem8PX3Ih+Wv+R7vdRRVcXJiPDBCe+0jlJRvob5Xao 1pKeG3I/A81PrPcKtUupo1lujzvqEiC/IQiQ+8vrGHt0pe5+jWonifM7uXkC0LmygdBH UP+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720043210; x=1720648010; 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=M+IpGYidkZlq3jAxOL88W5QAkvSJT2mwGo6JiSVcess=; b=anrEqvhlsBbWgwzuySpdOKJxE2FzoJnWWGT75xh7ccgaEF+w7tBHnYazwzN9aLbJl3 QQHSSk6u0xvkJLeQ7X3XnUNEsjONpSuFATm63Hd6TWGzs5cpAnnLRnPiF/wZBv4h3Z0H U2jYBwMpp9ruMdzw3vlV87VIOVO5ywm3fbGefn2pV7vIELMIU6m8Ntb+cSGRK/ynA3AN l1Zj6l52sY90QY7dc1AlNZD+XryFPfqqFySkBekSFsRUplv2DF+XBzCMjVtWKyJnzV4y fXwuXLXtePpwzWeRkmkZDOKwALbBwo5aPoWLhMnNgIYSTil9a4JNQ/7eW4Ka1Z4FwzV+ WHvw== X-Forwarded-Encrypted: i=1; AJvYcCWwKxTZKMiz34Z4quodUwJ/3Y4YLDjuUGt8+rkCzVIxkls7SUR4BXOZaqYbZ84aeX+uv2BDxsOEg2MDOkuPrDWPZ0tntVSMbPHh2met X-Gm-Message-State: AOJu0YzmdGKAg18ddTXfQWml/ki/1D4pebKRYvXu8HtdsS7gesTtCK+n s1irfSnRcr45Cju7vRJPemrrgYN0QItaNv2JqHQWZuujE3hkiqBX X-Google-Smtp-Source: AGHT+IFn4mlgKdpXTQZPW+0TatzoyCu4MvGGu19gCwPaJb+tTApgMTn9wKixCs95v8aAfkLy2pjS9g== X-Received: by 2002:adf:e40e:0:b0:367:892e:c69f with SMTP id ffacd0b85a97d-367892ec6ebmr4680415f8f.13.1720043210224; Wed, 03 Jul 2024 14:46:50 -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 ffacd0b85a97d-3678fbe89cdsm3628068f8f.61.2024.07.03.14.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:46:49 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:46:34 +0200 Subject: [PATCH 2/4] net: ti: icss-iep: constify struct regmap_config Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-net-const-regmap-v1-2-ff4aeceda02c@gmail.com> References: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> In-Reply-To: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720043205; l=1174; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=3qSiq1DaY7T+lFjqMIVDhf9Y3/hYRCA9oeS+Mu/i9Tk=; b=+4LXKg/t/wCB3c1GvgokOKJFBSz0JMNxotHbWtPblRgakW91X82dhDJM57P8C2lhKPjQN/sDk 7N3QW0Tvi1+CDL2ckGe7ZpeJ1JH8wbbXXBcqNbYKUKfQ7xc+ccjZwbM X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-Patchwork-Delegate: kuba@kernel.org `am654_icss_iep_regmap_config` is only assigned to a pointer that passes the data as read-only. Add the const modifier to the struct and pointer to move the data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Roger Quadros Reviewed-by: MD Danish Anwar --- drivers/net/ethernet/ti/icssg/icss_iep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c index 003668dee738..75c294ce6fb6 100644 --- a/drivers/net/ethernet/ti/icssg/icss_iep.c +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c @@ -95,7 +95,7 @@ enum { * @flags: Flags to represent IEP properties */ struct icss_iep_plat_data { - struct regmap_config *config; + const struct regmap_config *config; u32 reg_offs[ICSS_IEP_MAX_REGS]; u32 flags; }; @@ -952,7 +952,7 @@ static int icss_iep_regmap_read(void *context, unsigned int reg, return 0; } -static struct regmap_config am654_icss_iep_regmap_config = { +static const struct regmap_config am654_icss_iep_regmap_config = { .name = "icss iep", .reg_stride = 1, .reg_write = icss_iep_regmap_write, From patchwork Wed Jul 3 21:46:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722889 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 6D98E194A60; Wed, 3 Jul 2024 21:46:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043215; cv=none; b=Aams68ur//FJ31RlP7V1C47XfvHpfwZMZDK0xPJUn5CBbEqoEoFHsSEyqOn4JBl/8tTtWLOwKg4vtN0lZUe3utELhAiN9jGkBbANzNaIVgSdiobYbznAwXyphoJ5X8SF0fgVtXsNrC+PoF1sCbk8x349uMFx7saMbak4w1HPK60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043215; c=relaxed/simple; bh=6q2DdO7S16bdyZgq1GbnvgpchKg/KexCeYaw8kP7yyY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S4ophOhEBM00aiOvVfVae30lP79aOmcDndesSwln3F6jQ0F+3KFsOC9Qw2B8x+SbQ42DC/nnGjY7RDDjgD4Cr3FiHBy2aG6XXw+bLTXHDAxckMBgVWJYdjlpkeKt7MT1R7OAffP9iQT17KG32XTpaI2mhTQZ3q2MzZV4Y/A4STE= 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=S2i2oGC5; arc=none smtp.client-ip=209.85.221.47 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="S2i2oGC5" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-367975543a8so4126f8f.3; Wed, 03 Jul 2024 14:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720043212; x=1720648012; 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=BRnEsbWpiC4auC0zP97cCNMZQHKbNM/aAU/PO3sRgTg=; b=S2i2oGC5WAs0kGosEb+Py97cYjXpUuWiJAHynQwqiKJFvO4FXUINZ2y/NIGBkzooQQ AwxzQL7tTDhqlopCogGqBSAe/lISejvHf/eIFLuq5ZOvB4Ge40SYlLF2tnQE1qIwKwRS ENKrX7odPsSYuaN3c5sp4o2tqKwYQz0WWw7e1av2nhwUPK6cN5SdcRxD1frwMFniRCZG StCSle8AhTopAa2rbL2u9B+ig3oHu86DD3EcItSxIOiW4E4pkteyi9HGNJkwc5t0MDHt x7WstwIWKGV6X8SI2O8RUSNng2IpvIHWCfwhs6EQW0ZejlgPJgm6mENZ26nG9cdJTrgy DKqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720043212; x=1720648012; 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=BRnEsbWpiC4auC0zP97cCNMZQHKbNM/aAU/PO3sRgTg=; b=elV7WadcMMOCwTxe4LqniYrj9E/bPw53mQcLRBs4VkcVDXpJm2IGFyEgZwTkHyWqL0 Ij+vABahyib3dsTDq3hqtUaL+Bh7F5LyEJpTXywGQygA1zXcgAW84WWK+Zq6nVF4ecQ4 l1qRJeXM2LRkoGXwfH9z6ZibIMACCKqk/UGvstdDCWq6tYc09d2uCSg6l0azGVhLsON7 tXvq4IE0LLF32UllETnrmifybYnw6xfazszFiVEsMNWQy2gZyWylgW65RYYbdNjAz8ld t8SmotphnLUNyfcmBak7DWJ/T4Wvj+Phu0+UlDLs3w2mXteb4GcUJGVX2fu1B/FAaXTV Iwkg== X-Forwarded-Encrypted: i=1; AJvYcCWzWh7AptdWRMdW4c6kNJ/0GYVcdlH2/qylYtzX8tZSMwzOY4QSArLD1u5QDzoukMNMuTFoarGi/pGKruNw8exmpC55Bi4xCW91IsNk X-Gm-Message-State: AOJu0YxPxJTijZK2n4u265vVOZDGihXTb/fgKwaso6lCI1kUw/KKz/O9 HYsMYjH9tTdRflEKsdMh92Pg+eF1ItK2zCwI+4zS68LvFYulC1+c X-Google-Smtp-Source: AGHT+IEjIk9IP242fY3YMgi2r7mtGX/Qr9/68nkAe/52Tlw1KiNc9kjTMLnVnjbTEjfbPVXEXhIYmw== X-Received: by 2002:a05:6000:1543:b0:360:9c4f:1f8 with SMTP id ffacd0b85a97d-367756bb76cmr9705790f8f.34.1720043211744; Wed, 03 Jul 2024 14:46:51 -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 ffacd0b85a97d-3678fbe89cdsm3628068f8f.61.2024.07.03.14.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:46:51 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:46:35 +0200 Subject: [PATCH 3/4] net: encx24j600: constify struct regmap_bus/regmap_config Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-net-const-regmap-v1-3-ff4aeceda02c@gmail.com> References: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> In-Reply-To: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720043205; l=1431; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=6q2DdO7S16bdyZgq1GbnvgpchKg/KexCeYaw8kP7yyY=; b=Oo469PHgcSkwQZn4uzhnc6b2A1jagh2BGeWP7cVvHDBXEGIgsoGBR4eCQyieNkCkj+UdYxFMe 3SFVNVE/AOsCZ3612i1TEytAQo96wcUljFNbpvc053/w8KlKFz5QQDQ X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-Patchwork-Delegate: kuba@kernel.org `regmap_encx24j600`, `phycfg` and `phymap_encx24j600` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/net/ethernet/microchip/encx24j600-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/microchip/encx24j600-regmap.c b/drivers/net/ethernet/microchip/encx24j600-regmap.c index 3885d6fbace1..26b00e66d912 100644 --- a/drivers/net/ethernet/microchip/encx24j600-regmap.c +++ b/drivers/net/ethernet/microchip/encx24j600-regmap.c @@ -474,13 +474,13 @@ static struct regmap_config regcfg = { .unlock = regmap_unlock_mutex, }; -static struct regmap_bus regmap_encx24j600 = { +static const struct regmap_bus regmap_encx24j600 = { .write = regmap_encx24j600_write, .read = regmap_encx24j600_read, .reg_update_bits = regmap_encx24j600_reg_update_bits, }; -static struct regmap_config phycfg = { +static const struct regmap_config phycfg = { .name = "phy", .reg_bits = 8, .val_bits = 16, @@ -492,7 +492,7 @@ static struct regmap_config phycfg = { .volatile_reg = encx24j600_phymap_volatile, }; -static struct regmap_bus phymap_encx24j600 = { +static const struct regmap_bus phymap_encx24j600 = { .reg_write = regmap_encx24j600_phy_reg_write, .reg_read = regmap_encx24j600_phy_reg_read, }; From patchwork Wed Jul 3 21:46:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722890 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 C4F40194AFE; Wed, 3 Jul 2024 21:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043216; cv=none; b=s6gOs5wUM9rdmZle/sE4C29Mt8AU+6zsG3COOXNjW/sfxgBKYaVoHeS2xDHl6FLPxQGlKRMOZFWni4sU1gDXtJECMUr9y4zBEiM2xyr4cJeoaPrq5mDUnwbkzeBxtOxfeal3I+7kiJgNwPkodVcuz8e0m9ZZ5X5+KSGeWoBoNNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720043216; c=relaxed/simple; bh=TqqYwd9d+YYTEaJ3Hb+RHNh30zSbeM80XHxfUHUS+A4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J9e10+/6s0BCgI4XhBBAURw7DFmlZBY+4Kk0mky4WQsph2SSHr9LDxK1eyCG+9+9oePc1dbSnGutHDA0rRxLFkp53HFzJOntjxlItcbTlL9/T/a7xSslWduDSx0seMIZBeZO20/VzLK0Wn1ywlPfgKk2PtQpWRWEZgCyZaMDz7s= 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=X7MTOPAN; arc=none smtp.client-ip=209.85.128.43 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="X7MTOPAN" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4255fa23f7bso41732925e9.2; Wed, 03 Jul 2024 14:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720043213; x=1720648013; 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=ZX5QuOeiGPzs72hiIcfMb49M5DXX4kyzDZ2bV2KJnA8=; b=X7MTOPANa0ew1Maek3pHuvKp2MPbf6jf/zT5VWclp8Qlttg+j1gfynYTZB/EEAh/k7 ABH2kQl9vPWyeROkP0FwsA/Tblgjj5mAL5ZdChEHfm8jKo6gdT03XxsnaDzsu+bnk5UV 5gQvwP1He3YKzqICpN2fRQIDSsks1pzq+9mp3uGon9K5oJdgz2tceeJvT/Xy3Ocz0rg/ nS2uknb5sPq36Xc5ZqXwzkuT8e/Xk97B23Hwe10Vio8XX6HPApFd++c7hXZScWe540NN CNhMtyci7YyTjw19VDO9n2OTP6ioLcOEzvUa4rmVjYWSUThuq5EreZV6yo6s5wXHNspn pgig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720043213; x=1720648013; 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=ZX5QuOeiGPzs72hiIcfMb49M5DXX4kyzDZ2bV2KJnA8=; b=eKu2glqB9LLEA6xR5HzcfDRE4ewTpL0FKOFeMfs6/i8seQgSX2GfvS9skf0os88x6O bEQhpm8JakXdwQUEtj1lVgDKf3/3o/UEgefRWnmlhWjPXQz8h7L9EmtFxo6T7pRaT25o N/0/XYF0F9581jx9ZQqSw8ztyJKIWDrlDWov1HP/gSzch8jsiUTUWVQ2nHkRIyK55VKj NXuGtLme78REs9BRMjClm/bEXKFjK30Bkojen5EklRT1SQo1i85tyHJKQSE39syr3zIc +tJxaFp519Knh1ZmcmRZqmM+GPjHOhNNypXGMa2sQJbQJXa1ewVn+cg1sUH5D7Lk5Qvi M2qA== X-Forwarded-Encrypted: i=1; AJvYcCVqRSuUfTBdTDBH3O2108rqB/usQkUpetaO7uY2+wmq0mfez0/lhyNqPwie8yDAcTZY5cvFGMDPTXD1MTr8KVStaSUsb4coWLzfMkv7 X-Gm-Message-State: AOJu0YwlbIYkOCPyjCNibHd2V+9t5A2byiZAfZ47XQUJNTs1WBagSUT5 IshfMlXENG7T9+zaxdrixWgAK9vB3wcf501NM5YvKOPJoq8jTPsX X-Google-Smtp-Source: AGHT+IFadoRKQNgnDNdrUcb/+eEl1uaAY0jFIVzWf1WzxiDNboC1scUUsRnJotR2TAM2bxb79HCYPg== X-Received: by 2002:a05:600c:35c3:b0:425:65c5:79b4 with SMTP id 5b1f17b1804b1-4257a02b6c5mr90382265e9.26.1720043213180; Wed, 03 Jul 2024 14:46:53 -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 ffacd0b85a97d-3678fbe89cdsm3628068f8f.61.2024.07.03.14.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:46:52 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:46:36 +0200 Subject: [PATCH 4/4] net: dsa: ar9331: constify struct regmap_bus Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com> References: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> In-Reply-To: <20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com> To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1720043205; l=827; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=TqqYwd9d+YYTEaJ3Hb+RHNh30zSbeM80XHxfUHUS+A4=; b=sCCEmiWZsxe93jwseOtmSsLMWJQ42g2tAdOmtEVuX060VWAnURTf9DAk9BB1IiSFEXjBLmx7w C1xYlaTuhjOCoCdA9u49QNzn5eU0HkbaP2AODrPcWGjnUPedJHO2iwI X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-Patchwork-Delegate: kuba@kernel.org `ar9331_sw_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Vladimir Oltean --- drivers/net/dsa/qca/ar9331.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 968cb81088bf..e9f2c67bc15f 100644 --- a/drivers/net/dsa/qca/ar9331.c +++ b/drivers/net/dsa/qca/ar9331.c @@ -1021,7 +1021,7 @@ static const struct regmap_config ar9331_mdio_regmap_config = { .cache_type = REGCACHE_MAPLE, }; -static struct regmap_bus ar9331_sw_bus = { +static const struct regmap_bus ar9331_sw_bus = { .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, .val_format_endian_default = REGMAP_ENDIAN_NATIVE, .read = ar9331_mdio_read,