From patchwork Thu Feb 8 19:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 198766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp675142dyd; Thu, 8 Feb 2024 23:05:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEojer0GL8zV9B3o0hw6P7IvWsteo4gkkxqvOLx1M9DTCzBi3nZIUCF7ZhFXEOtsWS1OOfoRDv1Mxbe+QQgTu27Z5/BA== X-Google-Smtp-Source: AGHT+IE+13z/IUErHyCZS6n3gJWcWSYZw3IaRtdCzJFN+zT32sOdvZzZf8gVMMZTBpRtcBUGhSmZ X-Received: by 2002:a05:620a:1185:b0:785:b3b7:513e with SMTP id b5-20020a05620a118500b00785b3b7513emr200342qkk.9.1707462330026; Thu, 08 Feb 2024 23:05:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707462330; cv=pass; d=google.com; s=arc-20160816; b=blO3YZQQRu9itAjNyKMdq5xFbYGpRgFfqNpzJOy0BJgAnt/BgzgPytjxXGhkTvnGp+ rZBdq5PZn13O7txJddV6JcpBUCi0chCUcFxV1r5qDoJZfXpAJM2i2jc5tYL01wcNYD38 wrNBugp/6j+voQT0jrzsdHuXNayEJcmksEYz78a2sh0YbzBSofEtt+NOXTo7Gr44JxId /wcbpn5Ol6O6iEWhjFWC22R519dsfzVtjvBsTX4ymK9nKGUu+aBprM7MEBFCxDjSqRjR zZcsnJerHAWMjr6RyIE6p+eeAf1whWAjGzeLGNI/TTFvAQc8nVhwsz0RQplfdWMkNhS2 sGkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=dI9fDaEJQuGTRnVRo7wgbOa0EVSbvXtSt12dvCgGk9c=; fh=SsAG8mg6SU+kdhwyOERictcKccVgLTDA3Nj7yuWjUgM=; b=sG8+rQareauqrFDB7VdDo/SyDwWFeogQG3J3SKtNmRU+if8z5F4hWBpZZVf5GU2kmy sP+zDdqSfM271ejCGhHskejuaTE+Dg6ZrjGtuyE9pW3ebEa1TMtw8cTO5BTEKP7BYGCT BSjORP71c7U6Y7m6gDdDGTy5svjwyzk6xxeQRJRl5gh+EBQZo153/EFT37f33532EqD3 vE7TLetZU4iBWJ8hvD+xGDclyQZCkMB0tD/sFrZ37dPsa1D8BHKQ2o4Art7ClPV9ngGN 92713fDM5JyXxX4+oDgT2pIhusB8RB4YvVO6Bqbenr5lIN2pVUhMhCAQA3x3ZL8SwmQ+ fmhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=JLVSJwwq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-58609-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58609-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCWnmDaxvlj6HUWF6raEGvmIsfqO/FeR247fnMCRRjb5apGA4ybAjmizt+NNJTkQvQLiwKvmIn4MjBfM7D3ywpU+oROvaw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w12-20020a05620a444c00b007856eda4bf1si1516292qkp.591.2024.02.08.23.05.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 23:05:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58609-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=pass header.i=@marliere.net header.s=2024 header.b=JLVSJwwq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-58609-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58609-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 DDA431C2A522 for ; Thu, 8 Feb 2024 19:18:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06CD936B1C; Thu, 8 Feb 2024 19:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="JLVSJwwq" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.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 7D2C1374CC for ; Thu, 8 Feb 2024 19:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707419851; cv=none; b=n3ZK1CyOKWMzPXOh+KKtpZmd0HAylhchAjT30X/i/LK/aub15zhL0dl37By9oOgPy5imaLpoA8ErHvM4SLxnUSDSIDUpIr3o85XeTo23IL7upgCtHBqbA4zkWQTsht87O9uC34/WTCEMSyr3EU1zpknWhcjo4tIE+e8BMhD4TuU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707419851; c=relaxed/simple; bh=9yBfu5Otql54/j4Z3vAON4o4DHtlNUxLDTy8kePGRek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t7W7dBdCLX3DTFpR2BahJ/ACuKxL8eTUWEReJPTwj46ldzuU8TvJeMnVbnsiRIw159t9nk2bSdtemr09VRCAFBsocWyRDWCyM4zAISncmg3CBQFFjSL14J/BzRVISXpOh5UKKGzXY/xM8mR6A3hEkS50P5+cv1fScu/Xier1SA4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=JLVSJwwq; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5dc20645871so149781a12.1 for ; Thu, 08 Feb 2024 11:17:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707419850; x=1708024650; h=cc:to:in-reply-to:references: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=dI9fDaEJQuGTRnVRo7wgbOa0EVSbvXtSt12dvCgGk9c=; b=SAg3+ETt9JhgiB5l3rbsBRUBY2hhlICn0B9xG1AOdzLVyR8fY7LJu/e9/g+3uTCb5p /tKQpLkW64BfC27+9EQM0TfqpClyXdTnBJBnAeWTw4LExgMVCfAjmsy8ouePrXo6C3Po AbTjUtM8z7bJy8Eu5qW7grdf6ueoL8ORgT23FWzZLasBU3Lyn3tSeDHU9x9eU5KA1DD8 whxFTXj5OuZAmKrcVWzrTBqBfD6Gcpdav9HgFivp54/hzwSBhewbcVcmpzSPKSboyxlj 7WizF6NkcS/ajgR/Ls5EGELhgFKaLm8cHn+NIGiptoqdxapEErGS4p3NTcIF+V42+Hr3 +chQ== X-Forwarded-Encrypted: i=1; AJvYcCUwuFAI/30dtKeY5rm4vo69yCzcYntdK6XHOI5PT6Hw9tt7/v7DO1Lw3up3WJ2b5g0x1xfZj2uwX4FxgqgPhof1qEXKY9tVQXY49KBU X-Gm-Message-State: AOJu0YzpmHSDDWhkFgj+YAQ+jt6WZwrLGBtjtLPdMIlOtc9a9u0tPisA JV9bJBdEZvZdDDzQPP5EzdMErGqpWkDZWkw1ZEbNvEUleI6G2gtb X-Received: by 2002:a17:90a:cc12:b0:296:6931:e70c with SMTP id b18-20020a17090acc1200b002966931e70cmr763041pju.19.1707419849742; Thu, 08 Feb 2024 11:17:29 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWSlFdvGxf8XE04WQ3GvkbDY9VJSqihza1Cc4u4OTm1Mo8IPdGriirMewbMfdZQ3jXRtQ+c2LFF9hg5bk1MSzw18l+m0xWITsOUyEGauuPE2JrNEYbbPT59zwXz0hRT6MTjSC70Ia2NuoTANr+tAoX1TzRcTwM8Ru+Q3voemzMSHHqQIdempUMAohaAehrdnGd1o2KTDgwUH7m2Api15546A4NwM/H387+VfQFNaQnHmxZS29fIkD3u7dWOE03CuFB9FdrWPyLijxI1Y6N6PEAR1aWJ4w== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id c17-20020a17090a8d1100b00296cc94faf1sm134185pjo.2.2024.02.08.11.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 11:17:29 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707419847; 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: in-reply-to:in-reply-to:references:references; bh=dI9fDaEJQuGTRnVRo7wgbOa0EVSbvXtSt12dvCgGk9c=; b=JLVSJwwqTkOn8Fk0L+BP50YFTZWs0tyrQAy8UGEHQTKGxZ+LoDhplGVxzLgwhYs/I1wZgJ BTyN9U69MuOiGtaQmcPPQqjySmqLbyYm2l1a9s1tcNvRc+KnFELm2LU4UAB59JKsxx5XOh u96903nJGYQsmTtwg16Y9TXI2NvEdV43FuVOJQy6rID46tmiYLeI+6p9D393+AE5SpGX3D bUEvb4XEu1PyH9lGLI4Z9c9IcdiRBvoEN0uHG0Yoo9oedWglLEkfraiSvJUgUNr3l++T5a CE9NEwYur5cvdkn2RPqFUlV9CpHGSQpdVmCv6vZMqSzKdOzEFiVkqlZLTA7XJQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Thu, 08 Feb 2024 16:17:51 -0300 Subject: [PATCH 1/2] staging: vc04_services: vchiq_arm: make vchiq_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-bus_cleanup-staging2-v1-1-cfe906133a2c@marliere.net> References: <20240208-bus_cleanup-staging2-v1-0-cfe906133a2c@marliere.net> In-Reply-To: <20240208-bus_cleanup-staging2-v1-0-cfe906133a2c@marliere.net> To: Florian Fainelli , Broadcom internal kernel review list , Greg Kroah-Hartman Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1808; i=ricardo@marliere.net; h=from:subject:message-id; bh=9yBfu5Otql54/j4Z3vAON4o4DHtlNUxLDTy8kePGRek=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlxSjkTa7KtR2tQ3MbgN5W9IC5VndQZkPXGWUbV qes6xBk5aWJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcUo5AAKCRDJC4p8Y4ZY prhUD/wIqzg9iNUTQIsmx124h4XXKBkjC5HrDUDR3CzxwOLmkVrePgaT6oe9JDn40F6wy3jEg5T lw3kAMETmM2OWingznK7Ul5Y6zea2lFD4kmJKpWQwdiQul8x4AlAyFStWLQVipJyO3VUEQ+8W37 Rt30sb1Lp/KBqVQdE+JbgpmQS4sfWYceZSnrwUVBlLCso0JNLuk6Rkq/WaNrlW0gpapR38QpSGa OkJ891QRN8bonZnBm3kfxoX4tcYZvim/svfRBc/sqaoThwLOaTv2170AkF7aINe8thZPEpfwmnr CNxx1cnnk95WSqVLZZPS36c0igx4n7iwes1GI3snb+5uxZAFlWwgBJSXymy0o0gyqhxd6iSwPb4 usznoiYobmZvLwaDsg/PBhgbWNAxi7MqrXnOm+HixVwBikQhJ4fO5UfNgw67LfQJwCGa3IlL9mm REFeV8wMhi4nl6zA6nuGdY6IJVnec83dnbiRRhLHWu1biEuk7u9mUqtIpzR+ZkRpSVwC2F1iSdc 4kKFQV/D5zzJhCJ9DT/1JrzSdqrte/i7AdRjevtcaks74aBQwQQKzUDutbJ0IGKhCwfXHnRPlKn YZ76c5iJRpfsIKx0m9OOlAVv6BskEjti+Zrl7gzeeIZPn0PNHqYwYHuWYh9XgX+6RNs0iZoBbAg I5iyegEUNHU+Csg== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790404019995668743 X-GMAIL-MSGID: 1790404019995668743 Now that the driver core can properly handle constant struct bus_type, move the vchiq_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c index 933027e0011e..68f830d75531 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c @@ -37,7 +37,7 @@ static int vchiq_bus_probe(struct device *dev) return driver->probe(device); } -struct bus_type vchiq_bus_type = { +const struct bus_type vchiq_bus_type = { .name = "vchiq-bus", .match = vchiq_bus_type_match, .uevent = vchiq_bus_uevent, diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h index caa6fdf25bb1..4db86e76edbd 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h @@ -34,7 +34,7 @@ static inline struct vchiq_driver *to_vchiq_driver(struct device_driver *d) return container_of(d, struct vchiq_driver, driver); } -extern struct bus_type vchiq_bus_type; +extern const struct bus_type vchiq_bus_type; struct vchiq_device * vchiq_device_register(struct device *parent, const char *name); From patchwork Thu Feb 8 19:17:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 198761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp670769dyd; Thu, 8 Feb 2024 22:54:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUXszNlVz1f0GSfKR8j62GFucBr4MJVNMSESyg2f40AlsguRDLjggFPr7m5Y4J6GDCPu7g X-Received: by 2002:a05:6a00:1393:b0:6e0:2f77:76d9 with SMTP id t19-20020a056a00139300b006e02f7776d9mr966347pfg.6.1707461641146; Thu, 08 Feb 2024 22:54:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707461641; cv=pass; d=google.com; s=arc-20160816; b=A/JDr3nKriDrvwNBJqmhgEVr4iuFccwIWx7Z5ZJzEJWFOh1XHDHxa4YGt2Ioji1lEk YkewHXtKgg76/jup35p6f6cZr1tfKE6MaY2Y8i4WOTJ3lY42CTK7OtM7bZFURP2zpMHa nIA0RAClK2XdtaArJ/9YUaKXoE9Ifivd90NGVkhIpaqgZ6b29LyOJW/pHAsAC+On41NT v8VjrBgM4Mqfmcyx4LnSygPCtV/InwJCbyHcnDbCzAk/wdGLMrx5KHPxH+6iLAELFhkU JBWdEQplpDwH6lVZGNazmvvJaaGt2GIfKsmQz/EqicIJqRY/btoOW3OuxUZkXINdzvHV 5mww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=2AfkjHO+5UGjQnXgBOfvoxftlEt+F9BzDjDnKkgQKQs=; fh=fBPm+UAadh+wZedmPT/M1l1XX9IlNJasknLTZo4xtwA=; b=Iq7xRETI9mime5DQJJlx6XoRoHrRh62ryeB2Kx2EF0NZfyz8hz9QWemEcJRgd1WQHM 0O87K5Fq4VFrfzXwnQz4sak+hLXjaBULwaiKv7kHAeD0KYcXg+2aJBCfJTUNpuEoGYJo qODqU+xuzdbr3l4hDmuxicYTsD4H1bG50VLjgC/CL1BLJNltXFQpjLNyQWpHyAnAbd59 MaGrbSI4mnvlcex8SzLwm8wr/MAoMgw90YL0E7LF60IoBn07S/5fZ3bVH9r4S4jNOgT9 Vp6HcxZocHm2ibdX1t5UAAGWmZjf7VHD6pB2wqzrwh+J8yVYc5R+BnX+yCvTsG71SPLQ H1jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=AVD+mekh; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-58610-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58610-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCXcVGODbP8dRjBEUX9VzdJyi+ka/dVxPmc1sETloWT95Hi6DWaL52m199iRaBVgw9HdgPUwrfIvXwvljBBcMUdU2UEWZQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n30-20020a63721e000000b005cdfde5e3f3si1212457pgc.250.2024.02.08.22.54.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 22:54:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58610-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=AVD+mekh; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-58610-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58610-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D3B72948F8 for ; Thu, 8 Feb 2024 19:18:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73DEF3771E; Thu, 8 Feb 2024 19:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="AVD+mekh" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 3224236B1A for ; Thu, 8 Feb 2024 19:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707419855; cv=none; b=n9fWWs2FQWyKWA0mQJQp6hHJOIsNSLP7gsxkpPQ7LIBiXpImL2mAQoKgMp/5hmvcFYqy7uPkVI4Kx8VSFkXLVLLjZwv4fArRtM2M633f3v1Wbiwj0cmgqPe4p57RvmedoF8T6z9L/5Fnc6sWoOz98D5XNJSE3iZgd0CcSLbQUbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707419855; c=relaxed/simple; bh=EgddXSy2U90pa48Ft8cLZ+tPcIMQzwitVjdCWLCIqqU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kgJnasr/YbzpcDcm2ojV9rvly5YdkajGacO9fSgL+UJ0teu3ymof6ayWLtMQMm5j/+DMXdAEoRSM7+47xuR+m0Xn1CNpAxOyBPsHNgx5Op6U3XrCFNUZCGVpwf9V9qC2ezRzpEMiinoFvAv/WliFF+VeQKpMMyqcxbCptM268Uc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=AVD+mekh; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d71cb97937so1334725ad.3 for ; Thu, 08 Feb 2024 11:17:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707419853; x=1708024653; h=cc:to:in-reply-to:references: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=2AfkjHO+5UGjQnXgBOfvoxftlEt+F9BzDjDnKkgQKQs=; b=ckMqYuyN7Ug87429ERw6K2whkfQoP8qJCk3vnkX5q7xleq6o/GRN/oxpyNfwSZ3+Ar LV1wtCaLLs1FytJU7zRvO4zraq82Y4wH8f8fqWGbTfc9UK8AJ+1n+xwL4zNSkhYWFw79 2OrIxfhCVqWgcNMM5WET/RfuDIeMkco8olPUhdbJ4xrldUHzDujNS4MMbIxDfhm7NGbD +b17+/PIsBNC6AZbZVBj99Uyl5iRPFLRaZ8XgMrcR8pAvPX6+bNsmLKBf3qy50XT+SC9 A0lnBvAn92lJKGhr5Gqf/lPdPgOOkLGyxScGiJI8E3yt1sI3BsBAXjNbkBjBksUw5/hH fUqA== X-Gm-Message-State: AOJu0YzAdXohxqLsQ6tQX0lF+IoqKHI+k19Hg2rMUhOyidYlUXR7ycMO WezZP/wucAGgHjvrtrCrTeCX6+zDjSdLgOrx1tl9ib0ULP5Ic/6Mbmx3LlD+ZtDwFQ== X-Received: by 2002:a17:903:22cd:b0:1d8:f071:5067 with SMTP id y13-20020a17090322cd00b001d8f0715067mr133712plg.35.1707419853467; Thu, 08 Feb 2024 11:17:33 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXOZWiLIo6K269+RygjhRuSI2MGe55SK+rhuyJ4juph+nInGVJURVSJHgYqVZela8RATwykP3nlWeiZDWzItjGMibxBFkiI6in+mAwxUARskVrnCfBAhIN7AOxjftvFs7brQ3oEyKxp7Dca/ixjfZ/peaEVaKVdmBroLFp1czoDqbCEPaOf56PNN5AH0GBIy1Sxl31q8u4MDg8deWhxG3JHSw1VGzncMI4QouKQyx+qlJ8X25Ngvvc7OuUOUmh4mDBLtWWA9YDpY2RdYruKJe8ynPAoew== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id h3-20020a170902748300b001d9eef9892asm98949pll.174.2024.02.08.11.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 11:17:32 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707419851; 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: in-reply-to:in-reply-to:references:references; bh=2AfkjHO+5UGjQnXgBOfvoxftlEt+F9BzDjDnKkgQKQs=; b=AVD+mekhsUGcJz8N28x8m+etpCK5ptGysKjBNniHFjWQXpyyxrUGx0eewD666DQzgwkZmU EzOOQApSEjOLvvoPJ3rN1KhdUZHslqPjIaizpRXs0Jy4MFxJkXu7PqY+ZdI26MNkXF/yO2 89Ydrot5tkdNbY06ALetelZLDCLPo7osjEqpnlhGamVt7qE5WxPJ/n7e0zffWqi4dB/QBr yyAd1sItnXYzfUik4Ojc7epGmhCF9/JcDddDUCMEKuz5NKfCihyd37cOpAhl8MOL+lZvw/ LNLQr+Bu+iiUw86gJrFD2VSiq0ntieEVDS9ADAEXEo773afvPaBmVROu56qMNw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Thu, 08 Feb 2024 16:17:52 -0300 Subject: [PATCH 2/2] staging: vme: make vme_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-bus_cleanup-staging2-v1-2-cfe906133a2c@marliere.net> References: <20240208-bus_cleanup-staging2-v1-0-cfe906133a2c@marliere.net> In-Reply-To: <20240208-bus_cleanup-staging2-v1-0-cfe906133a2c@marliere.net> To: Florian Fainelli , Broadcom internal kernel review list , Greg Kroah-Hartman Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1365; i=ricardo@marliere.net; h=from:subject:message-id; bh=EgddXSy2U90pa48Ft8cLZ+tPcIMQzwitVjdCWLCIqqU=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlxSjld5E+tJ3o9Cy1rE0xxbu8u3IdcHmKSOgT6 xhC4thhL12JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcUo5QAKCRDJC4p8Y4ZY puQND/9CiQocN7N4v3fmR+TwOqn5QFDgjb0M+WwHi3mur8hOqEzwBaVQOZmmT9hmv6HSr4wD235 d9NICNZonmfvikeG1JBP5SMNns6WI7Pok7/jHgzZjQ8jKLdbckYJR0oYTgk20nyYYoDNegdyM2r TG2MOyQdywaYIFgfUd2drijRZxPYMN14fnjjvOu0aYsV2BxH0LFtJcYD72CmGZccA44P6E+cvLw bFMnO+fU+8UP5/hrNbH6OmJtGk1dsI9JxEQwO4sLvrQSZuNpK3ZcBzFKaiCCfdAFzC+F9v8lX0B wB373IEUD9mD3HviJcAQnaP9UrdoTwx/Gv091goaFsbnds9LN7E7AMmf0W+ZMHAUdAdpCBNSgOS +5FxmaxMoH9M0K8KDIzA9zsGo+DpFuCFmrqOMdl1HJoT2TcjophAZZaPEV/3GsHWJz5pciRfpcI DeRoM/DtzlAawy5QbJrUjKX1AP1cDo23kzfGvU6Zc1UT8iWKklHTK60jSwgrpyltobijmeeUR3l rSU/It6NhWRLapmFq2f3TPeCg/9xi4IJypPBzdRHi4duQe4hG24fQJsQOWfX6EypYkLNVr+Rgk7 9vwBnm5HwtG4XayhG+gtOblg2c4Q/8rQqwKzZK9z6CiehvW1lvReJvj5c3JIl1zr/HahWnW4Vxl k9oyM5hnc18L/YA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790403297572326847 X-GMAIL-MSGID: 1790403297572326847 Now that the driver core can properly handle constant struct bus_type, move the vme_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/staging/vme_user/vme.c | 2 +- drivers/staging/vme_user/vme.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c index e9461a7a7ab8..0cd370ab1008 100644 --- a/drivers/staging/vme_user/vme.c +++ b/drivers/staging/vme_user/vme.c @@ -1970,7 +1970,7 @@ static void vme_bus_remove(struct device *dev) driver->remove(vdev); } -struct bus_type vme_bus_type = { +const struct bus_type vme_bus_type = { .name = "vme", .match = vme_bus_match, .probe = vme_bus_probe, diff --git a/drivers/staging/vme_user/vme.h b/drivers/staging/vme_user/vme.h index 06504dccd5ff..26aa40f78a74 100644 --- a/drivers/staging/vme_user/vme.h +++ b/drivers/staging/vme_user/vme.h @@ -81,7 +81,7 @@ struct vme_resource { struct list_head *entry; }; -extern struct bus_type vme_bus_type; +extern const struct bus_type vme_bus_type; /* Number of VME interrupt vectors */ #define VME_NUM_STATUSID 256