From patchwork Sat Feb 10 15:19:44 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: 199372 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1804917dyd; Sat, 10 Feb 2024 23:01:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8VSxCgix/8AfozDkUbtMryXbtPOtLTpKxXgL3s+JU6p3gBAi0Oyv1TSUaEVfKzscrX8rY X-Received: by 2002:a17:90a:c708:b0:293:fc07:22c7 with SMTP id o8-20020a17090ac70800b00293fc0722c7mr2098982pjt.47.1707634866790; Sat, 10 Feb 2024 23:01:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707634866; cv=pass; d=google.com; s=arc-20160816; b=wA0/zl6XLZR/SAI/hmcyc+sVm64sdlxe79KcnVctVRY4RqlRYLcBfDuD7313dn/B6L BOq92y0Hy2mEKT63FC3mo1Wjn3hTHiQPvY3YzBb7+yApmHm/hwtFb+BSSBWUO61tJHEH gQbo1HWDkjhRewUTmC5BSraEhq4xoxVsQ4c/iD2ak0qU+a49uctSJhoYAu8frY/aVC0X iQKBrvvmKkIIt/NFcRuBCYxl1WQMtatXmo3qsKeKT/+m5J9By19oazXN0mstrbeVnuuZ Y4p2vOBGiJ3IlCaKrYUeu8N11D6nvLWjGA+rPPtA2oIbFys8yE4YCVfrKg/ivKT/AkLz OOPg== 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=UsUsCEyhzx03i2SgArN/xYYk30AXakYcMi5W1lGUnSs=; fh=PVwIxAZM+pXkORTlCHIL2k/zxNAP2EYEf0mO06S3prw=; b=DpUtCahGvkEJRBjjxHEo+LcPkgi07blyjIYqBnf1la0zs7oRvj8JEVDNoa9hCaXkGg 9O+pM0hfXViSiMfnGwjxoaQgvmqcJgMcjDhdsaYHuTimdenSZAApTRMpR4lTcHoNVxu8 BfSdW4nDusOsvkxg088NLEQcVYzeGOGf8M/I3oyaWV+kOQV3/Keb3SePyuDcz/jTa89b 4s8S8oFGt6lV7hxazSlkZ1cjNI1AkrL3WOiVaVrlRWDwMbkU2MrIx266ZiTk8ZEW1C9k nEpm5I54HZ0DcvvFX9Me55BHuL40r3DbHZbvUQ0pgakevFd85dMc/RMfsuFRyF+OOdrv eSMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=KVkQc3fn; 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-60436-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60436-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCX80P5oQyfFA8KaYC9xgBNydM/x5b45LdRZPDh9xquLyBrdeTSPJ1HMP6UyP3oV+SJE4UU+eZkz1V+jY/7dXEp8g3bmOw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m29-20020a637d5d000000b005dc6576d8adsi1711594pgn.386.2024.02.10.23.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 23:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60436-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=KVkQc3fn; 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-60436-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60436-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 1A4922847AF for ; Sat, 10 Feb 2024 15:19:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B3D85BAFA; Sat, 10 Feb 2024 15:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="KVkQc3fn" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.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 721C32B9C2 for ; Sat, 10 Feb 2024 15:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707578370; cv=none; b=RCbcmoa1/pS9rXeuA6azfa1pJiMRkFY4yhiV+5ImAO/n49cKFnnNEmLJBYL8evgFZD0hgNjp/ReNQMJ1Ng4Q80ivMCEbXDhSm39WSBYo9jKzJZea8tmre8fHeslbw+QlI1GuJQ2tpJ0cePtOTSvBALXWjAjAYBgvfCo6hQwWkIE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707578370; c=relaxed/simple; bh=k4ZPbdMBSpS74PR9EcxxOoA2GQUuClEk+6rG4wsBqpY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=GpVXXD/UGqnWH9QVOqTd62qvYIQhKddFthk7v1JPvMSPLJsVkUDnd4hB4TeBkpQWZjALBUmoBvT5gnEtO+I52+PFjzTv4P449RdPwbktaCqjlcJznZo3oTJd/Jbo5faKXzaBE7w8uWGRzKfrDi7Ymh4FMwBvXjXVygCQa1qJ1nk= 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=KVkQc3fn; arc=none smtp.client-ip=209.85.214.179 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-f179.google.com with SMTP id d9443c01a7336-1d746ce7d13so16381135ad.0 for ; Sat, 10 Feb 2024 07:19:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707578369; x=1708183169; 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=UsUsCEyhzx03i2SgArN/xYYk30AXakYcMi5W1lGUnSs=; b=rFaQ0GLqv5zkJgx+1/fTZ2OupjApowIWM+EkAw4QOb+Jf7B6txqssPX/1ScDggh9se LnTgWuV+KR89yRcqc6R+yowxdhtCSlelesEtt2v6pUHxvg+YzjFlOKViVj6deKRzCcXy k1/bAxS76sT/8KuiF+nZ/yH6UJZ9brXfnd93FwRagFs5B7cRVqWrUmLlAYrIsYsELZl6 BQFi0wkUe7K252pC6ZX3biFDSuYPyK2NbVP7W+szlV0jqSpkSZL8v6shJLaK8ewBfBQD c3O18k0U+ZEuvucx6zrOJ8AbzA3f+AiGyvcbbYGaGa3+TZ34QG+NAbmmVX5pqGLJ5uc1 b53g== X-Gm-Message-State: AOJu0YxJ5PjjeGkkG3vd4EVxKbSd/+LAu8Gjhb6C0XUZnMLr9qx7TYv0 guzgdV815stvm7d8xHy7AkdwK4dyL7FS1GhaiPMZUnFt/xk3DHA1dZqTkctRfHENjw== X-Received: by 2002:a17:902:d48b:b0:1d9:b5d8:854c with SMTP id c11-20020a170902d48b00b001d9b5d8854cmr2735292plg.58.1707578368784; Sat, 10 Feb 2024 07:19:28 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id km12-20020a17090327cc00b001d8ceaa1a5bsm3162339plb.304.2024.02.10.07.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 07:19:28 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707578367; 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=UsUsCEyhzx03i2SgArN/xYYk30AXakYcMi5W1lGUnSs=; b=KVkQc3fnpv/4UntLdU+ycqcqEIHp59ZGgnmHUJPimIPCGGJyqKVgQRaOwemVns8CsY+y55 hgc8kq5i3HAT2I1iZ6fl68woP8Nt/GQnJ1dyeaCa/HnsO7lFV3vzzTquXfaj67Tg6M+BTP 5kqWbiPXLL2062izL8wmXs00h9CLPkvpyxchkCwJgc4MIKJk92Wsyc7Ji/FtNef5ihIO+z mr4P3QfpKOt3uP7LOsoNOFIGTHjUEsjh8MWYQ0WvkYFlr1S6TgJHqQYzqQ8v98T3nNEUj6 yCR6PtgZM9I82F5ios/CMgrdy6cv93J+tFvRLDYO2USJ3gKarXU1EL25vrHpvg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 10 Feb 2024 12:19:44 -0300 Subject: [PATCH] EISA: make eisa_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: <20240210-bus_cleanup-eisa-v1-1-279725834456@marliere.net> X-B4-Tracking: v=1; b=H4sIAA+Ux2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDI0MD3aTS4vjknNTEvNIC3dTM4kTdVDNTA3Njw1QLs2RTJaC2gqLUtMw KsJHRsbW1AKNsQZFiAAAA To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1641; i=ricardo@marliere.net; h=from:subject:message-id; bh=k4ZPbdMBSpS74PR9EcxxOoA2GQUuClEk+6rG4wsBqpY=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlx5Qjc1v243sGwqJSvi4cOPbN+ueE3fNqxVbpY XlI+VFR+ciJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZceUIwAKCRDJC4p8Y4ZY phFnD/wLQU+oRDf6fXN21VBjbIQJzs7YIgBIYhl1igwkXVuK0W20xiReLT4ZzrGCPXWZU8KEJ3U COiiNTlW/IXCFzDc+kSKW4AsSzthMli/s9Y/cDGzbsICb5/5xMxPNTjx2utKWLG9h8xgOC0MZYM CnlnUFAPX1BuO+la4nsZJpd7rH4+wSvwB8DW2oLbHYzU/2bJBACqU6CPtcRYnoeMe+xJLRjNxdb zuOgPv67KF048YH5yA53gn4qZC3p9b5jM4+boDphOY8uvNWS7aVUuU2c17EjeWPeb911ft+/+Ra sSnDdf7IyVmJ34tUfSRbjUCUAEh6PhKTYbBFnw8WQrujOCN/J/Mn1Bjjj/haHbB1sNCJ4WeTpLC YtMfIfJKn+HQHLwYkO2wrreMfBA29tqG1LPzlxHQTdCL4bj6HuTWV366yH2TMObfqWvtR0Nn+xx nJQyEuM2gbOYxisx8Go/WcTVzGmTO5HUkRbYnqqpUhEeGG8FLpLfr75PoabQVtqITF4Du6Tuv7a Dsrrs8CpTvGhry9qfGrcWmBxUy1qRby/8xjh1ONN8ZxIAtMqPRY+7zicmLiOgTwuvJl8dahI8oC uUoU1eSm6zS3i5cpRZuya3nZP7iN4RDD6ay74QhkZ57qLKuwjBDwF1+H5jNCLtWn6ErLUBfofow XGcpnU43SEJuq6Q== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790584938207615393 X-GMAIL-MSGID: 1790584938207615393 Now that the driver core can properly handle constant struct bus_type, move the eisa_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 Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/eisa/eisa-bus.c | 2 +- include/linux/eisa.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: 047371968ffc470769f541d6933e262dc7085456 change-id: 20240210-bus_cleanup-eisa-e650731e86c5 Best regards, diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 33f0ba11c6ad..a7723536412a 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -135,7 +135,7 @@ static int eisa_bus_uevent(const struct device *dev, struct kobj_uevent_env *env return 0; } -struct bus_type eisa_bus_type = { +const struct bus_type eisa_bus_type = { .name = "eisa", .match = eisa_bus_match, .uevent = eisa_bus_uevent, diff --git a/include/linux/eisa.h b/include/linux/eisa.h index b012e30afebd..7277d450e092 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h @@ -65,7 +65,7 @@ struct eisa_driver { /* These external functions are only available when EISA support is enabled. */ #ifdef CONFIG_EISA -extern struct bus_type eisa_bus_type; +extern const struct bus_type eisa_bus_type; int eisa_driver_register (struct eisa_driver *edrv); void eisa_driver_unregister (struct eisa_driver *edrv);