Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp562782rdh; Tue, 19 Dec 2023 07:09:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDlwPcOvgymHMFNF/rMzYpetrI6g/zldutgWYU8LWXlZFk9wKjYrVxKExsCrwxDH5OiLzp X-Received: by 2002:a17:90a:8d86:b0:286:c138:c2b7 with SMTP id d6-20020a17090a8d8600b00286c138c2b7mr12049375pjo.49.1702998577720; Tue, 19 Dec 2023 07:09:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702998577; cv=none; d=google.com; s=arc-20160816; b=JTnh9KCNt062/YBYk8OIxhaX90uE2aHhVDf/hEiXGZiJUkLD2LxVSDN2OMcxm841hm PX6yNxZxA26lSbO9jfPw1bbNoLweLU4spCheHUdLT4g99EaaZKZBhAyF3AR7Hpr4r/Ss za72sjQVsmwQ3G/z0frVvSymYl8sXjDs/14AiH5oGUPTVeSiOY9AkN1+6CO4YpR8DQAw JJcqJtVfgy/+N3EoBgNnN7mhHMcaZervBUNaFPrmVu0ZlfY9rk7EP/wjehX6u1lK/lxO iG3LVrbvEK4bDLxKR5vlZHtv1W1x85CVAg1EunVD0hoL2DTM/tTPUSEodeM5RboMOE9N 8nEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=nHikrrb3+PAcgOXetiItKoLLCgPm8qYunl+WPQXdXls=; fh=/adRXC/d41c7LGu4ZJAqEUfkvz/r8bnYDyWv28BobcI=; b=TuadAZJZXHDsl6uXSHE0o2h5agJqoC9+/nLfZdx0sYxHFkw7HwAdOcx2jVxGyE3egy SQVaPg+E+ooTm09Cq7Ua89EHSWJ0Cft+XhrhgOR6TPvGFfRd9v7Nn6fesYS0LQZGUSL7 3klgWYJKPJPOJjkTZAHp4/7p2hSoHjbovHiLYk6GWjvr/EyzNZ4q2+BuGDymWqLtWKh0 ns2ogH0MqCmRl4EJzTyjhChbX1tD7L9mdJNRm4sIZY6XClUXf+1QL5iCzu0HedklsXXu RfzjVoUCQ03Q+2PAII+zAsSLzZWDSNi4dr+tpc02/H0XJ6HNpKd0HZJvM9GwxsXxR/fQ 74RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mWqQFs03; spf=pass (google.com: domain of linux-kernel+bounces-5452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gq12-20020a17090b104c00b0028bca12da76si64844pjb.48.2023.12.19.07.09.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:09:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mWqQFs03; spf=pass (google.com: domain of linux-kernel+bounces-5452-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D942BB23342 for ; Tue, 19 Dec 2023 15:08:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC4B71CF87; Tue, 19 Dec 2023 15:07:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mWqQFs03" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09C681CA81; Tue, 19 Dec 2023 15:07:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03D26C433CB; Tue, 19 Dec 2023 15:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702998476; bh=76IMDa35Ejr4DS8JJBlGFBxWrx3Os8GLF+gs9kZW9II=; h=From:To:Cc:Subject:Date:From; b=mWqQFs03BZuMAl/JfgCocD6vFVETom5/non6pqxKgM1JS/XadCHFlz5/Qb8WHNc5j L8QuaMjlk9oz5so+qnZNtaMITMWoBwpAPNzfHMMdAGYrneIp3gptGhqJXPbOx+jb93 lIkdL8V6cqaRYqe1pSVGivwPoFpFrqlvYj6VgCP8= From: Greg Kroah-Hartman To: wintera@linux.ibm.com, wenjia@linux.ibm.com Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-s390@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] icuv: make iucv_bus const Date: Tue, 19 Dec 2023 16:07:51 +0100 Message-ID: <2023121950-prankster-stomp-a1aa@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 55 X-Developer-Signature: v=1; a=openpgp-sha256; l=1792; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=76IMDa35Ejr4DS8JJBlGFBxWrx3Os8GLF+gs9kZW9II=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNG4/HvBFNfNNYMSvisnXSm9asi+9m/cg+P+OQ56Jjh gpTtood74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJfPzBsGDRhXQ1p/bOowui i6ec9JsaYt0tU80wT2lq6J8rhWaHXmptFXrN8IqDt2jFIgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Now that the driver core can properly handle constant struct bus_type, move the iucv_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Alexandra Winter Cc: Wenjia Zhang Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-s390@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- include/net/iucv/iucv.h | 4 ++-- net/iucv/iucv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index f9e88401d7da..8b2055d64a6b 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h @@ -80,7 +80,7 @@ struct iucv_array { u32 length; } __attribute__ ((aligned (8))); -extern struct bus_type iucv_bus; +extern const struct bus_type iucv_bus; extern struct device *iucv_root; /* @@ -489,7 +489,7 @@ struct iucv_interface { int (*path_sever)(struct iucv_path *path, u8 userdata[16]); int (*iucv_register)(struct iucv_handler *handler, int smp); void (*iucv_unregister)(struct iucv_handler *handler, int smp); - struct bus_type *bus; + const struct bus_type *bus; struct device *root; }; diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 0ed6e34d6edd..6334f64f04d5 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -67,7 +67,7 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv) return 0; } -struct bus_type iucv_bus = { +const struct bus_type iucv_bus = { .name = "iucv", .match = iucv_bus_match, }; -- 2.43.0