Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2594464rdb; Mon, 5 Feb 2024 11:12:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd+PEPFNRGiXxlY1oUdJkN5iSUntAPcFBgN8wl7MIvkyOb2iTVrmcnslFXfFgO3IH1/Ni/ X-Received: by 2002:a17:906:2b5b:b0:a37:ba23:abbe with SMTP id b27-20020a1709062b5b00b00a37ba23abbemr278663ejg.68.1707160348197; Mon, 05 Feb 2024 11:12:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707160348; cv=pass; d=google.com; s=arc-20160816; b=ZS9DxN8jmCp7FzmNnlNcOTlj1AHpPCvETy8hDy3qpEsEv8lVvaUd9ft9RUOeK8qoUG AIbBdD9z8zZE2Rmw36WDCfCHLnxQZ3sjS5dBhxWPLpZ8olYiVp8SOOxZbwhIHW7/j9+g jkl2r0wBGIuZVNkSDIOeOeGTWujGM/DvOkfElClCb9oBQWWQUVatsunyKA88HC5ihlDS 2XDU9EgRQov8nhlk5/iroSD7DQMgWjcbaJccY/+Qs7G63a3sL+Sa3dNPy8cKq7RqFE2V 6XogKk98u3zNX60LZ83L1fMXxGvnL2KFaoCQGPgi0n7pAm0pq3xDd8Kq847isEAQmeWk ef2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V9xcyvFZTdZZmkpU1kIOXXG0z1Sh+yLOs2srYf1bxYw=; fh=qd8XbHCV4xDc7B0/6HT9vOAN2+nMjZnBMLLSCIJiGFk=; b=0TzUO9sovUOs5C+H5vL1e4MLygKhTq6A2GAXavTw/gAK1jlfi8xGPPQIVShEUhcRGE k03ewyklr5Zq9GvRN3AgwBTBO0wKZxfVwYxKw7LaEmWXa62235IgXQofhdyQcbaMd4q2 Uu2jtKdMWNxfnTlF47kalXpZbYuD/NXJp4GqPhxTWLRScNk7ju+4J4eWPGxCoQyJhxwS zKZhK6woqYXfesDzeACh73Ka5z/amkQqKCtQFQYYYjWl5R/RjVkLXoiB5SUCGsXtnwk0 rBiVRtVghonnKt8UP6gO0s+f3g5t8V+t56vmgrZ3jhmFROnj6bm/2ZyXf8YshEMnQA9+ ckvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ro0WS3fS; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-53306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=1; AJvYcCXmxGP5XX6KG4KYZj/jPYSAiVFWFXF6dbJ6GjaJMEsi32PS+nPgVSZZG9+lsQjpnacVJBIhMAiSDETzWHmKd3Oa3wzjQZURlmnXwjrauw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i9-20020a1709063c4900b00a349639fa31si137174ejg.769.2024.02.05.11.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 11:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ro0WS3fS; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-53306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53306-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B78151F267DD for ; Mon, 5 Feb 2024 19:11:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22B255A11B; Mon, 5 Feb 2024 19:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ro0WS3fS" 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 0035E59B41; Mon, 5 Feb 2024 19:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707159786; cv=none; b=RPOL3+ZmNpTrfgSvgz8tZhQnJaCdSHOsPkBi1407R14uqwAkCrMdun17+GOajXAmUeYNUx/LESKcPqbvo5da6qN50HCGu2Bhhx124m1rGaY4cXUKTnvFmSxwJS8sbzdGMgVsrbAdZ6TlJUbFe0A7i44BPplGyV12MQd7qBWBvvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707159786; c=relaxed/simple; bh=FEzg+G2fknYhQYjKuxgdWtNV8zO/Hs0+/47sEWBzFaI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SwlubbjIK84Lnza6IgqiCRg62+53nzM0FWgj6sd3tl9xauboI8nrw20d+hwYW+LpmGy6FDvASyJ917YWGxmoFGwxvGOpxmjN8AkzMMIU9WDV02qFceTE1sIBwu5NKW9tM7ITCuZR4CjFhPYYkryezcwBrYBXM5Zj7O3b6boap2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ro0WS3fS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8766BC433F1; Mon, 5 Feb 2024 19:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707159785; bh=FEzg+G2fknYhQYjKuxgdWtNV8zO/Hs0+/47sEWBzFaI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ro0WS3fSNSHqItsiYdfmqC1Sh4hA3r0NxuDq/iqZtRcvwi98O/4Y9T2ShLFF3GzYS XyD4OT+3Z4jYZaZL8//1Zcbbv58gZGNllVw2wbAxv9vbDGBjgVti0x3l7GdQ16b052 u9ogUrzXepuVc6Lc23svpaTvEDwKxiPBxQrHj27Q= Date: Mon, 5 Feb 2024 04:43:49 -0800 From: Greg Kroah-Hartman To: Bartosz Golaszewski Cc: "Ricardo B. Marliere" , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: gpiolib: make gpio_bus_type const Message-ID: <2024020545-sloppy-book-9b17@gregkh> References: <20240204-bus_cleanup-gpio-v1-1-82d91b4ee1de@marliere.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sun, Feb 04, 2024 at 07:34:43PM +0100, Bartosz Golaszewski wrote: > On Sun, Feb 4, 2024 at 5:29 PM Ricardo B. Marliere wrote: > > > > Now that the driver core can properly handle constant struct bus_type, > > move the gpio_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/gpio/gpiolib.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > > index d50a786f8176..24d046268a01 100644 > > --- a/drivers/gpio/gpiolib.c > > +++ b/drivers/gpio/gpiolib.c > > @@ -63,7 +63,7 @@ static int gpio_bus_match(struct device *dev, struct device_driver *drv) > > return 1; > > } > > > > -static struct bus_type gpio_bus_type = { > > +static const struct bus_type gpio_bus_type = { > > .name = "gpio", > > .match = gpio_bus_match, > > }; > > > > --- > > base-commit: 3eac8bbed22e940ac1645a884f221bef408f675c > > change-id: 20240204-bus_cleanup-gpio-57eea8d32a5a > > > > Best regards, > > -- > > Ricardo B. Marliere > > > > Ha! Does the same work now for struct device_type? Very much so, please feel free to do so, that's next on my list of things to do for the tree. greg k-h