Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp769232rdb; Thu, 8 Feb 2024 23:52:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1fqYaKKdIiG7JLhdHO7WWw/zgLKVSxmoGb9Je5wSTbzixmY/raDCitboCM4yTddhbB8Hl6hr6stvothE/Z7OEjaMr9uTOz5MWluJhKQ== X-Google-Smtp-Source: AGHT+IEYnytWT6wLwwUQ3l4+CIsLs5c2S7f5SMCiuIbvzbublDAWn6flmuDfgqmmQau2ijrBzOMQ X-Received: by 2002:a05:6a20:93a5:b0:19c:b3f4:d9a6 with SMTP id x37-20020a056a2093a500b0019cb3f4d9a6mr1308163pzh.20.1707465167326; Thu, 08 Feb 2024 23:52:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707465167; cv=pass; d=google.com; s=arc-20160816; b=N890sRPL4Z1xVGjrO/5CtnCVg9pc8jnMWT6wbZXOfVC58eDR1FwKWD1iJWOfQH2N7+ pBKAju3i4JTgGR/VBy/CD1Equx+TB3tD4yDFCqdFScYN5A26uDPBWxFQOhjLWMTiGBju rx0/dhObqY92eIgydh1Dya2eGkdzN36MTgoJEDEELf0jUcvrOV/9cS3Bg5EVMlOC5Urs Zjm/JXN3X4AgdLgbg+T6B+IyRNlutGvJCmaHiCMXtS5aTZTd0q8V8THpRIDD6gmuH64J 5frAVA2A3QW+i3i+8LkuvRWqD73CyeP5gqsOqIs+cwGzBZ3CLXKYb3zene6DF0Jfebpv P1fA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=YuFnXWKAMZUaHr8SMQtDYTrcpRwqO7vAOmQCsQKVayA=; fh=gzCWlZb6iLxX/CPzuujd0xo3sZh8UTUwTLRot2sv6v4=; b=u54jDHKCieh7QRzYbY6KOQz1mjFVY3ZdFZjEec9uZb7pXrlWX8XnjErEhyC+yNFSae 49WctA4m0AW924zY7SD98l/v7muWo+QfNSMMX7ZOiLmKGBIxNO3P/hgymjlsB31PauQr guGgn+aVbmydK9JUx6JBGnlPuSa+j/q6GEH9sD5vmgoo1U3ZDaI9OwKicxygbXGSISx1 6VZjXNkH/O6Tm1cezqMTU84aUBnd24L1YZ+0//LE23xyk22rBUU2hHnr6DsQLJtO2LNV qxxDwsZq3S5BKpnO+TsMC5C7rfYzCcTtyPQBe0fxTa3mcNjEfaZY1GqBcx2K3ox/g9eb tLHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IalBDYTx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-59077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCWq8HreBrDHp3HsqM8GQprCC5acoXZPHm3IWK97lRJz+c4YEiL7PPhhQap/vlSLJk4QEPCPhFECIQR1wFx2yek+Lx6WvUsXfsFFkwDBQw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d30-20020a17090a6f2100b002960e96b9ddsi1197786pjk.150.2024.02.08.23.52.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 23:52:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IalBDYTx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-59077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 3732BB243EC for ; Fri, 9 Feb 2024 07:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B80B1657DE; Fri, 9 Feb 2024 07:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IalBDYTx" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 5206665BA7; Fri, 9 Feb 2024 07:34:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707464087; cv=none; b=sb7anrQwwItfCGNdoTqeg7Dcd9+laA0rFpVS7JEhjt9k4cxHftj6Jm/pdQJ4IGMcMt01fF7SOtSss+QzbXLNAtMCkiD5qDPHvSTSOeZfDFUy0x0H9DMjxfS9rBdx79EXjHs5sJZrJA2YfFV+9cS+KjY+dhIB4gaiROAdLY3ZzIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707464087; c=relaxed/simple; bh=CMPjf5ZcgIXX/5rX8wFH4Kq38vPirxh6V50ymBzFNsE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=HGYB4E8GpKvRt2Swidruw4bUWhDlBeCmwHv9Dkxp79Restix/EglMmKWfTT/zsVyFCiUNic17pKu/SEBwHU8ZdI2rfqqNRCSeKm/JAjP2txV76Ck938KY20zU/4JstIu+5kyeAOtgAKYD8XsIwSHUSE2NvgR3MKMAxRCRu2BEjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IalBDYTx; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a38291dbe65so70876166b.3; Thu, 08 Feb 2024 23:34:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707464084; x=1708068884; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=YuFnXWKAMZUaHr8SMQtDYTrcpRwqO7vAOmQCsQKVayA=; b=IalBDYTxXNd6kYJJDBQo9a2y7CVuG0+lLmn6YZLAu48VB3Hs4e0mU8aMnq06lrfNaF 4kutB1/UEuhxRh01hauAMPPkYn35ZV8CZo6Rh8aqMzCdZ8X9M8zP6s8LQlQ7gUCaBrUG rmT9dVO+arx2acvJIeCGruOysPAzSvVinufUY1u26yQNAE70SbOktPWIpT8CszgGXGCP uL9nCtk6s4WHfQB1JQHfV9IjbqkBJ/e8IqjKejnmP2VQFYLinrOudEC7dOiRp50qfaUk IvredWLEtACZF0KEiJZr+OQ3CrFk6nTO8TVW1kiAXS2OtnrYCA6rn4xixV6uO+MbE1La SoAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707464084; x=1708068884; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YuFnXWKAMZUaHr8SMQtDYTrcpRwqO7vAOmQCsQKVayA=; b=srLLDfRS8tPFsFF5aNzM77jkFDkEkHA55BLDXsJKqJ9DDqfTWlecIYt9OoD1HOa+0S 0cX1eAINGCf3acsNfZnlH1Odd06ApJ7LDBMRbmAziFHuc5sDrXFX8ig+pFJ38mLcl5rZ iE3YqL3xKW3O9sUSzmtRxpg4r87nBmmmvbLmOmyg3X+22t/+BEaCnsqpUuWYy20e8TaV Yc905SXi/gWzF3FeoDBHmtGzqKFrhcz8Qc84KzSe9aD79SYMFQH4S5DIelpI0wpqily8 NLTkd2Z96IUOF6gO+PiZoPB00k3dH9U1zpZxYGLDrsvnTaI/557U22U0vkFUD+vSe4CP xMqQ== X-Forwarded-Encrypted: i=1; AJvYcCX2hCPK6YfTvGK7/8JDNgH83Yx9KSZpAbmbjgiqtX7BJPfty75WHeBZ6hf+j6VDt7fXuRpziXPgoRHVNd8gnyOalrD3i1msA35PMfSF X-Gm-Message-State: AOJu0YydtfRj1ewAW76Y3MhnaOkcQJPGoDnuu9JrHariaOHKEwFOaPTW uEXvnoktd2WI/6V0lChM/x2kbGQ840Wm5A+onhNVVGutl+PEuAin X-Received: by 2002:a17:906:2dd5:b0:a3b:fe66:1aa6 with SMTP id h21-20020a1709062dd500b00a3bfe661aa6mr111799eji.53.1707464084171; Thu, 08 Feb 2024 23:34:44 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUUxh2ZM/zOopClfurLS95s0uJ3GEQPK7RrTf4GLKvNcpyJQgDypMcQ82QPDLpn2WlO+JyLo2kCW2D7XLBpmNLD1ZvG+uDIVSTSBjS2S5si4g4w5ymv1FfMz2JvslH3SC3AdSejRCNBOlcVvHD9DeZpAqB80aBxgzYvj9Z5LUXaZf4gMbwPmgF7/u2c Received: from ?IPv6:2003:f6:ef1b:2000:15d4:fc17:481e:8afe? (p200300f6ef1b200015d4fc17481e8afe.dip0.t-ipconnect.de. [2003:f6:ef1b:2000:15d4:fc17:481e:8afe]) by smtp.gmail.com with ESMTPSA id y24-20020a1709060a9800b00a3845a75eb7sm480523ejf.189.2024.02.08.23.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 23:34:43 -0800 (PST) Message-ID: <77e7ed84395c716e17d783e9411fd57ad8c22295.camel@gmail.com> Subject: Re: [PATCH] iio: core: make iio_bus_type const From: Nuno =?ISO-8859-1?Q?S=E1?= To: "Ricardo B. Marliere" , Jonathan Cameron , Lars-Peter Clausen Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Date: Fri, 09 Feb 2024 08:38:03 +0100 In-Reply-To: <20240208-bus_cleanup-iio-v1-1-4a167c3b5fb3@marliere.net> References: <20240208-bus_cleanup-iio-v1-1-4a167c3b5fb3@marliere.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-02-08 at 16:37 -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the iio_bus_type variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. >=20 > Cc: Greg Kroah-Hartman > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Ricardo B. Marliere > --- Acked-by: Nuno Sa > =C2=A0drivers/iio/industrialio-core.c | 2 +- > =C2=A0include/linux/iio/iio.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 | 2 +- > =C2=A02 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-c= ore.c > index e8551a1636ba..9b2877fe8689 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -42,7 +42,7 @@ static DEFINE_IDA(iio_ida); > =C2=A0static dev_t iio_devt; > =C2=A0 > =C2=A0#define IIO_DEV_MAX 256 > -struct bus_type iio_bus_type =3D { > +const struct bus_type iio_bus_type =3D { > =C2=A0 .name =3D "iio", > =C2=A0}; > =C2=A0EXPORT_SYMBOL(iio_bus_type); > diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h > index 4f89279e531c..e370a7bb3300 100644 > --- a/include/linux/iio/iio.h > +++ b/include/linux/iio/iio.h > @@ -669,7 +669,7 @@ DEFINE_GUARD_COND(iio_claim_direct, _try, ({ > =C2=A0int iio_device_claim_buffer_mode(struct iio_dev *indio_dev); > =C2=A0void iio_device_release_buffer_mode(struct iio_dev *indio_dev); > =C2=A0 > -extern struct bus_type iio_bus_type; > +extern const struct bus_type iio_bus_type; > =C2=A0 > =C2=A0/** > =C2=A0 * iio_device_put() - reference counted deallocation of struct devi= ce >=20 > --- > base-commit: 81e8e40ea16329914f78ca1f454d04f570540ca8 > change-id: 20240208-bus_cleanup-iio-1e5714e23bb9 >=20 > Best regards,