From patchwork Sat Feb 3 18:39:00 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: 196349 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp34411dyb; Sat, 3 Feb 2024 10:39:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbwCdyBSaYXrq9VVRVqP9wea30hfvXdjCEcwN7g9t2FjkMDIbNxZ0dzrLHHbUAsF5nOsmu X-Received: by 2002:a05:620a:4081:b0:785:5e0d:3ec6 with SMTP id f1-20020a05620a408100b007855e0d3ec6mr5011017qko.73.1706985556621; Sat, 03 Feb 2024 10:39:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706985556; cv=pass; d=google.com; s=arc-20160816; b=lRE9uZ6+j4gbPCg+3Rp5BHKQxY7CAkFbh/FKMysigy1EJTpCUYwDYDpO9XqUB21HcQ A8N/PWfPw2qcIhg4TNgpDWqnEthngfTe1DxlcwADD/AJMXMxo/IYLcHhX2c1IIohcd8h Z7d03eznJlb8xqFMR+70L6BzluXzV/mNzW2Nh+SrV58V7dLHSIxd09GUe7udZjIQN8dE y1soX4NMKBs60uGpPUej3cCrjtAVCMZNLYwJ52QCPJtRHvFUrmnBduRdzSjzIZY7VKoW nRwtV+/pxofGV8GjcC7NrsJeG/vnxbLO1n9cW2Yb6NpUHZaAeKm9SmvCl/pJcNvNR3GY HZtA== 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=7Jzu0xNVcsNVUFtxM5faJFuror84fHuOgPvvmzuxijM=; fh=uDLmgZjIeLO3zan7049FHhTsvyiTLSd7/en0kjYP21k=; b=ONCOuTG+Kzxz/iuSABs0M5icHr9mYHuRS7jTGH9xvHnonENpIkiY1IJX2ZS8tpMmY6 O5NkzXecGIve3XRhkJm9vo//LKLeCuWPgId/tfhT1d4U8MmXEmEtQmM3h5/jASHgOxIz CYZXQ7THylwB1sxOu3UuRU9RcxjjcznyADtBE4FRPFutbzkvVKATj1BU9D5VdD7Qqo5e OFb3asYciVgTL+8Ah1YG+bJq80hWOvH6LLzzuL4S0w99AotkVDL72OlUKXshF16PkwcR W+ZACSqgUe4fQuGvz41w4coGUntHHMJjtCQcGXtdg6+lssLkAkx/angNbAfYCs1Kz+lw sgvg==; 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=Ce2E6P5N; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51242-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51242-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVUkeDbWZENFwdL7Q7oyylgSknQlbct+8HgSAPZ+itoR7JPzgJuwubQSztczwBaz5ra2j73ES869ye8vUOddnEbHhbh3w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q17-20020a05620a0c9100b00783f85cc518si4749364qki.355.2024.02.03.10.39.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:39:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51242-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=Ce2E6P5N; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51242-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51242-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 5757C1C21AE7 for ; Sat, 3 Feb 2024 18:39:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB2C75FF11; Sat, 3 Feb 2024 18:38:44 +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="Ce2E6P5N" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.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 5210A5FDA6; Sat, 3 Feb 2024 18:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985521; cv=none; b=XbA5Xt6O8B4WiETj2p0UesbNA5Bo/zgK+tg0C2ORiVW6cTDpIbPtE4skmhWvOxB3WIFZawUSyEcYGn7WRD/oW4VwUJ4aYVbmAqkiik1HxOVjTNT5EIihovl4HCN+1aLo7zK7FbBXxgBbkzm5WJMXS65pIN/E8SDcoilvwJnhWJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985521; c=relaxed/simple; bh=2inBWz21WgEBkLxfvELl9mMVwMw+EEpdVfSqZvNraWc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HgYCWBVYkoqrkwLyzbNCNAkTSHX5jDn6XG8pBMCB8mNlJQetS/81Bp+394IczAie9b20jhfqWs3UvaNRIM1i+LG8OmI589yvir5a4HBYQIAnNl/LVv0xr65cJVNS3zT7cbDa/Af3JZExh3aYvXptv8JYmYThnH3E2LBsrtAj3pM= 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=Ce2E6P5N reason="key not found in DNS"; arc=none smtp.client-ip=209.85.215.177 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-pg1-f177.google.com with SMTP id 41be03b00d2f7-5ce6b5e3c4eso2572265a12.2; Sat, 03 Feb 2024 10:38:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706985519; x=1707590319; 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=7Jzu0xNVcsNVUFtxM5faJFuror84fHuOgPvvmzuxijM=; b=myCHBy/HG2+8i3nF1SAJD9bfiDBjmoVlMAEYFTRWCVhRzYKrh453atT8feEle0HhbL kPeKEQTNHmoO5dzGEgVv61WZYekrk+M4H3O2JpElTf5ShRPCbKerovJ/t3dkanqd5pht UE/ZOL1/orr5EDHYWc2XxDWvtaqQB75iqgGvAhv7iMCU54iKPY8XCBgMfMtxDCpjR0AG plhFYdos1zBmyM0G/FHBBMOwQ+nvDgXZPqjBsrdTNv/zL5cnI2cf5gLvmklYug8o6pNf 40z+Fhm0KkqDMpYPvPamcoLjY8DJGldbpgP6EC7rattHkDDsORf3dVYWfTsR/Wlsff4B zf3A== X-Gm-Message-State: AOJu0Yyg9NDFR+kDPMsvbHlKGB8nw0nZRe+u2GU6LwkDjGQyo5A6dTha ZQL86xZkDffM31CgE6b29XbUGSHsWM9+9kU2B5HdxhDxkz7FX7JFP7MfUBItEdpRUw== X-Received: by 2002:a05:6a00:88b:b0:6dd:a072:867 with SMTP id q11-20020a056a00088b00b006dda0720867mr6839560pfj.15.1706985519480; Sat, 03 Feb 2024 10:38:39 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVL0VSKVhFreRfuUe/AJy+z1cB1ikPZfrYNrSmUAXRkG+kvvFH8E8p1xUTSvDBnZDbotQK5JWxuR6nIykm3B81pN7Kwn4ZSWKLsbiGDSS5DgUA56mhNVRgkHlX/pv0dVXCe0MlA2FCBFtkqfdpy0g1t6RjXV//QKEkIZg1COpalo6AGS49MrwGMflf2hQakrF7Gi6PQSs4MzAojjF33cgySnX4h5XQn/OBDuQ1GaJPpZdSrYehMRaDi+/sFQg1zvAYYDEVrtmT7ZPJQdJZWvGcudrsMklEzNVUy6/4MDAYel5wC6T5AYUWIbj+0WJuGG3RvBM2jwJ2V Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id u3-20020a62ed03000000b006dddd685bbesm3698261pfh.122.2024.02.03.10.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:38:39 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706985518; 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=7Jzu0xNVcsNVUFtxM5faJFuror84fHuOgPvvmzuxijM=; b=Ce2E6P5N6K45qd3vFzqIEdicH7gPzyubWFJL+XBeOlPKlX7/HC9AEWiJ5yYqhQaVARnZCG ULUmDPqISRlIW/pBXqFvsEORYq61s0l7G8YYFSGp0AQT/IR4v89MTQxHp2r4XoBfJ4hBLo qcttVfmLbsUt59W1l7N+Eai1XEf5XwbICtHaKrZmUJjlpjZcbY0mAJp6BBus1KfxClAEMO zKbV4wY7HYR0ydPY2rLT7IPhOYqzYhDaIhQXc7ESKioJQkU8Z8P9COl9JIpNO2nz9bypH6 SQ9fFWTQ/KCdoDu/LZbBcBSLmNpkWAaQSxUXpoSECOMjKYzlTNRMwCMecNab4g== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 15:39:00 -0300 Subject: [PATCH 1/3] scsi: fcoe: make fcoe_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: <20240203-bus_cleanup-scsi-v1-1-6f552fb24f71@marliere.net> References: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> In-Reply-To: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Lee Duncan , Chris Leech , Mike Christie Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, open-iscsi@googlegroups.com, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1251; i=ricardo@marliere.net; h=from:subject:message-id; bh=2inBWz21WgEBkLxfvELl9mMVwMw+EEpdVfSqZvNraWc=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvohGqYPyHio/Ic46fqTbCMPWxC6TR8Oktc6Eq Fd+HUp/LNyJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb6IRgAKCRDJC4p8Y4ZY ph72EACFBJHzA2UxLVnmRmp+FFnPGN5cYR/yA5X+e3RaHel2Du6qnNhQW7OOEZ99N1HJmHGWF1a kFXwrIFNJJArIwg5l8XllvwVIcamUL0KNjOHz59L6LbLi5F/HXOlMG3sxRrVJr+H4+JvyHX+RnH hggjRB8UVU50e0Y+NLgLTt3e0V7AR3FF34SS7mM4hFfRqMFhO2ihMXMNJClMET4T5bo0wtZlnsZ csRRHCCt1qpBSYMOa8sxjZX+Oa1LAD+75wxl6HTSiDQbrdJaUAYrEI/5l9lQGOOeiD0cZZLblpn GqI1W52GNCNwnEQJJKj5A41a9RLrYGuJ2/OWJsK5ttlmXWFbxTdzCjHeLq9VqE+ZmIZJTscpx+A I51/3SppthoMwzYUsjn90lK7soqMzZjfYAXW8xI3ez2KJgPwgByRwMxkLkb5RQpUWi1cKVLrMN9 Rga6J68N4MgBJzWinWlUJPYwQLpmyIF7z4lcLD4T+81b7UCNTzEOAObYHaQUnXAGzwnpiwZX6W4 E3ITSPMq0j65bzgOUjqjV9HHB7z588S4R7xanG6jwQiMp7CX0q8pqBoKsQM8D0NmjepGNL+NXhk w+OKCeKsXcjW02eR0+wkDjM3dWqYoI/z9dX4lMgSNotFQyDQaMNFuBJi5ZcuWE/fk3RqruEmtAx fdkQISBACRlwn3A== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789904086873272097 X-GMAIL-MSGID: 1789904086873272097 Now that the driver core can properly handle constant struct bus_type, move the fcoe_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/scsi/fcoe/fcoe_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index c64a085a7ee2..453665ac6020 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c @@ -597,7 +597,7 @@ static const struct attribute_group *fcoe_fcf_attr_groups[] = { NULL, }; -static struct bus_type fcoe_bus_type; +static const struct bus_type fcoe_bus_type; static int fcoe_bus_match(struct device *dev, struct device_driver *drv) @@ -664,7 +664,7 @@ static struct attribute *fcoe_bus_attrs[] = { }; ATTRIBUTE_GROUPS(fcoe_bus); -static struct bus_type fcoe_bus_type = { +static const struct bus_type fcoe_bus_type = { .name = "fcoe", .match = &fcoe_bus_match, .bus_groups = fcoe_bus_groups, From patchwork Sat Feb 3 18:39:01 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: 196350 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp34526dyb; Sat, 3 Feb 2024 10:39:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjFi1Kpe6LiG8Kd0LzjdPv4U8+B+VHgs7uGj96WsXztX/oHVWp+EfMF3dstkGC++uVmADU X-Received: by 2002:a05:6359:1505:b0:178:c4f4:4ae1 with SMTP id jt5-20020a056359150500b00178c4f44ae1mr9934639rwb.13.1706985575434; Sat, 03 Feb 2024 10:39:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706985575; cv=pass; d=google.com; s=arc-20160816; b=dKKDv6pZ+6MXUsgYNGiGONeMw4AlXXHAruZy8io4OsoXe2b+ONW2/B/2cPxGUcOvzv rqsRiLKiX/y1XVYLAJfOLnEuyW2Zlfgw3Hcb3aFiLaRD/ub96PrG/r5CJDpMHIMwO3Ki /72Ac3uI3bRi9FguTpVNwxlW5pYUZSK16Sg4JXJ5rsP2X+Kr0rBnWZibh3JJi0XDqOpA Voeb7QZtn8lHvqLOUu5QmS6bKYgngan549CP4I3G0xKmieRdxdpbqFSM55Z3SfIG0YYa zqgbu4hSVfAnS01lBd+vQvjmtEDXzWQ+nUbDarPT9ThUxL4MO2SPEEi+iYnmAgsXzGZz tA8Q== 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=kb77DxUXuA9JnTo+yla0GbkGq2BKsOKXHKXFf1Mh4gM=; fh=rojYrzeuTWRnOhux+lQ800AXKUafEXl3UqMRfZ3L1lw=; b=0UDa0NRxYdCD8s7X7YbtN56LrPpuez93QgB8gUcnhWoF1ayAwabLQP3F0rGLODIMKS yyFguv9JzrLQcV75C25t46JCd0WcivyOW1HwG3DoxFoy4n98c3AdmlQ1LO8FmC73l8rm Mm9x88TuFiT+YD7cLL+r0VHWGbegUV0dP6MULgA43xhsgFgX7A6g+m/XeKlVjiKxggEC unZ33/NpjOPkpEW0aoi8DE1sfFB20U6lV4k+/VxG7PK6kWTjbqaftR4UzXTpWytv5WR8 woBORgkrBlcUSiLW+PhtZ3dh6DARDBCBwEBvkyaHOd4QC2sL/wpNFYnW3HuzMBNQ5TVC aNDw==; 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=gOqyDLNn; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51243-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51243-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXx9auSPFBxcsds02F806OS9Fw9XSbt5iZLTVMTeGgGCcrOsIIx/zBX5Fvmy6aa/WiDIURbkCmaHmN49+f16eIn2CrveA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e10-20020ad4418a000000b0068c98586d2asi901534qvp.126.2024.02.03.10.39.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:39:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51243-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=gOqyDLNn; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51243-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51243-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 2C8C81C21788 for ; Sat, 3 Feb 2024 18:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0FE6604D4; Sat, 3 Feb 2024 18:38:47 +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="gOqyDLNn" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (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 6853B5FF06; Sat, 3 Feb 2024 18:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985524; cv=none; b=dU/yO2Nn2RxE7oGY2P5ox6lEYvFYd+gWTLLcmeoEYH4vnyRvFXuMhEWhAcPiRfAZ53Rs0B4Uha+5bFt7F31Vohggvtu5Jb7EnJK3CkFvIO1I9+OtLkXTq44T8tOLK/3EZTs6nkY5C6oQRVwPqFM9cu15W2Gsg+y1VEKGNDnrC1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985524; c=relaxed/simple; bh=NaQA4PF+6+PiQe73H9K2PkqG2deGzQRk37uWx5C77BM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VEkBzRO0hZeg1BACB1S3xYP48wBKUyru9VHWVYEExX6cmggN23p5VPxKHCy6yYShdab2OnOzLUzpITBDII39559ACZiYgKbRcr6Abk/xSV78kWSs2bjXGkGyU8eOwDI6/4s0yz2u7iyR+YQmTDS43FV19/1tHyDNfZXg0Yx4NsE= 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=gOqyDLNn reason="key not found in DNS"; arc=none smtp.client-ip=209.85.210.178 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-pf1-f178.google.com with SMTP id d2e1a72fcca58-6de2735151cso2236398b3a.1; Sat, 03 Feb 2024 10:38:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706985523; x=1707590323; 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=kb77DxUXuA9JnTo+yla0GbkGq2BKsOKXHKXFf1Mh4gM=; b=CtP+Nyx664jkGEG9fY6NGhhQEInd/U0gEHjOQ6wfFhEFTC9qKSdmLTp75KayxJpgQW Os3bUv0UMZ9VYjJ8UR4iyooH339OWirPJR8qNuGsfuojQM6WP2n71u0gNRFGGglkns1z c+5o3HP1LJuhSgKSVSSKNpCa4+lYYbD3D16mDA3evdz4loIhykCJOlRiqK1UMq29qqAt 00c+ZDmsDx7TfENba1JzeFAYiyJgTam/mXe38Gm/4b3fg8M6BM05Q+gXE6MCtrKzZYd7 yggK3+EgH61shUFXPpnvqP4xjpjHMVtFirVyYajPV3+OOIimrVcXWi8XshoDNjAvR8NO tZTA== X-Gm-Message-State: AOJu0YxWBYoQw2qsewOIhtP6nP2o86dP06F1/IMxRMsVrmLI73H5VJ+u SJfu4HxvxfSA87tlVkW/4jDzD0om5pmVEkRXQU4gMZdajjpefKim X-Received: by 2002:a05:6a00:2:b0:6dd:b12f:c394 with SMTP id h2-20020a056a00000200b006ddb12fc394mr7764822pfk.32.1706985522666; Sat, 03 Feb 2024 10:38:42 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVPl1jmE5g27ixp+ruWfznzA9zcthfckMCF+JkL4y70Gm8K2DqBwpc3nBCHybsMC4DP2ff35D2IVc8vdLLWt0z+idmGMKX1+UUPxEOw5xfGxokHMeZOvFw14pPQmAeraFXkwpH6VWtusJxGI4AiewS+VgAXEkeh4+6pjNUSjzuEvSSuXdeam9giSuxKgCfqjbAERVMHmrg0+hyj/YpLsqWv7Al30gfiPPtedG2r8dhpxvHIjha8pjO8sYU8LqpTQ9DL4offzOsjJHfsZQ1X/6VR/b9+d063mzFjYJ3rqAoSpVsr4dMEHJAKk7reYSsPBhjLDcR/kUWd Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id u27-20020a62d45b000000b006ddd31aae37sm3824945pfl.33.2024.02.03.10.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:38:42 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706985521; 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=kb77DxUXuA9JnTo+yla0GbkGq2BKsOKXHKXFf1Mh4gM=; b=gOqyDLNnby2H/hVSD4yByt0OxZESX2C9u8NPSFtPgXEFrdbFBe1eINHKBZvPxC0w8kqzhC hNm9y7ov9NKItvQYW7R9zPxeOsf0hQ63igRsnBHAaXDg0V4Q17BoYCMnjfjkvoDxYQol3P yEPMEfXW1N4MF+YX8oR8otvL09oGt8vA11KiN0qBCZSpIyM/R4giuX314oM5qBDB5Avwnu HALH3WH13HWRx15wVugAPIxJNi2RBuqfqVnHyg2FckNcpKe+/wcfM+hdm7dMvywz5P5+Vw liHVMNPzDVQv0I51sbJTv6IwOWuQ6AO6WUL2kkPSpKeko6xNun2/oqB/MxSdKA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 15:39:01 -0300 Subject: [PATCH 2/3] scsi: iscsi: make iscsi_flashnode_bus const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-bus_cleanup-scsi-v1-2-6f552fb24f71@marliere.net> References: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> In-Reply-To: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Lee Duncan , Chris Leech , Mike Christie Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, open-iscsi@googlegroups.com, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1369; i=ricardo@marliere.net; h=from:subject:message-id; bh=NaQA4PF+6+PiQe73H9K2PkqG2deGzQRk37uWx5C77BM=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvohGe1KvZqQmTsf6WEwjrz4nBYh0/P+G8QNhO ZaX47c7uMOJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb6IRgAKCRDJC4p8Y4ZY por/D/9unbq7kpwByLET0gU5ru1X/fAYul7pZGjEg27P/Jcp9qH0Bl4s8rtS40mlfTe9XRMOshn FIlv/VOYX13/xFZaBPTS39jr0P5dIZg3429bW6r+ElIsXlJKFReBliomBQrWuX6g2nroF6DRE0N f93uJ3P20jOFEDD16y7ckrwh3+S7TsdhbMFD/LaV5w0kcol394lZe6Ma4PRyR4YoC1yCyjx/dCZ icW7vbUQSqKR0kKWBQpjUSsgczU/QHPmIcppkJugpy/ulXOOtYI1i8AdLjj3FGoqCQfiohlcHPi iNFRtzPxSTjN+/kLd30G0VA7S1peo64tQOTqELVSRF94oMuusL0pmjECZodEktNRaoq9xHU0qbo OajQMFlyTsHEnMVHDdfYU48UZeGYmTYK8kJztJXrdMlbZgvlNr7q9PavKmOwQQtBa145H+2SY10 jTr01/LlKNYJSzjouXWMX6/2YZynV6I3+OrTXp+GYjT9S1ps65chT5SrDM1jyTtU2zxem06Sasz nH7By3ykuUdCXQi6ciOAO10zWUFVdZRJZ4jm6R18SqKf3OSfvNmbGOj3gyC2PXvOqGKVLRuQaO3 3g/qIfebOwNwwV8YJZ0y/qAAF8PeA4s8KqliUWjVnmeybE0SLDrEwRpuJZK86ZjpJhA8XNMQPT7 eA9kx5FeZoS+Bzw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789904106575875016 X-GMAIL-MSGID: 1789904106575875016 Now that the driver core can properly handle constant struct bus_type, move the iscsi_flashnode_bus 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: Lee Duncan --- drivers/scsi/scsi_transport_iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 3075b2ddf7a6..af3ac6346796 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -1201,7 +1201,7 @@ static const struct device_type iscsi_flashnode_conn_dev_type = { .release = iscsi_flashnode_conn_release, }; -static struct bus_type iscsi_flashnode_bus; +static const struct bus_type iscsi_flashnode_bus; int iscsi_flashnode_bus_match(struct device *dev, struct device_driver *drv) @@ -1212,7 +1212,7 @@ int iscsi_flashnode_bus_match(struct device *dev, } EXPORT_SYMBOL_GPL(iscsi_flashnode_bus_match); -static struct bus_type iscsi_flashnode_bus = { +static const struct bus_type iscsi_flashnode_bus = { .name = "iscsi_flashnode", .match = &iscsi_flashnode_bus_match, }; From patchwork Sat Feb 3 18:39:02 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: 196351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp34618dyb; Sat, 3 Feb 2024 10:39:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzuYTnaBtMtAn2u5Q4Jch08ir1O1pDternC150coCgqEMcAJxL6JZLo9zgKhCyytKvq6fA X-Received: by 2002:a2e:9ec5:0:b0:2d0:59cf:51b8 with SMTP id h5-20020a2e9ec5000000b002d059cf51b8mr8529325ljk.12.1706985595448; Sat, 03 Feb 2024 10:39:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706985595; cv=pass; d=google.com; s=arc-20160816; b=gDJ71VNtQKtixHyvhoWmEJiFTH6i2wlLt75xaXcV2l39gmV1pZw3umKWBbwuQflTxD oe/oVbW8e7yGsELX3e7XWMmKq69AdDpD7i/ksf2B8yxjf19AwedMeUi0xH2CtmxicEQm GCxBLwZ0SkBs3seWYz5p1gU3ggk4ZK+OZpyhDm2TrTKkBnO8UN0aLS9q64z3OqmrruFB WG/SibbHWR9mjDKqJjgYQ+ajURzlRNe1pzxJuap/Cq6KlW5+MWQUSulS9eUR76PkvsBk 3hidqYLGi8Sonor0A+By4IRfHscvItp66Qm5jonscK5VoFxifIlBnTgiyBGvsSxWyuwD bjUA== 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=W5eYTNML8rXP6bbP0gutaZdb5ydCkJPq19idDEW8PyI=; fh=jZLGb8erzHOz7EMYcLiWlhKSKze3epgDvrHpL5wWHng=; b=QETFAf/+SuTyuuv7iIiBr2H8OP63j+NNFfWG/IaVMrX90eek7qK9+vPrb5LT7sgq8a FmhnV+uxIcCTKPIUXrUk4uXpuaelClysfpfKJYM3dXptm/tjMml3jacXuVtaMVkU3IUG HbeTb7mY5LzG1a/qzhtMVhI43zE65D9OIT7ZfkoxwEMrogM7kMQgx6sdfENV3NqIfbK8 qkWTRQLEqM2AIOzeZwt0fktM2TVFRf+Rnyl/RUZN5XeJAYoWnYA7PdwrKsJ+G+FJn8la e6Xe+A19bV4Qbvaxq1iEE8SDv91P42iLIoGHxXfGVorId5GEc6AHg5UEAxBECN5nq1gL jaxA==; 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=bDAxb7TV; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51244-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWBGvifLvBhwWtoXvz1kfEDUTB+NipQIQkGJgSqB74mY6roFf+qUkiL/8KF43rRwe1nLG4Ctl/Jd5Ih3L7PwV1OByBj+g== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i26-20020a50871a000000b0056033dc53d0si285932edb.286.2024.02.03.10.39.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:39:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=bDAxb7TV; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51244-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D939E1F23116 for ; Sat, 3 Feb 2024 18:39:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F05A60DC3; Sat, 3 Feb 2024 18:38:51 +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="bDAxb7TV" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 DBBE860244; Sat, 3 Feb 2024 18:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985528; cv=none; b=I0BSzgjRusDtXM8F7ISjaZLHJu7EFRohmNH3a6ksmZC6/R9WVXXrooWf4ZjYRWp1AxFm0moQ4/rdTjMDGm6l4kqw/8OT72u95n/cxLWs4GnA6CBuojFE82ACW/HvI3B6goqoXYTTKxBxrygVzgxpm9YEi7n0Pd9VaTFiEhLIxC0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706985528; c=relaxed/simple; bh=bjdita3VtualiLH2Bvvv6BEMeZiNVZfO+Ctf4DIyT8M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fsLPSlpHEwArwN4H/fNb8StojY5A4ibIllsGkSQtcraAPhUnd8G1zz2mTltMWIvHwccEprIfXPYF+dKO1hSzcRyZRKkHaME81uwRPVqrRq/8PXfwwubx0j/AsvlnlPaaYmwXEmpS//++DwHDyslSQedFt05HN3S6hnL+qLP7sxs= 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=bDAxb7TV reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.176 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-pl1-f176.google.com with SMTP id d9443c01a7336-1d7881b1843so27582675ad.3; Sat, 03 Feb 2024 10:38:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706985526; x=1707590326; 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=W5eYTNML8rXP6bbP0gutaZdb5ydCkJPq19idDEW8PyI=; b=SySDwPoyUASBU/i4Vy9qBUwzPlxJXkj+F46e6+KoDJLUMUt+YJWjVfIOYDkauYsNWQ DacmSd9l6FZtgyruAsYUeZ52issRsqzWByHvD+GVsev7Li2J+iaUFsFj1ln7P6DZ0lF4 DerT7XCv97xk2Nsp2Ce4qrradLd2TldAy3hFkfG2++OHO29mOWCYEIWl+cwkdmrCloG9 L5rMNmmMy66GFWmnpgR6EwgNo2+vHX6i6iLWPopDW+SBMcTrgqeQKR7T2aVA8S5V8/hL nT/1hjfXLjsaSdE35dwEsSv/L/iSiAsrd9/RqkwphTI2KpUC4oFYZ13NgOtRex84VJig DvzA== X-Gm-Message-State: AOJu0YxBo1r7GUtBIED3C8lIaB6YTk0Thwuho4o46pdRUUj0xj5zILP2 0ESA9xZ9p8+a3kRqNtqNjb1Nd1TPfzWn8wC7GHzLIcT3TqGmkipq X-Received: by 2002:a17:902:6b46:b0:1d9:3bb5:2819 with SMTP id g6-20020a1709026b4600b001d93bb52819mr6278789plt.34.1706985526052; Sat, 03 Feb 2024 10:38:46 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVX/bOMqCMMuf6JvX38GJni5+jzBUqwDC6o+/8jQOpIATlEfhWmWv108M1iCie5lCcl19gwRGkY0+WjHxxsKgv42X/Ve865lKNqCP2I7zE8cWqraUnB4XMmBtvH11sG9a0Yky2r5OyYLyPuoHg7UbK9QUe+RAjlK5AoajW19Jr3teWSf13ZRtXbiXY+LgZ0RpPC6Wha5oZkGKxwsoR9lsjOMNJ/EODVye3Cn6B9K9GRvPk+ugmKfsLmVp2hIMy0+d42WY1BvFakR95ctGYjdyuZpD9gRn/oBSti/10I4BUMpYVCCAOFQ82LX0nNVzOXrj/3Txiw4yFq Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id j10-20020a170902f24a00b001d9834f2946sm2051315plc.46.2024.02.03.10.38.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 10:38:45 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706985524; 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=W5eYTNML8rXP6bbP0gutaZdb5ydCkJPq19idDEW8PyI=; b=bDAxb7TV7pMM/jjBqY7pETjaPeT20lh/5Ga7l6L/2CGR7KlfOwZ0F/2malGv60FMhxeDJX MJLOJykkR87C+kd7f0xiuNV4Bf9utd6D9WW8CEGOX7j2r5Oq9tjw0SFdra5OnCOYarLAnG 0+03QSr4ZAI3CrzyaDN/tG8KZpebMmcAaxMRpAuHyO1QE5uLPbYYUg1C5Df61dvM4Sfrx6 UkrEhfth/R6pnAQduW54IY+2AigBpZ3KBNmXyXkSFTxvmWLOkcUeuVl9708gmRzAHNQzHf sdOydxSWFp1vbQf1sYvtlUwSGoG7aeHOwwgM7fjZtfY0yH4mrDSgi5VAL4/O2Q== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 15:39:02 -0300 Subject: [PATCH 3/3] scsi: scsi_debug: make pseudo_lld_bus const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-bus_cleanup-scsi-v1-3-6f552fb24f71@marliere.net> References: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> In-Reply-To: <20240203-bus_cleanup-scsi-v1-0-6f552fb24f71@marliere.net> To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Lee Duncan , Chris Leech , Mike Christie Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, open-iscsi@googlegroups.com, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1319; i=ricardo@marliere.net; h=from:subject:message-id; bh=bjdita3VtualiLH2Bvvv6BEMeZiNVZfO+Ctf4DIyT8M=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvohHKD2KVdzbFHmqJSdjw5yECAKL6C8DdNRDx HjXE6vafgGJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb6IRwAKCRDJC4p8Y4ZY pn9vEACzDxkMsI/V0KNPQerNhX7GPPfeoliQdQtelH40OYV3j7WCVLhD3uPZLhkwwSiQeLFt8qA +qUPdMC7iwhld5oUs+bXXymMf5J4OSWsCCjGSDpZWe7osbu8vWyBfPJdxqsMX0NaKQMnKVyIfR7 1ja8pfPhqNhe9w2CnWRkFts4X94dgfu007syV1dgUKMfesq6l/dSpgPdWZaWt2bEZioDc8plAIj IhQUAO2jrksFJHHu3Vga0MnYN1CSdG1t3voZBSS7qpQ6DJxxIOk/FSpsu8sxAJzFQLzIXBjjFdK 9EF6Xa64AsT7D7MxEXm8u8Ar3+w2rXLAps5mNts7HDLj5/vmHA6jHGxFS/H64B3PCP3uD63QsbN liSIGixW+ucTqjAsq5/V0xEEIQCO4z7rbAY7mE/aMdG2q0BxBvPhQ4cHcSZxENFwS1GPQ5XjxfP lA2yvYejrZ6eKdsKl5fyuxsQnv3iSA6uRkuLINVBQp3+Y4PLG6WSV4AL0oB+Iu3BKPkc9VnmATD uEFGjRw9Baz+PyJYysslhgpWevszWbJDZibiZkoY0JzGVzPzwgDqpb6mqfeyCsQsLblwKZQompX /Nk2UyGeHOwNRPV8ruVWk2mnSkwzL1v/6/3nxakRxTP5XzoYDqgOSFk/8W86zh7bRYhnMERLO8a VibumcJrdgDqdAw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789904127715555183 X-GMAIL-MSGID: 1789904127715555183 Now that the driver core can properly handle constant struct bus_type, move the pseudo_lld_bus 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/scsi/scsi_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index d03d66f11493..914d9c12e741 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -899,7 +899,7 @@ static int poll_queues; /* iouring iopoll interface.*/ static char sdebug_proc_name[] = MY_NAME; static const char *my_name = MY_NAME; -static struct bus_type pseudo_lld_bus; +static const struct bus_type pseudo_lld_bus; static struct device_driver sdebug_driverfs_driver = { .name = sdebug_proc_name, @@ -8405,7 +8405,7 @@ static void sdebug_driver_remove(struct device *dev) scsi_host_put(sdbg_host->shost); } -static struct bus_type pseudo_lld_bus = { +static const struct bus_type pseudo_lld_bus = { .name = "pseudo", .probe = sdebug_driver_probe, .remove = sdebug_driver_remove,