Message ID | 20240204-bus_cleanup-nvmem-v1-1-21775783d1d2@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp518356dyb; Sun, 4 Feb 2024 12:22:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4Xu4W+97onYMrPtDgkvJ7PQU1pCzUOv1J9q9Ws+PGS07syxrXE1FHyHJUu4oV1/LNLx3n X-Received: by 2002:ae9:f808:0:b0:783:fa44:b578 with SMTP id x8-20020ae9f808000000b00783fa44b578mr12192931qkh.34.1707078163060; Sun, 04 Feb 2024 12:22:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707078163; cv=pass; d=google.com; s=arc-20160816; b=F6F3A7zlAAUsjl4iSUsPqleYH1k58rcdkJvhR8tUlvnRjmtrIIzd5yVlT2LHOUSvJC WZK/5bjup9ovTm3JCZ7JCCav951Zty6XWIyho/4PpyxePXL6QivBc9CYgRNTJ4FaUNHT 1+QjKpHQ3HAlPmSn0iSO0LHURT2kZemSsV+GtUM/EYqTW3BVArsLsFIYOXBBG5gBMvdF eBvr42DVff3RGqmOadXUdN4KvPFpX1wDumMjhBf1ra6v0qAtDxFzQIfz71QO6AGw1siR lPyAeO0VLJJM9dsV3KqMIrnb6DDOdnprHW+PxIk4lfRGZ5NxQ8YedKRIXL/dzclX2e21 LNSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :dkim-signature:from; bh=f9C3N67ToSHDZfAuF/i9tcOkChXWkO5qsLRtj9jLQOo=; fh=F7r4jrKj3zPKxm91oSHGo7gGbqK1neWQVlBL0FKv6ew=; b=zNWo2c7u8TCkdctKXgyherJWjAeMKU3iekEMn9h1n3JzqV4YYoAy1CuLzb0BcU55WF ddydwMHow9DpwNEldL8gtnfpd3od0Io4RRlRFKa2XC1c8HMrZoD4n9m9YLeJX5xtEwM4 Vp92Q0pYCjjNiQuHN3kVuhjyh9gfwJAeaBSg3PeB7ATuVi0+5otPG/7Q7m3ehW+fCMsD R/8/xkpajzN901aDob06975iIeaOvKz+4NNVj338/KpINvXM5ttnyQhK5+HSQOkGiH/Z 5ThBW0Edr25ROyxGuofAsBBkQiIqIAopX08NZ3TCSsnh667wviURx1gKRKiqpUXbpycU kjMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=bfChfQ5z; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVqcILyV+RU1pjkYL3horCxj4r6dWND7pLBl5yO1JQ+wtrOMpXf4IPVVddiJdCnPy7YefwiUOIN9u9yydDAMf7oosqVtw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m24-20020a05620a215800b007855e7a701asi5210222qkm.418.2024.02.04.12.22.42 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 12:22:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=bfChfQ5z; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51875-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C7CCB1C20FDB for <ouuuleilei@gmail.com>; Sun, 4 Feb 2024 20:22:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57BB8286A6; Sun, 4 Feb 2024 20:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="bfChfQ5z" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 1D4382555D for <linux-kernel@vger.kernel.org>; Sun, 4 Feb 2024 20:22:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707078145; cv=none; b=YSibqBnzkaJvj6LxfZAunJBCJFm6ZRkVe5aFAldJjsa19sZkmrcU9yjRrrH5io03cYXCmIghZD1hmdfv8C8Kto1jfBRo4bs/QxTNB/l81DzjwmZFF2PW7rttXxtHZe62+0ez/GNVks/KkoD1tHhXFMkerQD5NK3AXHYTpsCIcKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707078145; c=relaxed/simple; bh=pbja1kS4RfuggV1C3llqAFdUk2mI4pujWIFIfEBHCJA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=YVH29lzus36OHN6OuFJQtvYHpRtnCPBIUnSpcmYgp/jnkqNj1oW6D58ZOExwmN4hdehsz+6aNwyaGH3aCp71Li5/Q+eNXloZWZFPqUYr1Cj1SXD069mh/P6k3EGEMRs/5T4QNjSa2uBudb1pYKRiYbc70+7CrbHs0WthoiN0heU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=bfChfQ5z reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1d934c8f8f7so30717955ad.2 for <linux-kernel@vger.kernel.org>; Sun, 04 Feb 2024 12:22:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707078143; x=1707682943; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:dkim-signature:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f9C3N67ToSHDZfAuF/i9tcOkChXWkO5qsLRtj9jLQOo=; b=ZjIHukTHn1RKHeTe0Jckh7dqKxXRNEsWdoz9NV2SJc+Of7JYv5pjtwMo+j4oaqk0Wz ll/3JO3In1opV+lxXVasg0PG0vtzYkrYje4iZpnIFA3PFsi8ibMwSlzU1fBCxL3hZbcA TmUq3g0PIrEjMTLgHLS4HJLWrl/h7a4wDXuttGA849UemdBlTQYBsJCL5EtWvD9oc6pa IiZ1kzFP4SDEeVxzAmmlzkiE8S2XzI2Vs5SDwxN2PWNTF5kboT+LSNgoxeQ5AJivdA57 LAYtExac851c34qk3vatqHHYEu6iaFlvLh98tw57pDK2R5D2JmEqwbv+g/ODze5eQIjK NHcg== X-Gm-Message-State: AOJu0YxI3sglAatVN15sB0io4x3Q0J3tj6Zbz4KE13OYqbIouez75osV hO0gDQGHOGMltTn0PMSvbeQrwcwzLqSHU8Dea9Bnsko7DSWhwNgg X-Received: by 2002:a17:902:a3c5:b0:1d9:586d:5d81 with SMTP id q5-20020a170902a3c500b001d9586d5d81mr8642056plb.47.1707078143440; Sun, 04 Feb 2024 12:22:23 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUsVegiu8eWCzCREFl9hyigb38rVNWkL8pc3HUH/H+yZLcTYpXkDi3mqzJT8ht0IZxEPnuhtjGE0QRctsjWelUjn+akqFK1DHKmSg== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id q66-20020a17090a17c800b002960e397891sm4880832pja.1.2024.02.04.12.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 12:22:22 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707078141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f9C3N67ToSHDZfAuF/i9tcOkChXWkO5qsLRtj9jLQOo=; b=bfChfQ5zl/nJ/vWNlU4t8+mydi0dMpT+fC7P3hlyQZkPAO2dk+Q9jSG80nBi3U6duIQBRM I1ZjOx8mBEtbg4dLi3EKXv/zZ6y9/TXeLTEVLiI30yDf+SSPi8QyHCx1w/MOu7ezalCq+p uWHtnSa2JqJWhS9rgkuFiNhRrOwt0tdxSVuMkxslEIOQ1xNY2nD4V9KJ3hCQuxo0r9VHgZ 8cYnwMyMWMVDdetzWidC0pVTq21Pe7Uw0qBg/14UuZfuQxXGC1ainQAYJJfI/jXt+e81XD k/NGUg3MmXvtSEESCmzXDGRP1b/bftjWfc5V5UbWcH+WpwnWW9gXI+bDbwXmnw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 17:22:51 -0300 Subject: [PATCH] nvmem: core: make nvmem_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240204-bus_cleanup-nvmem-v1-1-21775783d1d2@marliere.net> X-B4-Tracking: v=1; b=H4sIABryv2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIwMT3aTS4vjknNTEvNIC3byy3NRc3UTTFAtjY3NTQzOTJCWgvoKi1LT MCrCZ0bG1tQBtqVa1YwAAAA== To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=1048; i=ricardo@marliere.net; h=from:subject:message-id; bh=pbja1kS4RfuggV1C3llqAFdUk2mI4pujWIFIfEBHCJA=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv/Ica6EdA1fur4KJGsHqpEVogekSL6926k5O+ izKDhG4TbqJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb/yHAAKCRDJC4p8Y4ZY ptt8D/9V/oWkdzKysfSHeliD2yG+bAEJv87oT7xraj2RzrxfB/k4SUBHLEt9lFJWxc0dBilE9oa U67m2Vx/3e3VcLi8o4zXiFtUKTRkaERn8wzXue6Fv35+F6VXbKCnMBLFXiSRYO/TgC4CVU4qjbU DiWOXdDjWJvcUETid9CPjfFtcl+wzA7zDZHcnffJDGVIPFqxI9h/9GowCF+tkjAdYG/4EJqH7dx mZdUEjZkYyMFje9WFbqY/jVm217OX7WsbyK6z32qXO1vRqsvtu1AdYKaULJTINYCAB309Ml5TVD KO/aplI5tlG7m+TNO6u/TTSRvwxJPfFfF7j/I9v/9h6Rq9+hGf43HPZqBl+NW8KVeMI9PkPb+fU GNOdWm7AM9FFuU/ch5mBY5dMI6ayPelJMUmqumKbC1smLgMpO1mSvNI+hFi1/bZRTGVmz8s0/RZ 9vEokR7fUpmwOySbmtueZXLTxe3Vky2eDjUzVyi3tnrzXSZcn3MOS3Wn3FcIG+d2+Wr5Lh9pSx4 WMgjyOcNmJzmSOHMfKFIn/+CWtsDpzCQ2RKuxX44qOL/LUVZv3mZiLOE4rEM187auVTBXlS29RX E9b4JdifNxQLPz5zF4R0GSTfVix2DFaIe69sBdJSWAi3Eq+Bb65QQhRFuPysXoHUpQMFWeA3+dJ byBGTfAuPtqrc+g== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790001191926874148 X-GMAIL-MSGID: 1790001191926874148 |
Series |
nvmem: core: make nvmem_bus_type const
|
|
Commit Message
Ricardo B. Marliere
Feb. 4, 2024, 8:22 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
move the nvmem_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/nvmem/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: a0cfd5e997824d0bd8c7620d40cdb324121a2fc7
change-id: 20240204-bus_cleanup-nvmem-a5d83375164b
Best regards,
Comments
On Sun, Feb 04, 2024 at 05:22:51PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the nvmem_bus_type variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index eb357ac2e54a..5236f11d4700 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -517,7 +517,7 @@ static const struct device_type nvmem_provider_type = { .release = nvmem_release, }; -static struct bus_type nvmem_bus_type = { +static const struct bus_type nvmem_bus_type = { .name = "nvmem", };