Message ID | 20240208-bus_cleanup-vfio-v1-1-ed5da3019949@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-58642-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp420282dyd; Thu, 8 Feb 2024 12:02:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1gAqSCj8+FP3R4rRB3ke3Cpp1g64/BrW3h7h2vElm5j7eRWXbWs3IFcwusuitTWQHxL+g X-Received: by 2002:aa7:d586:0:b0:561:2262:1bca with SMTP id r6-20020aa7d586000000b0056122621bcamr500664edq.10.1707422572510; Thu, 08 Feb 2024 12:02:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707422572; cv=pass; d=google.com; s=arc-20160816; b=b5te774JZm7avD4hoMOLU+wCF8J0zoIwHFZDYuZNDXA4fl1IGCDyv/88EbF5qFrby/ u60j1pxteTYaEpzm5wkJXuGgEZrXoHagq8LGbwMHIhpJ5QmMemqjPTCP/KcpmuhvPpfb H5H4AQfgzV8K1rxOOX+hByAtXmvsDhd8Eh1oi1dF9EjLeo49qhOoBq4VcKNE0ZnKKZU3 383WZa3WTBTvV0ae7NWwl1C4zi9OfN0OnlhJASO5I+ng70fvjFelIf7IT4goEafW9MjT aB1n1mwmyUH10zf8pUWuDehx4/DfRbXe2hSEZ06a4keldbfdMewchkiwlX8H2nSOWhIi 8I8w== 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=yEe9Wy1b0zH9GvqFkXuxdhjDPzE0yMoBbpTR7V7GZ+M=; fh=xpwhqiBbqegOEbKlYGuaIOsI2NUl+F34d9i+19aMvWM=; b=bO0vXXYDwc1Rj8OQuP5efNxWCBpFPCGmcWkv8HIhC44HRtTDMJ2IACycup3BerVINr NwbGvvo+v3KNDIE9IdPbvp6d0nt2Q9P/6Gq2y+1OAxogWRFQ0xPJw25EU5kk5Nd717OR ZVE6GKcMgqCutrHzA8wZZvG6A+EPJwNbBhU7o1roDxuIV+guc+sV8Dnvkl2T9hvhnytf 5GFmXf09UZT/q/NAbC8L+wr/mO88EzG9fxdUrOiOf/8Z9uzRXEjbc593OmOO5RjjyWCx nuBGLHDgm/vikl4n2mlnPWe3ZjUZCpm125gVpjR1RkrbSMpUjIdxUzBrWNdDdAR0J+m2 qu1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=Hkh51lOG; 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-58642-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58642-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCW72qwghR3cD1ZLg3Y1J2OZAygWkFrwfAsvaICqNL0ZFeNgJKEM+kcEcMm8VMtFIwcjS/Cdi7Ixu6BKBvoqAwdEvXDCZQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n24-20020a5099d8000000b005606d9efde6si62444edb.41.2024.02.08.12.02.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 12:02:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58642-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=pass header.i=@marliere.net header.s=2024 header.b=Hkh51lOG; 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-58642-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58642-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 64EA91F2A43A for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 20:02:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D056A38F83; Thu, 8 Feb 2024 20:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="Hkh51lOG" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.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 8F076381C5; Thu, 8 Feb 2024 20:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707422494; cv=none; b=oZjDvKp8FU7Z9iYJTxGeuiUzmNxsh3Y+hdkHfTG0oSluUULrp585sadl32xhNUkme5aV9KeMHwwgyU44g/3pA8jZhxLaIkTyfE7gpWj5WRXbtLPAKrpDIuDNtpvYtWRPlF+HnaYK3OknaJyT+29jIlxHNYe+qN0LYmAxJfj/o90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707422494; c=relaxed/simple; bh=P0NUudkhr32cG7/aid0oQ2TiIP175J8zDSv6y5I26BM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Ne03fWTQIoVz/152JQvhoGlwfUFDic+hdW/lG++cMYkrz7R3aMuaAb3HnOZRSllnPCAFb36OISNMJ5GOgs2bK1sjNb6KmiuznoHzgm25mEHRgTWyq36tB84vozoY4TGOJNwDLs3R7NoEUhzlWvJiB6nCV2FYLvCXMkTGy/qqt5c= 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=Hkh51lOG; arc=none smtp.client-ip=209.85.210.176 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-f176.google.com with SMTP id d2e1a72fcca58-6e065098635so167256b3a.3; Thu, 08 Feb 2024 12:01:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707422493; x=1708027293; 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=yEe9Wy1b0zH9GvqFkXuxdhjDPzE0yMoBbpTR7V7GZ+M=; b=kx6/QMVvTjLGOAMc1iHITR0snnHgjpbKmP5PB9JDkbfjyZPugecN546DX9Jdxsk2Jn pFJdSXKjL0P0YHDQLSQoy5RnUxlY+gG+jOY04zKbbTeoBp64bwgVF2cj2aCSgHOCWKt+ 1kESPQXX2GogEoEWcAz2wi7qInH5RH9zAFljDIidWfElv9lIaqmc/mbT7wWMyaUe3Rie RFwXG9w9pYFdWyx81SLJSUaELm0FZMZ5aeGlomLivcYgUdbtfF7lSz2GAeG2SSHBCr0s EMkR6YG4tHp+EVZPYNtcu5In3UuPZoFEgOfeJD86XxU1UyWOVoVrGhtwvNrLEZxpRwyq L5NQ== X-Gm-Message-State: AOJu0Yx87d8D+ZDnmcN6lP7+bZjNhZCkZVLKMY7l5G+4O7zt7m4vrHJ6 6YqjiHdZcfiY7lXgA6xgh/GbIYnPyEPAfleXJ0PpHuQyDSOSBNk1C4livddzCs/AXA== X-Received: by 2002:a62:d450:0:b0:6e0:527f:fe6e with SMTP id u16-20020a62d450000000b006e0527ffe6emr289512pfl.0.1707422492815; Thu, 08 Feb 2024 12:01:32 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXKpvKr+7nwxl7LHNfoIKyuuyHKjzm8XigDNZzmVwjCKI9BdAfGYdiKUnIl/2xW4GRU5LDbX8ysVf7O46knTYHIDAG7cDi6TyhTf2ra47C6dKkqVmaETuwdMcVWHWFkCtZTfg1ijRMDPH8yMSwNy9n8X2eqd1IQsHCEwBxIJyCqA7rF6ko= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id gx14-20020a056a001e0e00b006e03efbcb3esm137792pfb.73.2024.02.08.12.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 12:01:31 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707422490; 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=yEe9Wy1b0zH9GvqFkXuxdhjDPzE0yMoBbpTR7V7GZ+M=; b=Hkh51lOG0vEMTR6k4TMpp5P4/a1/5aKcnp4xHR32wiRjP7yUIyTcCU95N1nHy8cnLzMaVH qKT2PmHYo6NjfQyFQM0/vrKa3bh0BVOS46oVciaoO91/u3w2RX18AbTigXjOFPx/e2/Qgy zW6kOXG9dL0cGSRZ4X19Y5EAd7GZV9+m8sUuYTmbUdn+qWhQCKPCj5JxqEipqv/kmvof/F PyfD/ECipdwYqv/xb0es+0KiL4fJjDXbmbgj7sX+2ZgD/XfxdAJNOsPx7YC0l2voHCfg4k vCygefUCA/xHs71Pa/ZNgamtiLeFSMpLUiTOltjtUapQ0wzB6wSQu/5UW4ffJg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Thu, 08 Feb 2024 17:02:04 -0300 Subject: [PATCH] vfio: mdev: make mdev_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240208-bus_cleanup-vfio-v1-1-ed5da3019949@marliere.net> X-B4-Tracking: v=1; b=H4sIADszxWUC/x3MQQqAIBBA0avIrBNUsqKrRITVWAOhohiBdPek5 Vv8XyBhJEwwsgIRb0rkXYVsGGyncQdy2qtBCdUKJQa+5rRsFxqXA78ted5r08lBrBotQs1CREv Pv5zm9/0AgaM6qGIAAAA= To: Kirti Wankhede <kwankhede@nvidia.com>, Alex Williamson <alex.williamson@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=1646; i=ricardo@marliere.net; h=from:subject:message-id; bh=P0NUudkhr32cG7/aid0oQ2TiIP175J8zDSv6y5I26BM=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlxTM8DUjxBAKGg8kKde2XCEznhpTh+wTFuCoZv fGzHUAgeTyJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcUzPAAKCRDJC4p8Y4ZY psZuD/9bh3JFq/UYSclCldBhiv4hq59N6gkvalm2HNd0afNc10oNRrki7h0OzJdX//D7TPGsrG4 z7nF60uFQ8r/DIVRw7FMf5tQKpw6gsla1MesFrZdc+FqWxZuElUSopV5TZeJ/2ahyoQy4XeQHgY ES9+xxeBGyYUjjD7Kpm2sCELN243O80leyhsqageCIwatWvimankkhI7FmkbyYNPTWriIQazq95 8eTmejxdHHUaK53QWVs5g8LaULizdwmPiemfGMgIGlcv20mZQ3EpHw6AoA4eGXuKO0/wynkZuMe sVISMN7FO2DHQj3Ri6jrnB5vyX7Shrk+ilVOKMvZf+vZ2C2VNCXRTjyNntoBShH0TOjsNRFF8ay VUa2Pd2uVLJTzhbNLGQ7xsL/Dr8wAq//kVg9cmI1YY7OKG0JTcfYQly1jZ+BqTRcklqfFd8F8DE BZ0e6iVYuJ1+i6iJkb0M/EsieME5jp2FZw1m/nnG8o67FlMvpYvzMvWJITTmYtI1O1Iq4sQUm6+ T50aa1PWCiSGYlzDBNY6AlN2pLZM6WSkRskBjrHYrTu7lwvJsCiuhA4HV/S0ahpoiOO7tSKMYIY dPDwchf6ZfJFX86FCb3pIzKYH2JQFRezp/LN6kS4j8x4hGAeUNTn39Z/fqv1ThrE8FQfwxMgxmL C2jUzInNsT2TXKw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790362330957559551 X-GMAIL-MSGID: 1790362330957559551 |
Series |
vfio: mdev: make mdev_bus_type const
|
|
Commit Message
Ricardo B. Marliere
Feb. 8, 2024, 8:02 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
move the mdev_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 <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/vfio/mdev/mdev_driver.c | 2 +-
drivers/vfio/mdev/mdev_private.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 78f70c02bdbccb5e9b0b0c728185d4aeb7044ace
change-id: 20240208-bus_cleanup-vfio-75a6180b5efe
Best regards,
Comments
On Thu, Feb 08, 2024 at 05:02:04PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the mdev_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 <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > --- > drivers/vfio/mdev/mdev_driver.c | 2 +- > drivers/vfio/mdev/mdev_private.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Thu, Feb 08, 2024 at 05:02:04PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the mdev_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 <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > --- > drivers/vfio/mdev/mdev_driver.c | 2 +- > drivers/vfio/mdev/mdev_private.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
> -----Original Message----- > From: Ricardo B. Marliere <ricardo@marliere.net> > Sent: Friday, February 9, 2024 1:32 AM > To: Kirti Wankhede <kwankhede@nvidia.com>; Alex Williamson > <alex.williamson@redhat.com> > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; Greg Kroah-Hartman > <gregkh@linuxfoundation.org>; Ricardo B. Marliere <ricardo@marliere.net> > Subject: [PATCH] vfio: mdev: make mdev_bus_type const > > Now that the driver core can properly handle constant struct bus_type, > move the mdev_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 <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> > --- > drivers/vfio/mdev/mdev_driver.c | 2 +- > drivers/vfio/mdev/mdev_private.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index 7825d83a55f8..b98322966b3e 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -40,7 +40,7 @@ static int mdev_match(struct device *dev, struct > device_driver *drv) > return 0; > } > > -struct bus_type mdev_bus_type = { > +const struct bus_type mdev_bus_type = { > .name = "mdev", > .probe = mdev_probe, > .remove = mdev_remove, > diff --git a/drivers/vfio/mdev/mdev_private.h > b/drivers/vfio/mdev/mdev_private.h > index af457b27f607..63a1316b08b7 100644 > --- a/drivers/vfio/mdev/mdev_private.h > +++ b/drivers/vfio/mdev/mdev_private.h > @@ -13,7 +13,7 @@ > int mdev_bus_register(void); > void mdev_bus_unregister(void); > > -extern struct bus_type mdev_bus_type; > +extern const struct bus_type mdev_bus_type; > extern const struct attribute_group *mdev_device_groups[]; > > #define to_mdev_type_attr(_attr) \ > > --- > base-commit: 78f70c02bdbccb5e9b0b0c728185d4aeb7044ace > change-id: 20240208-bus_cleanup-vfio-75a6180b5efe > > Best regards, > -- > Ricardo B. Marliere <ricardo@marliere.net>
On Thu, 08 Feb 2024 17:02:04 -0300 "Ricardo B. Marliere" <ricardo@marliere.net> wrote: > Now that the driver core can properly handle constant struct bus_type, > move the mdev_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 <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> > --- > drivers/vfio/mdev/mdev_driver.c | 2 +- > drivers/vfio/mdev/mdev_private.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index 7825d83a55f8..b98322966b3e 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -40,7 +40,7 @@ static int mdev_match(struct device *dev, struct device_driver *drv) > return 0; > } > > -struct bus_type mdev_bus_type = { > +const struct bus_type mdev_bus_type = { > .name = "mdev", > .probe = mdev_probe, > .remove = mdev_remove, > diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h > index af457b27f607..63a1316b08b7 100644 > --- a/drivers/vfio/mdev/mdev_private.h > +++ b/drivers/vfio/mdev/mdev_private.h > @@ -13,7 +13,7 @@ > int mdev_bus_register(void); > void mdev_bus_unregister(void); > > -extern struct bus_type mdev_bus_type; > +extern const struct bus_type mdev_bus_type; > extern const struct attribute_group *mdev_device_groups[]; > > #define to_mdev_type_attr(_attr) \ > > --- > base-commit: 78f70c02bdbccb5e9b0b0c728185d4aeb7044ace > change-id: 20240208-bus_cleanup-vfio-75a6180b5efe > > Best regards, Applied to vfio next branch for v6.9. Thanks, Alex
diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 7825d83a55f8..b98322966b3e 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -40,7 +40,7 @@ static int mdev_match(struct device *dev, struct device_driver *drv) return 0; } -struct bus_type mdev_bus_type = { +const struct bus_type mdev_bus_type = { .name = "mdev", .probe = mdev_probe, .remove = mdev_remove, diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h index af457b27f607..63a1316b08b7 100644 --- a/drivers/vfio/mdev/mdev_private.h +++ b/drivers/vfio/mdev/mdev_private.h @@ -13,7 +13,7 @@ int mdev_bus_register(void); void mdev_bus_unregister(void); -extern struct bus_type mdev_bus_type; +extern const struct bus_type mdev_bus_type; extern const struct attribute_group *mdev_device_groups[]; #define to_mdev_type_attr(_attr) \