From patchwork Tue Feb 13 14:41:25 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: 200455 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp581469dyb; Tue, 13 Feb 2024 06:41:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUGvnFCjRX6dQQ8RSSg8oUpq6RnJk7jwZB4ZjhDUAW6zIRMIGGZyTTaLoptE2FbdciGKrXzrA8WqQ/neeq3BgGja++jA== X-Google-Smtp-Source: AGHT+IE6ZDzExOUTbhMp9oeuVCi3TyUNCZ7QaVBRoE8H4myeGBH5yOvtJJc5T6RXaPXwyy9C3v1z X-Received: by 2002:a17:902:d505:b0:1db:4c96:b578 with SMTP id b5-20020a170902d50500b001db4c96b578mr612904plg.59.1707835270787; Tue, 13 Feb 2024 06:41:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707835270; cv=pass; d=google.com; s=arc-20160816; b=qNebmD0bhkjhABzq8g1/kwxbmCnmQpXKfkht4yBmh38tHCaZhQNB1ZCAyb0lSd2/Rt tLKscw1biT7v1mEyZyOl6h/Ndl+S+10lqLeuN/UCNFnJRaAmJ17ogXmUQO6NjVSi82oe UdFHSHRbzSUdaUsO0ibTnq0db6Y4qonlsv41dIzJMaJIz1OZpLNMsNOmCbF0ZkCt3JN3 mC+XfeopaHV6GqOmGqhvBMgcJRVllYihnDXwX4T+ZfmWV9sUkxXcJ8JNVWbH8qeoiUrt ACK5OFCvlEWsUFxNJ2T1gnKzjRyO5i7VGNpxNSLdAzinnn9WDMZX0Dlg0RCA+BUU2/wP O+ZQ== 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=jGhFLWDt9P653uYYjvnNppxSBgBEq+mV75IitCasdPI=; fh=6OUsF7E+qRgweSO2oHEeEfrFWahUYTtlVMT8m8OE+b8=; b=NjRe1tNiUULIGbutxkFqcmoCEuaVspNkYRDk03+QKKZJH16HG/0i1HJ+cv5s3KxSgv 3PhwbzmpK2/X6wRtETXYzMYEkp6Qbb99vTpOKIW8VU6NWSBrniK17nEhv7/Y1vn7d/L7 UJIvt9mwib6/6XkFYRBRTKtb6ljEv7sn8XRbU91/8rhuT6jcgRNBezl5atTtTRGVZVTR ziOGmn6YLBr8oCBawu7f4LAYq1pO1fVB5QXO9U06H6dvfT/CfoF4UaLEz8wTenu8fVPx 07TfHZpS8s8dneCzfkTIzeRXtZbSQqXulglfFy5k5Xim/unVP1M7jf7YmmdenduNJFWJ f24w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=o4iwT3yz; 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-63694-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63694-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCVZ0hwh42QfLInuXrBrOgPLdj9/7QHIwKuDvx4fBWJDC/KikI0aAplJTyzSPeXBoEhPMgK9P6vP0WqKwBIsVIateYgCZw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 13-20020a170902c10d00b001d8a47ef51esi2052652pli.621.2024.02.13.06.41.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:41:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63694-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=o4iwT3yz; 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-63694-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63694-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 C6730286F93 for ; Tue, 13 Feb 2024 14:41:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3B4A5811A; Tue, 13 Feb 2024 14:40:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="o4iwT3yz" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 C45321DFD1 for ; Tue, 13 Feb 2024 14:40:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835252; cv=none; b=Jv02kBqZ8ZQLnFCPcNVu4bELwV2m0o/vIF3svbBiE6p6/xQoOjEKESRCIW5bJLj/lj+blMJrlIaDhE1Re2hx3H1THcK6E5tF0T7BM5I4yrBGVUOzAXp4rh20keU1dgagl9QCy2gEqAqcJ8RlfOzYIxWQH/VTJzdezRo74UiaMX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835252; c=relaxed/simple; bh=9wr1dY/KF1EMO7RfHDenVXuKa3LL028Ys5gjvGlxZg0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=e+aBuCgRbKmE+mYCsWq3st+VwBf7oYr/0UGwV50dWIf64DNF+9iCh5Fa1ELT4i3APr6CnK7zJeZirpvGouvKOf0wA1YaocIy07JItNVQV1jMRZC+mMDZoW7GlKIcvNmXmKSgtoqsCQUegUkUv+BkuM5kMdcKNcjyoqJuwPkHUvk= 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=o4iwT3yz; arc=none smtp.client-ip=209.85.214.173 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-f173.google.com with SMTP id d9443c01a7336-1d93edfa76dso35509565ad.1 for ; Tue, 13 Feb 2024 06:40:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707835250; x=1708440050; 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=jGhFLWDt9P653uYYjvnNppxSBgBEq+mV75IitCasdPI=; b=A/B9N4Sfrv6s85n4sZrf5Caq6t//5dMl9MLiDG939UkYbaqaaOaaruuRfyzbzxFh1C OWzvO1/hDDjBrxTl1Xypy8Rdfd9LcfCNvk5DTRdpsj+HwkVKnBpRI3iaUsSvlgqly/hQ rhD4X/5AarSUT58sDH1UObwrf1ULzz5O+Y/0B4EU3/MIP/yfmemqfzpWShcWa9rDY2dk /uQOwWaPBCddAa5wGCho83G5a1Jq5tgBjrjPGtqxKXwHoFxE/K/tGEX4+2W+JAWgAMaj 5eoV2qmsGaNdbWzL6N9YiQYdhLhlb/15d4L6Grl1tKl+vh29cknHCx1957hgITI/oneD dfsQ== X-Forwarded-Encrypted: i=1; AJvYcCUOgxXPcFT518CO8uysTLpzIKwswlXH8uDPW7YCzAX7STL2wklh6kS3b3A2WlJJ+QySCVhoTUgfL6pJeAKkJ8LY/QgzSzHt7ETExNN4 X-Gm-Message-State: AOJu0YypANqZruGEmxDkMk3ELe5Lb8LrfIFuGEKHuOUr9O0vMnFWS9k4 CghNoaaHzjIXLsjIwtX0tP0GOXNu9MkkejUL3ZzFkVGFibk2E+mnaYQeGrZGciPSWQ== X-Received: by 2002:a17:902:e88b:b0:1db:4f20:3ada with SMTP id w11-20020a170902e88b00b001db4f203adamr197322plg.49.1707835250132; Tue, 13 Feb 2024 06:40:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX/iQDkEygH1QiPaJNqM5Mh4Ch0FQ1C2CBoIYZfnHNEaB3gmkyqb4QOl7PWDuSWnGQVe/PNnmv7SWBq/HgQZZrG/QkPO02xqxvCkFF2CC/6W3vD4EatO5zaT/F8qxZX95PJOMZhsssfpQ== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id lg7-20020a170902fb8700b001da2f9c6e01sm2184362plb.136.2024.02.13.06.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:40:49 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707835248; 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=jGhFLWDt9P653uYYjvnNppxSBgBEq+mV75IitCasdPI=; b=o4iwT3yzbXd+mkE6O8JXRIR6hZypZ5x0Af8gQoXyk8CpM8h3c1QhafSWMhLW+05Jvd9FGU KL+r1ul8SFgcWyWxdUDwatHqF2C5TM2hCuiM98vJqeG+65670NsUeRVwJod4g5Equ3Qije 2GaqA46njbxtMqBZuAfc1xZOyp8VtmhgOhmox6IzXWy+s/DuyGtPGt6YLwyWvl9/Hwg1/l /2LLYpfq8Pmk1bFUmhbzJaDxqy7lgoFcU5WfciROJmLU7gf/aK6oA33SHJ3HGVVXL8aKtx RRuE1zfzQuGsozU9YSIdmrkKA1pZ0XKFwySJVE5bbIUnUbus+4i+86d/h/wUxA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Tue, 13 Feb 2024 11:41:25 -0300 Subject: [PATCH] zorro: make zorro_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: <20240213-bus_cleanup-zorro-v1-1-388ceed8e7bd@marliere.net> X-B4-Tracking: v=1; b=H4sIAJR/y2UC/x3MQQqAIBBA0avErBNyalFdJSIypxoIjZEiEu+et HyL/yMEEqYAfRFB6ObA3mXosoBln91Gim02YIVNhbpW5grTctDsrlO9XsSrDlvTGY22bizk7hR a+fmfw5jSBzfawDBjAAAA To: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1594; i=ricardo@marliere.net; h=from:subject:message-id; bh=9wr1dY/KF1EMO7RfHDenVXuKa3LL028Ys5gjvGlxZg0=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBly3+YZ+6itBtgGcn+ayT7cPIzI1TiuPy0D93qw weRl+tqvVCJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZct/mAAKCRDJC4p8Y4ZY pkoeD/9IAMZO1Vf9XjA42IyUi3c8QxczV+6rzkVQn9gAeKXXfOgAOgumyDNFL9cPF26/1d+WMHD mzPsQfzYxXJSCZbaX/2m7bIqPyG5SIKzU5ZIK/eVGEBAMFt1dL6LGw21LLAr20f+uqi6IxHmu1o n/pop2FrTnxSSTMDh+SpeAfwBRgkZyRkabt09pNu+3j9aUb15P+e/Omo2fFX7PLKYrZDlu4GNU6 hseq0IOJepl3PWj4iFY9jZ8cj0W3odlgek/dPG6uqHg1FwXFtEM9irUWcAVKrh/sNMbPbtyp7jX NDP8v1chhtvj7/qowqOXli+/rRV/GjrYjGpxRzAKDrjencVEuL+E50io055BbUR0V+RxYLq1Cu1 PbrxS2RGc9UA9kZXI+EmbH/7qWtjj8t+A6CKWoJzSK1yGgaDRONBwGPaSfTsC4zAwf+2zDxfJRi 1Wmkgt7sREOS/WWhxyjG8bbqiu/vvXBGQss8FMvKM6GAcwe6xM7ocvTgc8zm4/aLhePaV0ADtCV seCWQCVAdZkd18yXhjFl/vJjmpY6sxptmFrUvgvC0hsoVHitixcpW/CjomFWMd+RYc13SidhqL/ WdSkA+Xt7ALsFswiYzVX1bwC4nXmqf0LyyNYWayZQOVmpVVIXdP5UPwNMvPxgVQnfjbTTh+7lwq DJbHkcBXMuSdDhQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790795077121851704 X-GMAIL-MSGID: 1790795077121851704 Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the zorro_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 Reviewed-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman --- drivers/zorro/zorro-driver.c | 2 +- drivers/zorro/zorro.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: 6b9c045b0602cf64b33ea6da5e6aa6f81dd47ae8 change-id: 20240213-bus_cleanup-zorro-928b9b12d34d Best regards, diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 025edfccedcf..f49d19977e82 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -150,7 +150,7 @@ static int zorro_uevent(const struct device *dev, struct kobj_uevent_env *env) return 0; } -struct bus_type zorro_bus_type = { +const struct bus_type zorro_bus_type = { .name = "zorro", .dev_name = "zorro", .dev_groups = zorro_device_attribute_groups, diff --git a/drivers/zorro/zorro.h b/drivers/zorro/zorro.h index f84df9fb4c20..df44e35203fd 100644 --- a/drivers/zorro/zorro.h +++ b/drivers/zorro/zorro.h @@ -4,7 +4,7 @@ * Zorro bus */ -extern struct bus_type zorro_bus_type; +extern const struct bus_type zorro_bus_type; #ifdef CONFIG_ZORRO_NAMES