From patchwork Tue Feb 13 14:48:45 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: 200844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1043128dyb; Tue, 13 Feb 2024 23:26:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWSi/sx0yDtxECR2moMwhpHODeWd+jFTogpjC9FG5wd1KN+o6J0wjLe111eBr+yED1W1mkiK0FUjr/ZskFrb7WRRZQGAQ== X-Google-Smtp-Source: AGHT+IFLlv6sagiLP30njZ6qFkqa7r2ig/vmWYPBRMaQWZ/UvkNOB0aS84dZvEVKNhFkr7N+rvmx X-Received: by 2002:a50:ee91:0:b0:561:9d6:aa6 with SMTP id f17-20020a50ee91000000b0056109d60aa6mr1164625edr.41.1707895585316; Tue, 13 Feb 2024 23:26:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707895585; cv=pass; d=google.com; s=arc-20160816; b=ztNkDc1Yoi35VEmEYQ7Do0yMqlhBVsSEsYpfa6DhnEOQKj+ik4jPPhy6httK1ypYH0 BD65bHzd/nwjpo96Da49tRYfu1qcNnIUAP+jEUIitQhrsVpkKSWK/VnuuLBjgrcuIGod 05LS65hB3lQqFQOJx3Yt/w9ACxsoZQXZB1TfSWnULZBkBkw1+4VpIVF0NnFr2ewjr4H8 7T9AYygBslCqsO+lPXTTNWwWgPmiGPuESDH2G8lXWjHoMZDhEeGKVT7Qjwr1pv5tH8f0 pOFdmsYw4tABYN5d3OZ8xwbH6Rd57otLKlm9oucRSntuVQH+68V+YKCMlSIaVMdyW6hv LJQQ== 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=UVD0TL5FjdYCE0fBI4VASK5HAhJZtTxASORBZv/qreY=; fh=XBWow28/Af2/oBTdwSbS+tTHBzBzoTDf+KZq45SEz3g=; b=ybx8f4j7FmD2LYlheio3xR+AYl1VGF078o0e0PcCoXy+3MnvLdILKLgTTbs20lcM9n M7ftwPtkboT8kyKG1h8pFfgIt4er3DFct4LAE2ydAS+h19Z3U9fYdpoXb3f6n8eBTfVX srIiD4Uc+SdH5QOAZPqGUfAewY3qjlrGf75ZPXYmSQniqFm5UDiaGYVgcipNsCib7kkR LEEIxC9eCNOBsT/qtdOUIQAQAl+p6FO1eufjFtNqiEpdud312TkXxKIAaY/uyocARVo6 z57QQWFsEX1T7IKrOpH/uDwUCK3mRK6ZgxJI0DAefLTLvC83Mgt0yCcgHqj21//6C03e b7Qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=oA9hkv2L; 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-63711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63711-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCWc4B5/R3sgOLY2HxxOAJyO3lZJa7ntR9vBZ35co2HFkKc+gK3wTjrNC4PRFE9bOOS/lqCpcf3GQRCsRqon67rfrhUHLA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e2-20020a056402088200b005612fcf85b1si4382602edy.540.2024.02.13.23.26.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 23:26:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=oA9hkv2L; 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-63711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63711-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9D4621F297E4 for ; Tue, 13 Feb 2024 14:48:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 695EB5B20F; Tue, 13 Feb 2024 14:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="oA9hkv2L" Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 6A1A722319 for ; Tue, 13 Feb 2024 14:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835692; cv=none; b=oh06xgLL2NR1na2/0EJIzM2TY4f8fumUL/HesSDlAHbe2lkSg6fk6+Kgui6RV+Afkn2mltg0RjBkBV6PpcfwWQ75hx8Q4N2OrkmY0XheazHnA/qQ5BSYksdDrfnpvxo/aNlB+FXQzX1FPOA/7K4pGCardCaKrHYlOE/LKXjPaj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835692; c=relaxed/simple; bh=BMmZXsY9H/lvyrF+pWUwVVNy50Ddcy1WXYEU8BYOimU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=btHYnS/mLH8YtaiulXlS832lTpmjehwy8ZSdvVPSSK+P1R3BKdQGPD41jzP7ZRo+ZatRRsaC7MY2OgkO5CZZq186WzUwFhF/Ws5G16TRiHbkbZSHsD2f7vLgU0Sru62WHEkQPyusR+AVXHLjs0pEmsPxvDMrN6hXckMAnOC4w8E= 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=oA9hkv2L; arc=none smtp.client-ip=209.85.210.174 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-pf1-f174.google.com with SMTP id d2e1a72fcca58-6e0f5934813so770199b3a.2 for ; Tue, 13 Feb 2024 06:48:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707835691; x=1708440491; 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=UVD0TL5FjdYCE0fBI4VASK5HAhJZtTxASORBZv/qreY=; b=BeFN21LDR7dp6Qb7/ul0Q9+VKzJqDkmDqBfo2J1odmViU6BCgIdbofGJQGA+Vf3DnA 3wKrgeRqwTRi+5enMEQ1Kpbq3jev+8Ow1miSZ6kYkUSZnBylmIb3QOoFDkM/nXpdxoSz a7sh0EyuSzKlj9pch6o1VCtoZnreFkZsCWxUOxVihnh6FE8L62mrhR7FdZjAG/+qlZBT hCnA74NdyudqnPbSV7Czm0sckOYzB6lMDrBlW5WaZWekwzFXmRGnixDsO9YwUIhiGYpj QVeQC5sq2vf/+EKRMaBUAmKGpKgog9Tf3iKt5I6Ik1vKXTekOlsYjSrbe+Nv8fDFtFLw tuJg== X-Gm-Message-State: AOJu0YzVeYFlgye4zr79YFbC/2XwEItwSbPZgrYRz0FT8X4iofGOvudt 8oKXaNAtq91+QCecgK9hzJdf+YOL6Epum6epskID7WeeG2KlTGri X-Received: by 2002:a05:6a21:150d:b0:1a0:5fd4:7987 with SMTP id nq13-20020a056a21150d00b001a05fd47987mr2294824pzb.29.1707835690753; Tue, 13 Feb 2024 06:48:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXLBNIOd86sXkDKDYZnXWN1qEWVSaeLwlDsTuy1cxAu+fYkWlb9dc1FEqRV3297pu9FwW7RG5vwZ6So37JwnycW+Ejtj2dhEZmOXA== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id ei8-20020a056a0080c800b006e0f438e9aesm2010654pfb.63.2024.02.13.06.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:48:09 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707835688; 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=UVD0TL5FjdYCE0fBI4VASK5HAhJZtTxASORBZv/qreY=; b=oA9hkv2LfmXaG6d7RkUAkqBLxdR81QppWXBaQJzeVDyjVsxcsCuvwbexKDquxborKby/It u6GsDbiMwvYHpa+gErCXgfwnWtIUT+g/Dn/w1bDsP1dEAIA0d5sTosTpHM0aLK2D+VR8g1 yL+bhFud19KEJTz/QcmV53J8/gMofNV7zrizUoadJThd06VL0jg706/7bKxb0youtMdbYo m+IWCJLmAR4lyb+8Fpggb3yHOkwEmyq4g5qEtTjwUkL1A3Q6GfQ8Wro8ZY0sf3qyaAbeV2 8/mAGvCv0SGILHRXmHJC5rEk/7777DjX/foiTi/hN63S2yPwWKOdfhuXZkNaeg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Tue, 13 Feb 2024 11:48:45 -0300 Subject: [PATCH] pcmcia: ds: make pcmcia_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-pcmcia-v1-1-97273c37e277@marliere.net> X-B4-Tracking: v=1; b=H4sIAEyBy2UC/x3MTQqAIBBA4avErBPUor+rRIRNUw2UiWIE0d2Tl t/ivQcCeaYAXfaAp4sDnzZB5RngZuxKgudk0FKXUqtCTDGMuJOx0QmHB7IRqJq6LVHW1VJACp2 nhe9/2g/v+wG0KQr2ZAAAAA== To: Dominik Brodowski Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1611; i=ricardo@marliere.net; h=from:subject:message-id; bh=BMmZXsY9H/lvyrF+pWUwVVNy50Ddcy1WXYEU8BYOimU=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBly4FQsSffny5hLZAhRfYsdrNJgWoZxkIM6cleO 8BNQ8bsKu6JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcuBUAAKCRDJC4p8Y4ZY pu5gEACa34R2eyM69Kw8vKORlS7qcSqbmvj2te2/ZQJdKlgzWVNgI55I3AjTIKEW30Xtdu1soIQ SyPLDHfE5sGW1t1QJnr3s1QlCMd9x3k8YYSeQ7UAS+KAH05WL3DbVbu9stTSErfT9uVkBHLLfTR Fr4w8bo0nzcSLz8rRhYID/oNXEOY9f/KUdIL+qLyjBAn7KAjhDTJSEC8ZG/M6ctjRDPN9N8fqZJ Ix87w+SrzgNNNXOds7Sq9p7DzvaJAwPlnD0DBeEmG0jkVWi6pG7mPvRXIS7pW7cfMrR/QiGZUHa Ouz/TtVSLo/gIHFmYXfjeVlvdr3jmZiRwINX6ArVM9sjhaZfMvZshnz1LygyHxkSqBprnIQvNID tvXG9co74d++JKrQ6fo6Y6yvzapBmc03rAzxYhPZiM9SC8bdMzGJ5jGSC/W3vsg0f4N5mBljN6C DZ/S5IxeYYg95IgDRKXOAnk8nySKkmprO5Zqb4o5dNnGkYepqqycZMDeUxVvfqc8+cqm9TOBayo FODIpt4QErS2jqUfDXuiIhbf6ZGvqk/FCfsr2QJ8z8sIN+gyGlHXvUd4T/jmDYKVjFSQEwPPb7i 0tKuw9Rw+TSMhf6D80ZNuNXgpaQ+l3KIc8/BX9kk5YjgXy/jy2Dw5xlQdmla+lFPFOpqq4e7CoL 6ujTzvU06AgSf+Q== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790807258988610003 X-GMAIL-MSGID: 1790858321250787289 Now that the driver core can properly handle constant struct bus_type, move the pcmcia_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/pcmcia/cs_internal.h | 2 +- drivers/pcmcia/ds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: 4f733de8b78a209501041a4b0a44c83ece0e8933 change-id: 20240213-bus_cleanup-pcmcia-c18794c076f3 Best regards, diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index 580369f3c0b0..999332bc4378 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h @@ -132,7 +132,7 @@ void pcmcia_put_socket(struct pcmcia_socket *skt); * Stuff internal to module "pcmcia". */ /* ds.c */ -extern struct bus_type pcmcia_bus_type; +extern const struct bus_type pcmcia_bus_type; struct pcmcia_device; diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index b4b8363d1de2..d3cfd353fb93 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -1406,7 +1406,7 @@ static const struct dev_pm_ops pcmcia_bus_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(pcmcia_dev_suspend, pcmcia_dev_resume) }; -struct bus_type pcmcia_bus_type = { +const struct bus_type pcmcia_bus_type = { .name = "pcmcia", .uevent = pcmcia_bus_uevent, .match = pcmcia_bus_match,