From patchwork Sun Feb 4 20:25: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: 196573 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp519242dyb; Sun, 4 Feb 2024 12:25:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2oqBJPtwV2fsMKdhPF/mrcHMbmzKdEFw5YQsGyD/WuAYgyCGj7SbeNeX9kh0SdadPQBvp X-Received: by 2002:a05:620a:a5c:b0:785:350f:7c1d with SMTP id j28-20020a05620a0a5c00b00785350f7c1dmr10426502qka.66.1707078340947; Sun, 04 Feb 2024 12:25:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707078340; cv=pass; d=google.com; s=arc-20160816; b=OikTRo5akh2dq1WiSP2tOrcVTefTDuN/P0pYXq1IJD9+JfRYjqHGjvGDMH0LifKKhL EMpGXg45iDWcH3Pu8qnXeGMqd1pOOCGyIvyBGOEbumOvTWVznt36t86qdfMEnYl2/4ye eX1g0ZtqjVJQNNHxbcPGrPaB9DlBsUdhFP+31E6bzrY7vwaW7Ey80c2FMUNSxxMmge0y RlxxGFQ81NQ5/hs4cQjqKT3DVWqerRod6Xc6PmWKSXA8JPr+FBTRsga9yEclegrx3iLy i4OOl7ZZ3I/wEd+pg1lduWJxvnkBop+HcKdcTCURXKLQvLDyYpqrq/ovc3jGermf2KPR kOxw== 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=8HVWp3c2p28iozrjDEr3UrWLraJ8M244Iggf4/P5uAM=; fh=HEZ+RnQKAqUhUciM1r6d5tLHSROVf56LL4kK2bFDvqQ=; b=jBOMa3FuMdC65y4nvT7AbE7Hv6iq2XaxPH1gmiZr1QvLq8qCx7vtmsUDG7Bt1QfaP6 PSkr9ntNZfe5GwT4gkvdQVOvybvad47bAPvUNUCnngh40mfKZQ2Indfbb4zShZogshmz xbzuk7cd7r9wjKg2pOIiupliemNMtyzVb3vVQNkH2RDAGGa6OSnGqkhoLCDdu63cE/fC GkbX1aN7mhzP9PbnQbL2PjrSuVfSxzpplW6Wno6FNdSENT+huSpKFZ1tU3J8H4UKT0e/ meseFtbYfrXXQTgHPV48UKeHgfEb08Gri+HkUETmCXPo1HFHRaiPVuTl1ZGEfIIawEBC lKJw==; 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=svtFoUML; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51876-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51876-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCX4J3xx68vAPf0tX5fQUUKRBgFMzPschCDsghlYEV3ocDRPJ4U6rqVmUXpvvH+O3dY5EIro8njnjGmpe98LMfGVxHdkkA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o15-20020ae9f50f000000b0078401633e31si6925135qkg.509.2024.02.04.12.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 12:25:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51876-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=svtFoUML; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51876-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51876-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 B87751C20CB6 for ; Sun, 4 Feb 2024 20:25:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1BC55286BD; Sun, 4 Feb 2024 20:25: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="svtFoUML" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 E36DA2555B for ; Sun, 4 Feb 2024 20:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707078325; cv=none; b=VCchTsH3U1WyeuWs/TCkyyiwQthshx9I2dPpHMdAAphg/28nN2A83OaNmWk0oNIygLZUKt4xldc6vvvsBVVCLPOyEv932ZUZYRl5umeDixCAfILYgYzj+nUIf2tRdNj+xjrBcz5qlLa3fPiXTWTztuQDg+RyjzBsog6y5+7Q2ys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707078325; c=relaxed/simple; bh=RYLbDWm0uaUPeD4FN0DDzn2bsu2FRM0y0X7bHo+IfIg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=jfc79OfZqvCfuKBVV1KRT7rOCvpxMRqehIXNzG8ONexs7wtSwRYm2K8iuYl6W0E9pJUKs9oSfaAY7OGz8xdRuc/KyR6uP8iimN0BatM59rxNA957d63jCdz2xUVHz8h3J4/CZWkleptwlnueFebNMzqZSAOqqag1vZXSAxyVsqE= 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=svtFoUML reason="key not found in DNS"; arc=none smtp.client-ip=209.85.216.50 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-pj1-f50.google.com with SMTP id 98e67ed59e1d1-296a02b7104so114952a91.2 for ; Sun, 04 Feb 2024 12:25:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707078323; x=1707683123; 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=8HVWp3c2p28iozrjDEr3UrWLraJ8M244Iggf4/P5uAM=; b=NIeQVoNGjhuLrPSkh0wrHmBrEsmsHaxORrDxBS/y8QUQh/sLgQKEfQxM/Q40wBZHmZ BPaStuO/7FwyqWJt0zI8dtsyhKqefbWcCcUzve3gg1g3qD6R3rFJ9+g6Fu+WzY++P/Qb ExnarxOYvugz7dV7HQ2FkkgcqILutUPh0/ru+7jwaW1O9CJAXOG0HCs3b1G/3yzK32Z+ cBGWR3R7wP2WTJ78hM9eRPnNsjCpDmyyawTxxNqr4SSGkeqcc6uLe2f367XQ3KQb2S87 NVhbsdEM7iS/haqP3H9+rfKMt4jb35rJFJF7tlfndioX/7rRvWY8GDP53prI+NfHfBi+ uGGA== X-Gm-Message-State: AOJu0YzCbwrHCqwspmSWEgM8/oE5+/kL029QVsMBo8ABapISfxhralvs YwznzEJ3RxFrart1oQxp2re/3ZL9LREkFMA99qGux7jRX61MqDz9XRe6/AlihNqyAw== X-Received: by 2002:a17:90b:224e:b0:296:a464:ee3b with SMTP id hk14-20020a17090b224e00b00296a464ee3bmr124003pjb.30.1707078323156; Sun, 04 Feb 2024 12:25:23 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUDodRHhpejXeE+59cCH4HZgYy7tn940QBj6YA+5KP3ypOGrukjhfOSbo5UxsBBx6q4faI/5TsbOr7QBqqwOfBLI6HM+ncBV2Ywrw== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id ga6-20020a17090b038600b0029659674bbesm3646965pjb.43.2024.02.04.12.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 12:25:22 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707078320; 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=8HVWp3c2p28iozrjDEr3UrWLraJ8M244Iggf4/P5uAM=; b=svtFoUMLYDCoDmhja19sdH5p+LM+Kudg5Nr3170s2Fpgf1ZmqBSj1vnGpdWXLWH6ck/5xe cgdxFXNHUFFMO/eQhnB+1dK2yqx9ISM+42gJ6X3H/CqXYm/wG9gRphFk6kyxI8MPpcdxq2 WV0TRZR2MDDH8+OUPCp+dmZS3Yb5fOGsmJPthLfqAFnMo36n5osolB6H8EClKuALrhGr+J RNKlUHJNOjaAYGPjvsNPiDQOENPd9BEYs+ouRUtSB0Ct/RYy15Tjjvr88T57jh9sDmX8Ws ctt3DAPeguWF2fSTZ3ENxF4X0i3v2z2qOeBsI7Dl1PLGQaJ71hGH3c1qlC+zKg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 17:25:51 -0300 Subject: [PATCH] parport: make parport_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: <20240204-bus_cleanup-parport-v1-1-e6a0f756bbb8@marliere.net> X-B4-Tracking: v=1; b=H4sIAM7yv2UC/x3MTQqAIBBA4avErBPUpL+rRITVVANhMmYE0d2Tl t/ivQcCMmGANnuA8aJAh0tQeQbTZt2KguZk0FIbqaURYwzDtKN10Qtv2R98CitViVWhmrlWkEr PuND9X7v+fT+wK2LmZQAAAA== To: Sudip Mukherjee Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1096; i=ricardo@marliere.net; h=from:subject:message-id; bh=RYLbDWm0uaUPeD4FN0DDzn2bsu2FRM0y0X7bHo+IfIg=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv/LPlkzIn6j0jm8HoHS3F+F8Yc7t8L+JSz1EH w/Z+UB+CX6JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb/yzwAKCRDJC4p8Y4ZY prZuEACqEqos6ELywPpfLbDliN6YeBDSBgRdZjw2JRZqymM0aYZLvg6Fc5MuB4YoFFOXTkFvt+a BqyyALNE260xpwEl0gPJVvDy6/PvW7IrzEaLa2fsLFMoUTG3/wtwwrY8P/e8zc1ALpZM3OIJJLS vJHGvgoeBlspANhbCLM60NUedWuXHwTN/BPNAm6p5IcHKHOlNWJF3WY/x0AKkJ91n2wrfQ+dAtr C2DG2FwIqLiU/BMlx7TjmuvRiUQucBU0AD1m1M3BKnsxMMD0WeQiU3gSO4TdYRA4TZN/fQD3Fv/ 1mFo9IzZ7mNCoJJFzKgHmYqJ4aPPgIE/uOdhMM+vpaisxkcYVvOSLqv/Cmt5PGz8LOmrHwNmsU6 o1TqeFdnBdNj/GGlGnJMw6AB9WoxA0aNjSync8Y+XBiBh/NOm0KAlQ5xyZMKmZEkbTuLWWi7IA7 oinj9/or12ulLi+kHNMCoIPq3gqu8EseEQVAmBc5htKYSCAzF2s/wnlzjJR9LuWBEbSVFbN2wex d8qLi9MUUjyO3Jrw8d+WcCbE5Fqyy61Qroqfz/REaiCb40kVs//dFYysElQOZhMB3EU1hwu9LiC zd1PB3aWXlaRtfOlZeIl8p2ctO+Ia1YhPndxdFgDc+1diGNtvXLKqWytSPbYxiM5FVxy6Sx4rgn OQLujiW09SuniPQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790001378247378160 X-GMAIL-MSGID: 1790001378247378160 Now that the driver core can properly handle constant struct bus_type, move the parport_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: Greg Kroah-Hartman --- drivers/parport/share.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7 change-id: 20240204-bus_cleanup-parport-a016e7319d81 Best regards, diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 49c74ded8a53..08dfa74be3c5 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -130,7 +130,7 @@ static int parport_probe(struct device *dev) return drv->probe(to_pardevice(dev)); } -static struct bus_type parport_bus_type = { +static const struct bus_type parport_bus_type = { .name = "parport", .probe = parport_probe, };