From patchwork Wed Jul 3 21:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722767 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 9BA7F191F6D; Wed, 3 Jul 2024 21:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040699; cv=none; b=KSqamr6UXkDyYwnx2HjYkHmA7Z+oA32Zui2uIJ8uXvoVg7e8KUa/+TDxg+UzOcPpdVBkFJY79LmrO5ErM2cIZrCKtfH4KyIjvhNqVnmBhsaYTRqNZTGF85K0ClfB+3yBiJACe9+j7AckrEfa1vcrgeXd2Nay7dls4xprwj2yplQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040699; c=relaxed/simple; bh=7wvHtbHmc5wAgF1wouiOVrC+WLrbIqHZ6Xtu8IrKa4k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TmlXUPBZrZOohfnnbOLn9UGSqjebZOUnh/NX4zzuGxtk1PE4u6G924f52Fj+ukvPplvWyI+itaeW+uAbGg4uU1iaEIsYscMPftiPvp1yBzP+v2YXTaulZuTeMaNDtGMHhL4murt0kWasdHXmJqa6t8uVvbE2nZIfJ6iaS9pmxVI= 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=LAi3y67M; arc=none smtp.client-ip=209.85.208.170 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="LAi3y67M" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2ee8911b451so9138121fa.2; Wed, 03 Jul 2024 14:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040695; x=1720645495; 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=pHX/hgYF5gJhAAN/zpUDUEGsEcOIXszZOQeRDy9mJH8=; b=LAi3y67MGbRImnZTUVsUDdt6bvvnpNEMueWHEPARo0Xpc4XOaw3DbMQPXnbGqAIKuT S1UmsgETGhE/9KlzC10OJzTQUhLRruqbLWt2QUF6FKLLwgY0d5KGrUZw3X4OrV6Uuelt sZA+u8/2Q8TAmlNRy5EMi9mLjd6MIQ3tbvNQ+CGlKqv1oPROOrw4d66riU7FcawlzWSq qcQBsZ27WThAPKPO6/HchFyUgNq+z/O0E23WOm7YRWwdF2K5Qvkdo19u8umhCNGrR3+M 56VhRITj7LDAvgWd9Xg7s180Lh6O52dAg3X+9AM25D0WLjOFnorpNKAR6ZRlNENV34+x 0lKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040695; x=1720645495; 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=pHX/hgYF5gJhAAN/zpUDUEGsEcOIXszZOQeRDy9mJH8=; b=VDRpRdKVPqx0q8hn9T51vIHZ2VZyz7LqPUS4o8twfxBW9sNrEio8qe0YwpJdZoLp5w tB6hZ9YwOP+g0dozq8YmYorRkHONrjMXO3GP16TkcKqFhIrFun6xr7FoXDjXPoY2gQnm 4+AftCVfNrD9DoKxRSE2+4sXFPxny7xogXtw3iDig7p57PmBOuQMV4Y7wOWqZo37ttWR m+Y0ZqtcTU4xKTnqx/37rhAx2jK3po/jbJ0zRHzbFKYY/lkxDxtpNgz8uKf7u7PSdtne o1d2INrhGqlnE7hdrh8laRtAsqYlK6MEMsEAcJr/F/WoEesuXtV9QyA8Bfmws5faURWQ uUrA== X-Forwarded-Encrypted: i=1; AJvYcCUmNpjI3z0ccJiL1yzbvoIpxxe+w2PK2xWj1mXYFGp3ePnfF9e6cMcD0JiVHonHq7U9JFcg9r8fYDMMFvx/WbQLZQ1o+DpBzUGY7ARZ X-Gm-Message-State: AOJu0YyzOpPLtoMRzDWGW+YatV5kAtTAFskXycESRq5Dnzp7pCaZCjCQ Lp9JjjBk/5/fM1beG/7rwIZsznQGmapK0c3AYY8LD0cS0mrK7dTv X-Google-Smtp-Source: AGHT+IFsVt3vxO9rZ0j3asOfe0J9N8/lgrV4TpMyJZBq3EKIIjouBXkZZwL8Mf1CAGru+ByIRY7P2Q== X-Received: by 2002:a2e:a417:0:b0:2ee:849b:576d with SMTP id 38308e7fff4ca-2ee849b57abmr17980431fa.43.1720040695279; Wed, 03 Jul 2024 14:04:55 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:04:54 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:44 +0200 Subject: [PATCH 01/10] iio: accel: adxl367: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-1-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=814; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=7wvHtbHmc5wAgF1wouiOVrC+WLrbIqHZ6Xtu8IrKa4k=; b=2TNHoK556c0E3P9lOwSfH6kralYWB38FBA+cu8Zjk/d1EFjAXY+CPVyoMGSIwns+7GcR1Ebi5 Ym3OXDZzrF2AqU1bY2U8lID6foPQidlKVmrTWgNipzlhaAZlc4qGkJy X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `adxl367_spi_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/accel/adxl367_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/adxl367_spi.c b/drivers/iio/accel/adxl367_spi.c index 118c894015a5..b70117265791 100644 --- a/drivers/iio/accel/adxl367_spi.c +++ b/drivers/iio/accel/adxl367_spi.c @@ -72,7 +72,7 @@ static int adxl367_write(void *context, const void *val_buf, size_t val_size) return spi_sync(st->spi, &st->reg_write_msg); } -static struct regmap_bus adxl367_spi_regmap_bus = { +static const struct regmap_bus adxl367_spi_regmap_bus = { .read = adxl367_read, .write = adxl367_write, }; From patchwork Wed Jul 3 21:04:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722768 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 4E308191F85; Wed, 3 Jul 2024 21:04:59 +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=1720040700; cv=none; b=frIrur8y2B82I1V4eAFeaBWh0AdLHor6G8QVJGexLEy1AiM54QKIK2owtEHIlnqi9SZhLWPoa64S59nnvvPyzTqqD7fUgKNDs5Moyp4y5AgGYWrl9zqD+lgd0ceRNxy/jVjDGyGapQSDA6O9UCcxINORxazhVdaJiOkfG6nHo8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040700; c=relaxed/simple; bh=9Thw3nyqCMLe1fbX91LTA7mRJinzJdqXzhuvlXc6cj0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EXfBkMGlrqCFZB4Msu8Wk9InJwV3gsM5Y9c2sgXSh8605pQrqeTPodVOrBOxfX2erDbh3dEXgez5kJh+dd8lA2lRGKilznbrgA5vaAFiWip0NBzbkClHN3z4JmJO3F2XqDSS5Nh4n58we/At1/d5T/EKIFIWFDnfup4ICQJ0Sq8= 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=muMwDa94; 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="muMwDa94" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2ee794ec046so22067231fa.2; Wed, 03 Jul 2024 14:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040697; x=1720645497; 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=IsM5uxfiopxbzTC6eyj1SNKvlNUYuJ73SSV0Yy8/1XU=; b=muMwDa94RNRs4laZb7C31KQF3N36apONwr5Qbo0T9Om8h7oI2WT4WvInl0F+zHKMzO KYOrXBRQT+GZ8Y5s9FPOJWe+k131HVx4mvzyJ1EJvG1Uft5PZtpk34FFMsiqLiKD12DY vR+UiBMzXl18MDXT9P2tTVrA1eu9pDGb+a/50druSh1xGjRZW2Ar8Re63LEDrLe84MdT GJrdPK0YfBWcVh/lLhgRheDdTwavoHZHtuE1Cg8Pk/YPvcwYYTBJLuFJaKhPqHj1AzlJ miX47WeLGim8K08A7tzlvwIODNq5ahPO7yYKSkIA2yLATz3TZoDDzu6ODLojZNXYQpUt p8fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040697; x=1720645497; 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=IsM5uxfiopxbzTC6eyj1SNKvlNUYuJ73SSV0Yy8/1XU=; b=ZAH54TFWme5aiQm72fjg29e1mYgVzT7fXeWZI0Fy2h/NNpLq7Fo9g6PVhRUhbjY1qV h08//WqAz0DTGkt9VZVaMwZ8C1A1hv6pnSJ4/sd+mR+04qHG7nmJxF1qU9wUAMM9rf+5 ckkntQJBGIKxai/Je8l6kYEUqwkM3IsD5tf5vSEf0UGZhjQ0T1HpFc8tK4n8v78Dk0oW yIPBN20FA917QHM1VFXe/0F6gP+KSvzyWjDVQ3xsFBq2p8WuBFKiRJFC+2HOW4aV/S9R btYLjKO6YmFzisw8Zbzmr+cHGlj85xx84unuGBtAvvOPhoiIAYpueUF/q0aTDb+CwK4s 1Zww== X-Forwarded-Encrypted: i=1; AJvYcCU5GFOXeLEi4A4q6cdXbLw6lyNjmXF12RP+Il0A8SIq8Ai/rFpF1+GFlV66vazPszOfWU+UwnPpl1zahAfNLr/ldbpeE73InVP3B1gT X-Gm-Message-State: AOJu0Yzcw4FdGtZdP55l9raM1/1Fy3Q5juiWTHZd937D0I/NTp0Nte4i ekEPWIhZvdKgSAnuDFZkZKEl3g86IS5yEOwX1hfGFRIetXb7mnol X-Google-Smtp-Source: AGHT+IGRcrKrQLozh68yKhBCUK09gmUitNlKgh6tNTQkNzaACHhF45hxdu5dSDoPWSzHDRwn6xfH+Q== X-Received: by 2002:ac2:4e07:0:b0:52e:9407:ddcd with SMTP id 2adb3069b0e04-52e9407dee1mr3033265e87.18.1720040697511; Wed, 03 Jul 2024 14:04:57 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:04:56 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:45 +0200 Subject: [PATCH 02/10] iio: accel: bma400: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-2-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=818; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=9Thw3nyqCMLe1fbX91LTA7mRJinzJdqXzhuvlXc6cj0=; b=ej6NqlCWn1QXw4ITODtMxyTmidggl+0jQ0pPMduUwLudPS50zwDzCGT6ydX7p9ad0+uSrd2Q5 oi1ejZnCgzUAq8rTL4ptW5uPQrOT1FAbEdN3sqgp4HmbiezHl8SkmgB X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bma400_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/accel/bma400_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c index ec13c044b304..765d8c4a4c4d 100644 --- a/drivers/iio/accel/bma400_spi.c +++ b/drivers/iio/accel/bma400_spi.c @@ -53,7 +53,7 @@ static int bma400_regmap_spi_write(void *context, const void *data, return spi_write(spi, data, count); } -static struct regmap_bus bma400_regmap_bus = { +static const struct regmap_bus bma400_regmap_bus = { .read = bma400_regmap_spi_read, .write = bma400_regmap_spi_write, .read_flag_mask = BIT(7), From patchwork Wed Jul 3 21:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722769 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 CC4311946AA; Wed, 3 Jul 2024 21:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040705; cv=none; b=OFuogVsggxDQjDeYlIq7pdMqnvBx7KG7pW+IoSMvTPptsO0aAgtb5CA+m7w+DweiHL9GeIBrtl52UxIa4PH+9nK0BP0u0y2orZ9E9BYDzBXW+Ls5gdtZIuZCjqQXcuclt3vpjsOpF0R74RQ4p71DESqqyDPnqQwLw5fCa7ddIzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040705; c=relaxed/simple; bh=rvdhCNryhfDf2owRvr2xHkuHtgHUnmjPYXCumT1JvbM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kYxXWhi3TCyiCi9Iy8X5i6dLgUe6tc3uusrSJ9QOqajS1a+LIS6A7hXzcfpRZw1+elIMV4z3JMjpT7x+qb9MFgiN8yiTSa2Vu5OuEEBGE/m+/IVQMHPr2Pru0N3SK8l+ozbRWfT7HElQKpDIw9WoWT/PPlTG7528DYnRkc5uxl4= 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=GUPoib6j; arc=none smtp.client-ip=209.85.167.48 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="GUPoib6j" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52e98087e32so1354653e87.2; Wed, 03 Jul 2024 14:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040702; x=1720645502; 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=hSLyPNLzqq9nsRo5xfNlIqB27L3bP1qyzKP6evyy9ns=; b=GUPoib6jTcYlIwLXr5wsA5nVbI+6DRzhKcl298DEvxomQaCola1tIt/maw6CLCEMSx 0NDQvNP1nQ5vR33eQyF7OmfYgksanTdMr/8B5SQ8XWOvJTxSFTs6ALk8dzs+H3ma01ow uwMoTblMit6Y1Ba5pSGtIhUdI6hnt9mKxiyS1UEc0YsKd1NLQmanEmgeB67U+1ezlhLq AlPEHOz2Tv5+t1ToZsFOQIlJJIOp7Ru3/87XJ6uYrA0RPXzpTCS2dPC99D7HH94/CMFS bZysJCf/MZd/nlmnQi3g155yz/hUEbg/n9VaIziIyLpxAd1SZH/TjMVCz6kGyNDJOijl W6ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040702; x=1720645502; 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=hSLyPNLzqq9nsRo5xfNlIqB27L3bP1qyzKP6evyy9ns=; b=LG5DLjJcXK8Wbf351Zvf1uDzPXvCMDsgVP54NpwAxyL60vQHWkRlM6eJyWrbFFmqMq PvRziQW+fVgBeV9Ws51h7qDC7k89qfIqj/mssKG+k1j6xLLR7OVqosP7CxlJ38T2Htax xwn3ohH2xiPkAwzyksoat6ZxqUediO1d5zjqv9ky7ZhTuo2ZIlKwh63jNAptTn5pGNWu pTetNuQDzy4nic5QoX9DS01grals+Gof6sSyJET8dEXySiM8AMWGacmH1OMYJ+AOfQif 9J6nDUW1lIl2v3+WNB34/4V9t9JGQPMF4mSLEVir501P8HH4XImx7BY1AhIe7tzMqA2a t01g== X-Forwarded-Encrypted: i=1; AJvYcCXJbUE8qch0K2snJ+I91IMmGTbr5v8abA/DTwOXU8pT4KtoIuRmYzRgciJkVjm0zZ24dHMchpuP+m01KX9UklZqsT7Bpt6sXR9Y+Fhz X-Gm-Message-State: AOJu0YwxKTJPkHScXzOKYMNxQAcvEfLW8Q8iSmwTuuQjJ2bu1v1DGYqB KDebE0El/WdsRj6iYRarqfVXnPjn/6P+U6uo9JBlpNHIYYmVEWNO6nxdEcwj X-Google-Smtp-Source: AGHT+IHa9y/O2eBBwLkLlSspuZ6aKwiFeC0Tl7cNavVLNtZxxxggOcCkDTVO4CPwi2OWiN2XrUFkcA== X-Received: by 2002:a05:6512:1151:b0:52c:df4d:bb9e with SMTP id 2adb3069b0e04-52e826932fbmr9556258e87.41.1720040699777; Wed, 03 Jul 2024 14:04:59 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:04:58 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:46 +0200 Subject: [PATCH 03/10] iio: accel: bmi088: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-3-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=854; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=rvdhCNryhfDf2owRvr2xHkuHtgHUnmjPYXCumT1JvbM=; b=XgA5ulxG0Qnmk/hbuTYV/MGsqI9SQZ7AW6S6/BTps993rdBse/sszD6FXWlpz0HCjudsjXYk/ pySZVTC24ouB/S2DKX8ZFBy3KG0canAFIwX0Fv91ijPyhb9IUsyDz+w X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bmi088_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/accel/bmi088-accel-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/bmi088-accel-spi.c b/drivers/iio/accel/bmi088-accel-spi.c index 7b419a7b2478..df1adc059aa9 100644 --- a/drivers/iio/accel/bmi088-accel-spi.c +++ b/drivers/iio/accel/bmi088-accel-spi.c @@ -36,7 +36,7 @@ static int bmi088_regmap_spi_read(void *context, const void *reg, return spi_write_then_read(spi, addr, sizeof(addr), val, val_size); } -static struct regmap_bus bmi088_regmap_bus = { +static const struct regmap_bus bmi088_regmap_bus = { .write = bmi088_regmap_spi_write, .read = bmi088_regmap_spi_read, }; From patchwork Wed Jul 3 21:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722770 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 7B1B71946AD; Wed, 3 Jul 2024 21:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040707; cv=none; b=ig/hAaMghxCeP4/MA2G3O5nZRqqH2nC51CvOwHN/W3+0MomdRTIe4l/t7o7z7Bib/VWBOw5amwYNhVR+JbdZnk9n4oi0oMYpAXyzZgmIS0jNTGOGVlUNOXWSixNuDpZmQZoh5632JC+SG1EAHGBPf6jm6PuaPVxSSonwrlJHD6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040707; c=relaxed/simple; bh=ooeA+PgyaBsBen4Pd9RbrcNbKRa742OPgC9ACIXtitk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SwAU8eqQwNudLpCNkY6WDo6ar3EMpIDz7Vr/n6ZtcZd+AoBl0gKY2gBhBezCruwK04GMPh3/DX8hVvHTNTdNIZsYVC7IFGUbCt8OZ18vIkTQLpqlRTmq4hBuJ3VukQklpsiO9ikCX2mvjUDGi1Uvj45ZdoSkqmBU9mZs+l4oe3g= 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=DRSq0+Mw; arc=none smtp.client-ip=209.85.128.41 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="DRSq0+Mw" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-424ad991cbbso45247835e9.0; Wed, 03 Jul 2024 14:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040704; x=1720645504; 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=zlTGqrOKF0ZgjIRJTA1cVGKEsmLO3ONpu3x8xyQX0YQ=; b=DRSq0+MwCIrKstTUHcsrJQngW1NlfpYgj95oaGL2O36Syn/eW8mw/2kgIYGe9CiS6T eYNJwrAQRVvsTGZc7ZTa4ezNThlQYAe7ZWI+QWNMcUvoTuQOfmi28PAThgwZYF4aq7Up YEsxSFXfQ2AI66bQheWM8fF1IlmIIrueXW3T5cHDD83ea1155xM2Bq/bELsCjjsFFXIK oCEtg6qVFISmIBNfw1KP3o41kZeDUV0VQEbI9qyfyn9WfnQnjBjo2d69DOCIVy/5usXn g3kjn3jr7tGhppX2RynPHmTx6zTfDNN+q4X3EDnHnxP4b3rc5BRKtYk6B6GyKcddlOL8 FtyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040704; x=1720645504; 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=zlTGqrOKF0ZgjIRJTA1cVGKEsmLO3ONpu3x8xyQX0YQ=; b=vNS4ggfbDCY01kgM+W2BPAzqSW4QQn5t1/oIqTuinN3hjW4zAwvG1yyEadmXmDcZG6 Bbz2lHtYJbpPF1RASy6eCWmYKduONnzAl3jZaQuunYLm44dF+3nF0NfqMHZEH3PhkkNn gNKZc8NQIEb9hBze0G106POx+T08mHpsxVs4+hiGex/phjl5iUNamJVMOBRZie5MXouF Ss0SRXJnVk3vqbE4MGHqiIh99RPaFVml4/SJumyRH+n0YRK9Qy9fE5aT+sc9nAqGzNzD SZ6XA6uHmibXmcaqlND5z7eL/M/+Mysi3tfnt17IkNKA/f7J0RBqaUXrB635nVQSJYan Tbsw== X-Forwarded-Encrypted: i=1; AJvYcCUH1zMcXxf2gkXs+g9C+LHGEYXDy9awyMU6A5QnqPBySfch5wUW0HUktrs0JD/NrJ3IexDF3vFVqd9VRg203paw6HAmZB0TgXx1IgHl X-Gm-Message-State: AOJu0Yyxk3IaI2yhQ9TBqdnuuy5ufpDURHkamyjhHolVksl3kpszcF+k 9Rul2IIdwkTWljDPiu58F3fSE+koiTTfkn3OaV/ucWs964qwQQJR X-Google-Smtp-Source: AGHT+IE1NXvpVBCK9QupLk9bc5nq9+AD53fTMQ+c+4TP2br/j2J6xLWtnAS+6/YZMptOgeGmXHcxnw== X-Received: by 2002:a05:600c:1c28:b0:425:81bd:e5fb with SMTP id 5b1f17b1804b1-42581bde710mr69730475e9.36.1720040703914; Wed, 03 Jul 2024 14:05:03 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:02 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:47 +0200 Subject: [PATCH 04/10] iio: adc: ad7091r8: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-4-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=854; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=ooeA+PgyaBsBen4Pd9RbrcNbKRa742OPgC9ACIXtitk=; b=HPb8o0WTIB+c+VIThvsdtN7kTNTsLBLwOEdU4TfHuLh7YEg9NBZmSDDE5bqOD97dinzPZpEB3 WK5NABJCCGNAsu8eOZwM59qGx1pI61k8xNrdnFdMXJM9Rr9KEA007fk X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `ad7091r8_regmap_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: Nuno Sa Reviewed-by: Marcelo Schmitt --- drivers/iio/adc/ad7091r8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7091r8.c b/drivers/iio/adc/ad7091r8.c index 700564305057..c9e014d6a77c 100644 --- a/drivers/iio/adc/ad7091r8.c +++ b/drivers/iio/adc/ad7091r8.c @@ -159,7 +159,7 @@ static int ad7091r_regmap_bus_reg_write(void *context, unsigned int reg, return spi_write(spi, &st->tx_buf, 2); } -static struct regmap_bus ad7091r8_regmap_bus = { +static const struct regmap_bus ad7091r8_regmap_bus = { .reg_read = ad7091r_regmap_bus_reg_read, .reg_write = ad7091r_regmap_bus_reg_write, .reg_format_endian_default = REGMAP_ENDIAN_BIG, From patchwork Wed Jul 3 21:04:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722771 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 7242B194A5C; Wed, 3 Jul 2024 21:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040710; cv=none; b=U+sduB7CuPmvnZnxUbl1YgndCwJrlyaREOqoJadjcqu+zUaswTP4xBJzE/6B+RhQpvuR4CV4pGW2ZAIoBFs+BvgJKeBnCwLikuZcCIBAtZrztAN5vZBAnEB5BBUA08wGCvX87luP79yXKrgb1SMLOr0NaQoqy0CZZ8Co91YEmqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040710; c=relaxed/simple; bh=jcPRvWcyGFXA5sIBs2EqAKzN+shTLb0c6AvRWYEF138=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UpzuuYk2po6f6EwSdAVPS/K4VrP/AqxhP1g8loj1zJWY39xw/2pPbMs5+uAHE4w5xj05ltBnuu17/5bdH0EYiawO/QvWh7bOUEqrySAaeuYCyexsUcjDBA/8nKvzg3dPYldx1V7t3yduQHEg91/KBhEb+3OcaPIwecbLq5x4Zus= 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=fnA7GFcM; arc=none smtp.client-ip=209.85.128.49 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="fnA7GFcM" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-42579b60af1so35062965e9.2; Wed, 03 Jul 2024 14:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040707; x=1720645507; 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=WNGxq4SL9fDISDZOzJOIeS8Yn95Fdsrda0h1D848QAQ=; b=fnA7GFcMB0ZWG9Yvntq7zEtbKG0hRn1PpVdaseTM/1KHUrVSAK7Ud3gRU6+lKfGCFa qvVVOLkiljU1eKNlKn7iLH0PboXFlaS//6GEDW1ek2z93jCVBGFNX4/CPBRExQiogC8D zLfj6u4C/nLl9BV6YGnEqeSEm7af68J/1HGjFJW38/7lJ/EELjkDXQyzKhhULYfHGsp3 GobQRMqJ+cgCE0wR4phFfRWh0MeK4NfN7WKnNQJpYLlOUqUICKucSmRaEIoUlMTjsPr+ dQ3dLW8VoseNi9rUi8phb7EtVEV7Jy3dSXI5qStaHla3jW6wWTFNe/xDB0FvedC4w3mg dImQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040707; x=1720645507; 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=WNGxq4SL9fDISDZOzJOIeS8Yn95Fdsrda0h1D848QAQ=; b=WHiSuEV555hvtgMEWRcE/hKj+Oj8tNpu02V5i94TXL7lsahRvGyT5aFh/6AySbVWRS st5PK4QjaI2Yj/HXAnlEKDmbiNkLsVRA3khTuSEFvKulEhqiqHzbjA2jvF5XJdKP7gMi ogTHvKelazLxn0VJYnQvsilCunqLr+/ZYkTXrjN7pruKaW/B4Czjh4flFLfw7QMaFDCg TlpGgNkokW6Ltd2zewAO5AaQKO0X3DOZjqyCfRZljf/R/YY6j7kBjfC3gAS34TTViI5/ aeFdNrmIvkJ/qsL9OvNvIZtsaEJ6KLLcmhAuBfxACSLacOirN21XY06OABMa/BvaejZN DWiA== X-Forwarded-Encrypted: i=1; AJvYcCVKSzpOwAr9s04tAXwH4WihfUHL4eEDNJW1tScjSGbyrdl6KPdaTAhrmi/9ySDpZZHiLbQPttanFFygXtWUu3den14Clj1gtGUF6l2M X-Gm-Message-State: AOJu0YyLdYCXc0TTjTk7hUAGKdWGMEmitRXWdZpTg7kzUJ3GM4O1S+Qi lajPDIZQYjD/hwA+7+J285oP9K/blr3QfXUQV+RKhGH+n84PDwtX X-Google-Smtp-Source: AGHT+IEiSAbkStJve0UvTet2fv8mRYfukbpOQOODRWGMPSIMv8yRoAeKLMlTs4p4twEMWUBkIx9GFA== X-Received: by 2002:a05:600c:4fc5:b0:424:90f4:309e with SMTP id 5b1f17b1804b1-4257a021443mr87594165e9.6.1720040706576; Wed, 03 Jul 2024 14:05:06 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:04 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:48 +0200 Subject: [PATCH 05/10] iio: chemical: bme680: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-5-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=877; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=jcPRvWcyGFXA5sIBs2EqAKzN+shTLb0c6AvRWYEF138=; b=sbkFEBZzjK+NXZ+zhSd6LXuVNC9x5ZHo0bA+7OccbF67L6/yUxwa0BYqnbVN9E2AWJvOryWU2 gWwpOkCYWeLBhYDLU0zO7B4aUsKwIb9JZ6gSFcKNkvf4s8eVI1pNyjt X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bme680_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Tested-By: Vasileios Amoiridis --- drivers/iio/chemical/bme680_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/chemical/bme680_spi.c b/drivers/iio/chemical/bme680_spi.c index 4404d42ae5ec..7c54bd17d4b0 100644 --- a/drivers/iio/chemical/bme680_spi.c +++ b/drivers/iio/chemical/bme680_spi.c @@ -100,7 +100,7 @@ static int bme680_regmap_spi_read(void *context, const void *reg, return spi_write_then_read(spi, &addr, 1, val, val_size); } -static struct regmap_bus bme680_regmap_bus = { +static const struct regmap_bus bme680_regmap_bus = { .write = bme680_regmap_spi_write, .read = bme680_regmap_spi_read, .reg_format_endian_default = REGMAP_ENDIAN_BIG, From patchwork Wed Jul 3 21:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722772 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 6C7BE194AC6; Wed, 3 Jul 2024 21:05:11 +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=1720040712; cv=none; b=uSOanD+45Oz/r8cWSlowEIgGklujo712qZIAGSe/Op1WYMoqoR2vrWj71RteFMgawsEmsFf+DbztNk36Vl6q+MkXc9vDu+EqjaOPD/iVoVrsxpkfAn/cpdelKHAxmrTQfvy0UBmM8h93uDmz+9pWuJuO7gULo6efPDDnDCQ/JpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040712; c=relaxed/simple; bh=qu8qNBj8vUF/2atfCKt/6vXczKBXVcg6fwJ3ZC0IdQ0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LK5JYl+3XA/AnQaTBpavjC1F9uIYgNp24g2jrgHPUoIZoH50e/11sONv1bU9e8SddZAGbRYsHif3+IRQNLsAONh5wSaXNgJITLyWjDQhSbxjBrLwGGVXEnxNWmsbtQoUk4/ufCttcfx2AyqYvvlIHE/7iyL8bCw+3kWJlE2TwJU= 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=C0sE1KhS; 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="C0sE1KhS" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-424aa70fbc4so41380485e9.1; Wed, 03 Jul 2024 14:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040710; x=1720645510; 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=T0e1FJBvXxubVN6bes3XpD4DFtWFT5eJx4DEDA+3BuE=; b=C0sE1KhS/txHBFGv5p0FxdsMyXHovdDue7nTUVZn6kUo/zjDmkikUGnkOeWVuMoaL6 Te3B9QoW5dxrEez99SqINUzfIvEBx/7WRr/gJKPPmaGu6x/gQOHtfsgiRRIjhx20Kkwr Zxm0dpV2gJJump6zO5mPUOTlxXuSLaT6wj7XQEzl8p7ERHF4ujJWZmgyiTPdj4oPBS4S sGODZ3RJcZZoZgig7UIDuJNFmPmp+nEYLuSaDc9/Bbi5RjXQb2p2QlFwDZDZm7LSLmWY J0JUkUjjOqvFR8L1FIaqxl32xnbHnB2L2Olm7tA8iks9qhagb07rfUfFNEwpM7obmh9s H1Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040710; x=1720645510; 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=T0e1FJBvXxubVN6bes3XpD4DFtWFT5eJx4DEDA+3BuE=; b=kspcjOy2jasJP5V8Q+2qpjhObVd/r5uVBuWWDdxrCrjm+01DGvsOGNRXgAvHJjYHKv 6VRRqvwkWT1Yk3n/FeUIna9kYVPyFNENp9gT4xRmQ0gwz+o5ryV67QRSwkFZXwtzFzZT sPNPdlwr9J0axr6AYPjk3rpIY5i61bLpBXh+wCrq9di2wcFASyRtw7QV577ZvL18zn0f gfMG7Y5+ytYyYCaYC7HDVQX49Y37RXFq9pficsRb7Lkan4TVvrx9Kt/avZKpKS9Gt3cm PXWGoHVUe3lh2iuYnuaRIUlJQ4KY9OsyS5iSBpL/oRDr7FknWNaYiOa3MRNchFT0aGtn KYYA== X-Forwarded-Encrypted: i=1; AJvYcCWsYcPpUeC+imXzqbn1j86fgHwERy2B3X/jHoeZmCuhQxGRRAIBPcgS8KcDXMXL3MIv50tQVXjdi5MwHrbpPPUT9n47wSY7Td1d4hIX X-Gm-Message-State: AOJu0YzQbZyf/khcBG//RXTN8ocdbBReI8dTvmtgodSmt92ruy0jX7ah Gg85vsuS3TTz8OLw/GHX4Z/lE5xQjFRELuPazBds9DJEJ3gna57J X-Google-Smtp-Source: AGHT+IEiVTxHuSav+0wtLn3l553XLb9kMn9Fg5PoJzpC7hxJ6sr4XBYfD0Nxn2E6ja2ZdQkw0Cf3CA== X-Received: by 2002:a05:600c:6a86:b0:425:7796:8e2c with SMTP id 5b1f17b1804b1-4257a034ec7mr95728575e9.12.1720040709857; Wed, 03 Jul 2024 14:05:09 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:07 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:49 +0200 Subject: [PATCH 06/10] iio: dac: ltc2688: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-6-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=783; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=qu8qNBj8vUF/2atfCKt/6vXczKBXVcg6fwJ3ZC0IdQ0=; b=+Q/wsic0AlzaW01/l2PKZ/55Bkw8ZvFdhS0XYBAoC3hj1zRW60RbmBa8UPfob0tv7UVEGn1yY Q7bh32TVTA3D4QXNsoWmikA2svvzNmgSKd7yTSLhEUJrO/OswhQNeVr X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `ltc2688_regmap_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: Nuno Sa --- drivers/iio/dac/ltc2688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ltc2688.c b/drivers/iio/dac/ltc2688.c index af50d2a95898..376dca163c91 100644 --- a/drivers/iio/dac/ltc2688.c +++ b/drivers/iio/dac/ltc2688.c @@ -918,7 +918,7 @@ static bool ltc2688_reg_writable(struct device *dev, unsigned int reg) return false; } -static struct regmap_bus ltc2688_regmap_bus = { +static const struct regmap_bus ltc2688_regmap_bus = { .read = ltc2688_spi_read, .write = ltc2688_spi_write, .read_flag_mask = LTC2688_READ_OPERATION, From patchwork Wed Jul 3 21:04:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722773 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 C1A0B191F91; Wed, 3 Jul 2024 21:05:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040715; cv=none; b=IX6YJKIC5aWfK1S6HPDaHwIl65NEtrxdad0+3hSLRp23NPzDHJevaeuEWndDcQKU/jxRxaK/RNbp0eFCquK2vHwojajgETLG+1CouaE8Hu6VcGnrQo1w95tG9jdRaCCGWF2UcBcVK1zD6UGUm+xim1yi837ntnquqYBPBD+57Hc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040715; c=relaxed/simple; bh=Gd4uxuPPYsfdfu06QZD+9Z7R5hRbOe8O2n7T0URcmi4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TOvBrT00D056PrBikgnIVhkPNUMgYG0HCrhZne1zPgKRwa094Gb7W7a5uGvataf4WqkDomlFr0Yi7SOzbBoJYk+4bNMdZrZeVugGxiJdqYU9CcoOzVhgX/AYNSotQbgcZjFMzka28pKeUSduYCrMPZcn4ATovuEGMHW2CMdRUjU= 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=AOny26lQ; arc=none smtp.client-ip=209.85.128.49 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="AOny26lQ" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4257d5fc9b7so35774775e9.2; Wed, 03 Jul 2024 14:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040712; x=1720645512; 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=yY4dJKKorNRftBei97QZy0Z09pdM2kTyOUgMKAY8OUs=; b=AOny26lQOQ4bLzy3efFftBQouCykGHP8OiSrX1xuQycLvwI9IgcVEI+GNFaaR1reFx JL5V1aK7EyBrmMKAD7bRJtOHuZbssg+xkcFwJs1iv/PxU9eI5twSFwqN9t0ggdV/mD5u k8tbS9bVsQ6tBNiADdLmQAKfhkKwEXzowpgO8SnnlA/gtq5GeWNdnAXdJNEdfxz1w4iH PinaR83Bp8UqJUaUvKfPQPL8dGX6CLLm7WNgaJ03uoATzA/fiXeYjA1iY9dF5meJao5X jMYWPExDJ9dyfijiI3u9uuCTT7PLRTC0rpBTxLVL33ZUlgbCGbhbqELneqiFBMo/AFx7 qURA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040712; x=1720645512; 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=yY4dJKKorNRftBei97QZy0Z09pdM2kTyOUgMKAY8OUs=; b=Vfk3+85HNqXPkju2ZPmxrdrpkSn3aiucUX3B0fFKZRVtM4qVsmie5Oa1CoQJvPACf2 WagrVJHuCR0hb812xI246zYwWPhBG/ss54AcAsTuN/Z08lojzTGXl4GoD/VQGKwPC3FN onvWZL5x2OiWKyONZD5P8uNxe/5L4u3zae/53qM4h2RXHr2hvM6ZurzKNPb2T3ZijIY5 SxrVG3da8jHn+vCKWUQ/nIc1evqNQwUTCVrUf2cCRelt1bmlJHqG8qZq0IHy4RLqyTIe F+i6a5q8uuo9lX7/sQYRXuE+7MhyuMXOgkfFv3cig+p9yEVhv1d4qjpQwg3Jmgpc8AH0 5t5g== X-Forwarded-Encrypted: i=1; AJvYcCVTkwUKWfv08VMZWpqdDKSRXSchkduFKp4XYH1VYv2Q2GXGbdoopDqJmus/rlnaRTntH8cp4rAWLtcBE9R6fBA4z3r9NTPHjo/FyLWS X-Gm-Message-State: AOJu0Yyp+1aseTYQARp5ZRTQpb635fVEerXczGsY7fEh2wIDMDka65OO jfrogGgT7OW/aO+QK9At4Sndt7Xhrwqka81ePGJnx7E9btjabYNk X-Google-Smtp-Source: AGHT+IFovch6rWmvTP5Umm4B1MYvc/hvlRUq/o9zTaYDSUUpv+DdlZlz8KsS0Drk8i67FYXonSPnUg== X-Received: by 2002:a05:600c:458e:b0:425:88cb:1741 with SMTP id 5b1f17b1804b1-42588cb1985mr63832015e9.36.1720040712010; Wed, 03 Jul 2024 14:05:12 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:10 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:50 +0200 Subject: [PATCH 07/10] iio: imu: bmi323: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-7-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=1403; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=Gd4uxuPPYsfdfu06QZD+9Z7R5hRbOe8O2n7T0URcmi4=; b=5jln+iPbxWpqNDr3oyR9YQJpa3aJs3KxrhhHXeA9t23H0UMh9rHpqcAzXVlU1yokmjj86cSZ6 NqhT8RtvpTdAeVgYxTjy23DWIsbAFG4/gCfbnMAgzTV4LRls5an0/aa X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bmi323_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/imu/bmi323/bmi323_i2c.c | 2 +- drivers/iio/imu/bmi323/bmi323_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/bmi323/bmi323_i2c.c b/drivers/iio/imu/bmi323/bmi323_i2c.c index 52140bf05765..3298e027c97e 100644 --- a/drivers/iio/imu/bmi323/bmi323_i2c.c +++ b/drivers/iio/imu/bmi323/bmi323_i2c.c @@ -61,7 +61,7 @@ static int bmi323_regmap_i2c_write(void *context, const void *data, data + sizeof(u8)); } -static struct regmap_bus bmi323_regmap_bus = { +static const struct regmap_bus bmi323_regmap_bus = { .read = bmi323_regmap_i2c_read, .write = bmi323_regmap_i2c_write, }; diff --git a/drivers/iio/imu/bmi323/bmi323_spi.c b/drivers/iio/imu/bmi323/bmi323_spi.c index 7b1e8127d0dd..571e1cd7ce72 100644 --- a/drivers/iio/imu/bmi323/bmi323_spi.c +++ b/drivers/iio/imu/bmi323/bmi323_spi.c @@ -36,7 +36,7 @@ static int bmi323_regmap_spi_write(void *context, const void *data, return spi_write(spi, data_buff + 1, count - 1); } -static struct regmap_bus bmi323_regmap_bus = { +static const struct regmap_bus bmi323_regmap_bus = { .read = bmi323_regmap_spi_read, .write = bmi323_regmap_spi_write, }; From patchwork Wed Jul 3 21:04:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722774 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.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 52BBD194C85; Wed, 3 Jul 2024 21:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040717; cv=none; b=Vrzu2Yk3/oPqvUlZmz4MLDhgK1VjQ3aJWySLtKK+egVdSDt32tlt7Gjt9WvprxT+lbv6gd2Rk10D1/LN4qmP2Rte2pAy6R3CKYcAPO+j4iqFAD/jAj34NOsYm/5XMFym+rf+0bF4b9FAAX4ZRMpQWta6Vl9otd1ma6yePd7NVAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040717; c=relaxed/simple; bh=qD7vYgNjKvCPG8RA54s53vsMIszSn013olEo9C5PosI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qsj8NKNnLZZSnGuJqT8SLxCOxtVfOsZSE5RYEgn+SWl88sOHRA47ykWAGqq7I9BA8z46U4X4hxjRpX25eJJ3i5hqrauHI51/w9u3j1ijePyuhaLwH710QpdTBvsjCwGn+dUxqSDP5UHqhnUr9xOMzSG16eVdHuR3q/BaS2zwU8o= 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=iecUX5xc; arc=none smtp.client-ip=209.85.128.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="iecUX5xc" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42562e4b5d1so41023095e9.1; Wed, 03 Jul 2024 14:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040715; x=1720645515; 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=dHA5emEYqvrX/CJBhwACUJiUJvM3hLVzvUbVKbSsgG4=; b=iecUX5xcozUa9LOltvJrKH1JQHx9SZYfXG/F3dnTfFrZ+XNG242Fng0zOhwO5WJ8Sh 1W15vlcbhjQPtd8KhsXNkqLqFgMX+vKbNmZbzyoVHujf1BDT9901Ar/CVsmKLlMiQ3PI UCiRSNreImNEFnThLkeNiid8mSTet1OEiR4Aq324+vPJkv9ZS3eD3+R86VwivMlWSuLl gl2tFNEvhU2Ok9Uv/cl4/fQONv6bCSH6r3Qev98hQMKQKY5d7+UNRuTtGbqmfnVCr/j2 ZPT4FLS9H3rzFMllBg2r7xlqE0emogys+G8Cuy1PhlAtY3zpAlW5Zdr837UM7N5GlpD8 oMDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040715; x=1720645515; 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=dHA5emEYqvrX/CJBhwACUJiUJvM3hLVzvUbVKbSsgG4=; b=da+VaaMC3l3a6eDqAywtziinYTVF1NARIUEFDbcXCHluvDRub406ayKo99mloJdBOB vKcWd79BKVKL+r1NrDUvN+JQYjx0+zO3w85StAVVWkaOXXPJhRa+7DPtbJRqj97B6JUM zm4dInBLPmqU1vQ26JW3LdHrnUWuyUJ9m5dSdvBg9Trip8sExaBmFKPxvUqUCIbz5pjw 8QWLnWA6ntaxdzNVQUo+v4wMEDZQYBzFIWmHP1z4222UOjssaZuLYhhCUMuEBgdJ3+DG vCL1/eDRtJqd5896o4H/mUpxr9b4NWJEZXykD/wxj3cKhhYMAWPEYE1dPuvypOdMuYGF GRTw== X-Forwarded-Encrypted: i=1; AJvYcCWF08SG12wdeu/n6KtTJgWtpjRMLKONS5pehIA9SjmmjChQNL2sbxUV2IrgZSkFUo7/wuwWxtpenrBh22kPYKVKa8/OBsG76k0PIrGf X-Gm-Message-State: AOJu0Yyl08TCdjhArv9C1GNdCa6JfYgWzK9e3E26fe9vbttNhL3y8bC5 QKSvkxoURxjlFk8Xma1gwhqVQo2wLgF+66dNjCaaVE8ljynLpfJrUeFh87WW X-Google-Smtp-Source: AGHT+IG1cKnE+J3TVR6xWjsufid1OmvuteA+gOkBVkH1xaDrfhTm1EqfietmBjUQzIfsHXxj9qdEfQ== X-Received: by 2002:a7b:c3d9:0:b0:424:acd2:40af with SMTP id 5b1f17b1804b1-4257a011a44mr89725135e9.24.1720040714880; Wed, 03 Jul 2024 14:05:14 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:12 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:51 +0200 Subject: [PATCH 08/10] iio: imu: bno055: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-8-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=857; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=qD7vYgNjKvCPG8RA54s53vsMIszSn013olEo9C5PosI=; b=fSiNUb2Xf4JabmdPthdo9+qtDPOXq4jZbNz1HzxA/NDjaJELyEw7QUL3jpv8zm7d2MrVjD4Kg pPE+h+G8O2CBRePfXMK6QSHwvTYSsaFUBi5yBPhDxqKAz4BaupqRxC5 X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bno055_ser_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/imu/bno055/bno055_ser_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/bno055/bno055_ser_core.c b/drivers/iio/imu/bno055/bno055_ser_core.c index 694ff14a3aa2..da7873bfd348 100644 --- a/drivers/iio/imu/bno055/bno055_ser_core.c +++ b/drivers/iio/imu/bno055/bno055_ser_core.c @@ -492,7 +492,7 @@ static const struct serdev_device_ops bno055_ser_serdev_ops = { .write_wakeup = serdev_device_write_wakeup, }; -static struct regmap_bus bno055_ser_regmap_bus = { +static const struct regmap_bus bno055_ser_regmap_bus = { .write = bno055_ser_write_reg, .read = bno055_ser_read_reg, }; From patchwork Wed Jul 3 21:04:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722775 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 4F71F1953A8; Wed, 3 Jul 2024 21:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040720; cv=none; b=mS5ldfZnDx1eRMPhkIuzDJKAv8cqG9vZ4sF9NwY+Nnnn962cEOm4fwH8+ET00aXx91xKRWsva6xLmmzwo7nw899zgCleMps9Gu7wyOiUU1ikaOGe4deyDQhfMEhE9Bni6nyXc/4TQn/hPXVg3jnebJFkJgBIdvUhbD9VzUQjqnk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040720; c=relaxed/simple; bh=NbcbWIvsQrzaCBFIWZHxkGEsF4CypNL/kk+IHCezcoM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S/TpPixv8U5J2REv8INcfYKwdF5MygK4COmA2ySyDeXffu+YvSGCAtVh3VsNam9bStvmQ1fNMrj7Wy6pq5p34sNA2fES+9hsqJ2DZ0n//R7n4nUKMsFkP9iB87xQC6G1HlOKuSIEegoJQE5BAP0LWeFRkZtF6U25AFWtLiXnKtA= 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=iNB3tlI/; arc=none smtp.client-ip=209.85.208.171 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="iNB3tlI/" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2ec58040f39so56824421fa.2; Wed, 03 Jul 2024 14:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040717; x=1720645517; 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=RRgzlP2UcPIrCp97K6UhN9/fp3i9cpcun18o+fJ4UXE=; b=iNB3tlI/8MZafoS3rAEaf9T/32CBl1NSZXJOIoIF5o2zp0nJma3DQ6+S8OrLxowZao uDLeDbiZRMFKPjNyCNUJB54F7AspD5oweZUb2LKprJt2BPJntGmhLQ0zIAiqEvC7Ke7H tlSnfC+e4rrSJ7QLtu0vXDgIP0hxAsyPytYtOIe5P+TizGqfbyRtOY9m/5C1Lm4PFKOY moI4Lsc7sqyI8kiawO4/1z6VpPjbMxh6JGtyJ/l9lLsxZJi2gaitElqXRaJVQZBqi7Lf DXebRjhg4AH1QNVsFAK4v03JR7yJcOqPC3EWX9jvO6iGMxQzbfI67mRNC5eCc4GFVDDE z7eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040717; x=1720645517; 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=RRgzlP2UcPIrCp97K6UhN9/fp3i9cpcun18o+fJ4UXE=; b=b8M2XLYUD9KDwADG73bhV2rbuLIzmlq1HIDW2uPHaI1bvPp7EiMk1iG7Bc0/5N1mNy zPIBgxZMSGzgHLiM8tgYRv8szYdPv4FsnvL2DBrwNWl6vOhSHXCSfxalhwCEeripzXfb E0/8UmhY3smhiG3/X1Tyf+C900TDE7WsrYjN/aZecebO37O3o6s40aAeRAtSy+U+rbd5 UIq5098jxLsZf9267/glEQc9iRXyebUH+2Xb7nuVpzqh/lo8kGNNPSMm1qnsfFaUu9ZW aFLfrSeVvYhzUbOjhnyju1NQXivJKfGYZY3qya+qH4CfsArVKcqQda1lYgWNQzCpRdqP BFFg== X-Forwarded-Encrypted: i=1; AJvYcCWJRvYIgxGqZqdaPBeIu/UxR5wJC3gPQmd+5ykBfAgI0hlib1Dx7r+643kXY8FrIYbLiwhSyWKdOy52mDZEMLJrCS85SLfvaPYz45Jj X-Gm-Message-State: AOJu0YyrSVXSnG2k/c7PE/ia2yRr81OcJ0uq5xYLntxtICKB2c8SSipg uQ/wKx2rwkdgDC4WqsqEdj75hVChnppFRQ0LkasE6kJuwWWi1qDasEw4mYXi X-Google-Smtp-Source: AGHT+IFETK18+5iYyOF90xOIofOYcMVWB4wdE080wQa1e7W50VchGF+OBxVK2c95gtRi1YqnrE2DMQ== X-Received: by 2002:a2e:be9b:0:b0:2ee:8b92:952f with SMTP id 38308e7fff4ca-2ee8b92964emr4294351fa.0.1720040717423; Wed, 03 Jul 2024 14:05:17 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:15 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:52 +0200 Subject: [PATCH 09/10] iio: light: gp2ap002: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-9-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=819; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=NbcbWIvsQrzaCBFIWZHxkGEsF4CypNL/kk+IHCezcoM=; b=KyYBQmFLM4bMQcpPgZPrNxNu0ZrsDOcpEf20pj/WZA9aw/3NKSF9/8TtHVHZbDK16awEhraMS BZWT30Swj0pCOznZO0bDMF60fGnZiyBgZoeXk+K8juWkGcXiwxqDIzW X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `gp2ap002_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco --- drivers/iio/light/gp2ap002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c index 7125e011a38a..f8b1d7dd6f5f 100644 --- a/drivers/iio/light/gp2ap002.c +++ b/drivers/iio/light/gp2ap002.c @@ -420,7 +420,7 @@ static int gp2ap002_regmap_i2c_write(void *context, unsigned int reg, return i2c_smbus_write_byte_data(i2c, reg, val); } -static struct regmap_bus gp2ap002_regmap_bus = { +static const struct regmap_bus gp2ap002_regmap_bus = { .reg_read = gp2ap002_regmap_i2c_read, .reg_write = gp2ap002_regmap_i2c_write, }; From patchwork Wed Jul 3 21:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13722776 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.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 5D58B195F3A; Wed, 3 Jul 2024 21:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040724; cv=none; b=aKSNz25lm7XOaxudgM6C7Rd5Bc4rQ+IZrtlcGtaIhY8hrS7VFAQ4ERudivMIt/IuS8eU8NRJz7wPVzfs0n3/Ag52DW9rMBmOjLK1u3EaflKaLjEpvMZUIunoFBSTA6cvKOe1B0hdbGWDme0HTujpO0c9EreeHemAeuRfyt023Rw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720040724; c=relaxed/simple; bh=0t8By2YYqQKqOLTidUf3/P6f28/CPTfyCx4winCDhm0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BUQdmMaIeUVmpciVKp5SoOONhcW6NLJqZU50pOSdWsSR5Bm27/EDvCGQwrwH23dFP/V1yEzxBBdOOibJDt5M538li+pwkGb2Vc6t3bOB5Y2McRdc+JsDrKNSQYUaA9uMT4E2hdwW3Q/dWQaXx+JpGNigEtjhpKhouNeZHe5Hqk4= 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=kU1UxxhV; arc=none smtp.client-ip=209.85.208.179 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="kU1UxxhV" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2ee8911b451so9143411fa.2; Wed, 03 Jul 2024 14:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720040720; x=1720645520; 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=IyX9TcRdVHyapOF9DOsH/OFvhz6zliZWtMsX1SPbtnA=; b=kU1UxxhV27ISmphZQh7Qm72EbrHF42bsR7gBZPomMzTASJeT9obgPoQU/I0vN701me 89rTvKE2FlFGaNvUAj3wz1y/ljpR4KwyUvNv/Gr6VtVlNnTb0bGOQ6iBrAdiDXy1TlPw z0idm4zJV18VlVB6t6uInygsWlumMI9FAiAxQsK+oXjA6ef/Bgz8Ge76tZdNQjxeSgpM JzUHSfDSfGmjPUeeb/gsJRk/pf0gUtZQJEx9HpgkDSrWJDBdj9VcQfGVSmrI6Lxiz1Vt lzG9Tj7tYtzInm8YWHrnFgmrjJT6jW7J9Zrkq169LeAF1J/6A8IWYpLBJ11b3xhGMUVg niZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720040721; x=1720645521; 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=IyX9TcRdVHyapOF9DOsH/OFvhz6zliZWtMsX1SPbtnA=; b=UDx7pwFqQQKCQxGmO2+dYSRfL9FU/OiONSshDMgD4Qak83tgJUiSrz+5LdKVvG6tao g+hcj+VIt4+zW9p9J0oELlKHGppxmEn1axIRewIITrwmck9OU4kC6yoyFtSWwtbTqKQe onCsn8SfMnIHXqQQ80HV8FPm5kI8Pcn2bE5pkePF1631GbYUvhV+R6kgWUfhF717rnkP tc9++jVP/qvp51KK6ztRT+FsvNs1lXivbgoKWrf7eNKGLUtVVLUoA6i1pUUqlCY9Um1d 82DUhuijiO4ubwKawfXTJjVgsD2lwx8wMjH0D53RJ5BgHDWnYfWcOY1PmayfGOyZ/oSs tSFw== X-Forwarded-Encrypted: i=1; AJvYcCVSxBZigNZiUG7/dlZQWk9EZYYQhoAyGBInCUiuSPNwwuxNVMnZ1pp2m+yaOGGKAxvIQc6nPHWoSrxwom/T2PpfVgc6U4eph+4nJqs6 X-Gm-Message-State: AOJu0Yynm+J6PwtvPf1hOwPSw+G6D0SWuqXoqivtfuV05cHIca+7I92H zMFmZXram0p8p90QwKK/JANZ+Uqr15gw78CRb7tojufi4M3d/YlQHjJ7ol2n X-Google-Smtp-Source: AGHT+IEoqk30lfxe6QliWd1IfNiWy6Tu4s0Z9+hC/l+jtWQ+O7+zNSbtoDM9OiziDlBB3tH6rF6XwA== X-Received: by 2002:a2e:a995:0:b0:2ee:4514:aa9a with SMTP id 38308e7fff4ca-2ee5e6cda08mr106951591fa.48.1720040720597; Wed, 03 Jul 2024 14:05:20 -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-4256b0971d2sm249676355e9.31.2024.07.03.14.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:05:18 -0700 (PDT) From: Javier Carrasco Date: Wed, 03 Jul 2024 23:04:53 +0200 Subject: [PATCH 10/10] iio: pressure: bmp280: Constify struct regmap_bus Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240703-iio-cont-regmap_bus-v1-10-34754f355b65@gmail.com> References: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> In-Reply-To: <20240703-iio-cont-regmap_bus-v1-0-34754f355b65@gmail.com> To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Dan Robertson , Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Jagath Jog J , Linus Walleij Cc: linux-iio@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=1720040691; l=1549; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=0t8By2YYqQKqOLTidUf3/P6f28/CPTfyCx4winCDhm0=; b=L2tcuONK3hdbTjhGZNf1YTSvT3IaZs7IDIygCSmdfMYeVCbwO5CM+ANFzFoBb7Pus6wBVeakL 9CXm/bbEqpFDrFAKRU+nZl+u/wsxpJZ92qlVHv2fHbEB/Wdw9Skz6gx X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= `bmp280_regmap_bus` and `bmp380_regmap_bus` are conditionally assigned to `bmp_regmap_bus`, which is only used to pass the struct as a read-only member. Add the const modifier to the structs and the pointer to move the data to a read-only section. Signed-off-by: Javier Carrasco Tested-By: Vasileios Amoiridis --- drivers/iio/pressure/bmp280-spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index 62b4e58104cf..fee266d4e055 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -64,14 +64,14 @@ static int bmp380_regmap_spi_read(void *context, const void *reg, return 0; } -static struct regmap_bus bmp280_regmap_bus = { +static const struct regmap_bus bmp280_regmap_bus = { .write = bmp280_regmap_spi_write, .read = bmp280_regmap_spi_read, .reg_format_endian_default = REGMAP_ENDIAN_BIG, .val_format_endian_default = REGMAP_ENDIAN_BIG, }; -static struct regmap_bus bmp380_regmap_bus = { +static const struct regmap_bus bmp380_regmap_bus = { .write = bmp280_regmap_spi_write, .read = bmp380_regmap_spi_read, .read_flag_mask = BIT(7), @@ -83,7 +83,7 @@ static int bmp280_spi_probe(struct spi_device *spi) { const struct spi_device_id *id = spi_get_device_id(spi); const struct bmp280_chip_info *chip_info; - struct regmap_bus *bmp_regmap_bus; + struct regmap_bus const *bmp_regmap_bus; struct regmap *regmap; int ret;