Message ID | 2023121950-prankster-stomp-a1aa@gregkh |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-5452-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2004336dyi; Tue, 19 Dec 2023 07:10:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt9bkYkkPzHkVsmd/+SvRAaaGCjLzsUA91gvtaCj2F1mq2CRT6apm3ZQ+VvapGo/MpjuMX X-Received: by 2002:a17:907:8283:b0:a26:86af:f1bd with SMTP id mr3-20020a170907828300b00a2686aff1bdmr161055ejc.29.1702998608170; Tue, 19 Dec 2023 07:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702998608; cv=none; d=google.com; s=arc-20160816; b=NG0FPGpYvpZIioZQghAn/1iBeCmlluBoZnzO/SKZIU2tNU09ZYD6YZnJvfhjl2aoXr 4VzMG1huuPDT84Mw8ucPH04cxXBQq8HMEbuGeki8Z8OaTdYdsJAcj/VHpiWYiGd2ix/w TuwBAy2UtRdnXLNjbmHfIx6Y50JAazsILiBciDuGfVjUMk4OiTRXgx7coCIp4t6o57eQ 62GXOzWHIaqXwoskyU4Gkn1eE53EVLt9hNFAf+7ngadI35D65ACF9wfKrfkzUhhD9BlU E8wCvDK78JIwm9s6iRshtLuZtbr3apmYK2N12gvcUPG8qish6ZU23zDIzDwgGu0NjCfB U/vA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5452-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p13-20020a170906228d00b00a2353a1f41bsi1999137eja.751.2023.12.19.07.10.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5452-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=@linuxfoundation.org header.s=korg header.b=mWqQFs03; spf=pass (google.com: domain of linux-kernel+bounces-5452-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5452-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7F61D1F25698 for <ouuuleilei@gmail.com>; Tue, 19 Dec 2023 15:08:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 096121D15C; Tue, 19 Dec 2023 15:08:00 +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 <gregkh@linuxfoundation.org> To: wintera@linux.ibm.com, wenjia@linux.ibm.com Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 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: <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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785723468744729855 X-GMAIL-MSGID: 1785723468744729855 |
Series |
icuv: make iucv_bus const
|
|
Commit Message
Greg KH
Dec. 19, 2023, 3:07 p.m. UTC
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 <wintera@linux.ibm.com>
Cc: Wenjia Zhang <wenjia@linux.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/iucv/iucv.h | 4 ++--
net/iucv/iucv.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Comments
On 19.12.23 16:07, Greg Kroah-Hartman wrote: > 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 <wintera@linux.ibm.com> > Cc: Wenjia Zhang <wenjia@linux.ibm.com> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Eric Dumazet <edumazet@google.com> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: Paolo Abeni <pabeni@redhat.com> > Cc: linux-s390@vger.kernel.org > Cc: netdev@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- Acked-by: Alexandra Winter <wintera@linux.ibm.com>
On Tue, 2023-12-19 at 16:07 +0100, Greg Kroah-Hartman wrote: > 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 <wintera@linux.ibm.com> > Cc: Wenjia Zhang <wenjia@linux.ibm.com> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Eric Dumazet <edumazet@google.com> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: Paolo Abeni <pabeni@redhat.com> > Cc: linux-s390@vger.kernel.org > Cc: netdev@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- Nit: There seems to be a typo in the subject line s/icuv/iucv/
On Tue, Dec 19, 2023 at 04:25:13PM +0100, Niklas Schnelle wrote: > On Tue, 2023-12-19 at 16:07 +0100, Greg Kroah-Hartman wrote: > > 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 <wintera@linux.ibm.com> > > Cc: Wenjia Zhang <wenjia@linux.ibm.com> > > Cc: "David S. Miller" <davem@davemloft.net> > > Cc: Eric Dumazet <edumazet@google.com> > > Cc: Jakub Kicinski <kuba@kernel.org> > > Cc: Paolo Abeni <pabeni@redhat.com> > > Cc: linux-s390@vger.kernel.org > > Cc: netdev@vger.kernel.org > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > --- > > Nit: There seems to be a typo in the subject line s/icuv/iucv/ Ugh, good catch, let me go send a v2, thanks! greg k-h
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, };