lkml.org 
[lkml]   [2024]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 6/6] s390: vfio-ap: make matrix_bus const
From
Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com>

On 2/3/24 9:58 AM, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the matrix_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 <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> ---
> drivers/s390/crypto/vfio_ap_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index a5ab03e42ff1..4aeb3e1213c7 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -60,7 +60,7 @@ static void vfio_ap_matrix_dev_release(struct device *dev)
> kfree(matrix_dev);
> }
>
> -static struct bus_type matrix_bus = {
> +static const struct bus_type matrix_bus = {
> .name = "matrix",
> };
>
>

\
 
 \ /
  Last update: 2024-05-27 14:49    [W:0.018 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site