Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1781740rdb; Sun, 4 Feb 2024 00:48:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7+44EYUkvk2PmmCkUfw3ITKvTl4YzQWnWc9xN8rFuPby1lpaXnxT2THAyH2abLCJ0J8Lb X-Received: by 2002:a05:6870:7d82:b0:219:3c48:e97b with SMTP id oq2-20020a0568707d8200b002193c48e97bmr7188383oab.48.1707036525811; Sun, 04 Feb 2024 00:48:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707036525; cv=pass; d=google.com; s=arc-20160816; b=DIWbuB1KgTNkubcJ/Bq+PROx7XP4eJdhk5tbE3P7XX6iYRAQX33QMvDMh6Fj4akBBW H8Keb+1frvF7327Ex5X3FYnbGcx64exRKAXhCkv+SFr1L5ZIzNc4fof2K1p0xzVDirk5 iJrq6VGhQskhtX4H6tCSZRGX+y9GVKbOPRaVrU39jHK6CvtV/YiTzHrNFVJiVKcnIqdy KBnLCWAt1aIdJxHw2cZmSmiHCbuhAOhy5zDzsjzQVpLSgzeXelVmG9DQQD7gWhxcEvaM 39vrl4UkOAcn+/WnSVFDjAt6pBXWu5edyzSLdf7xhkNjum+CCmLpKe5vMBcMOJjqhIUb qnJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ut3wBR2SyKchxj7UXfjBy997ULZDl4xPI9Qt8J75gtw=; fh=4f+/dpPig8LXj7W+2Ungjz+X6eCgZWkF8VvLm+nIZH8=; b=j5/msoZCtWcXjmegYTU6UI6Ad6mytHGTfIFizLCS4LzP5POexafxv3DxLHIgRtwhPW LsEO4deLBz8YRAaC1S0nhnw+l9NNT9oUsjBdEYebMgF0EiIAVUaHKbcomc8+z5nnNqNG i1A6Xk+G+NEYBWj9q1Zgh2NVo5g8UIj99WYP4jB0WAmh2fJQAktD3dGgdD6c5a+YwLrC 3H6b1czkAA9f0Awfe8f8pRlYLhw9UjSP/qdPHb8Subsl6EJyKXRTQvtHKLkRT6h3impb 0mSjmNlElwq7pBYe/yKH9rc7RWlGow2EgiUSXlRhCGQ7/9gIGwjAmZ0gvsN/rd9EpsFQ Flvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qm3xI9KP; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-51532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51532-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXJCMXmAsPlHbJkh1jSL9ov8+TAphjFVjqwTZXvlW/iMKTZO7liRZu9H6IMClvT2NaqSd/S0oF2qcKcNXe2OgOQGidJHp7C/lSuHpC3DA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 10-20020a63184a000000b005d80a51e1c2si4202661pgy.329.2024.02.04.00.48.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 00:48:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51532-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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qm3xI9KP; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-51532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51532-linux.lists.archive=gmail.com@vger.kernel.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 77829B24651 for ; Sun, 4 Feb 2024 08:47:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9489914AA5; Sun, 4 Feb 2024 08:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Qm3xI9KP" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 01F8914275; Sun, 4 Feb 2024 08:47:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707036434; cv=none; b=ag00qJnSnz2NnMnFrYn9cENypeEAb5d/q1NXLKlGvJuU/+VqHf/cVbw8dINlVH8Gy03b4LgC/VKuW8d8O8bWShD8LwiIMSvjx3N8fiK33or5ZeaJ6pfM0jQxumNBfyOWqQJjNW9Ins6An5JdUCBHyCg7PZFB+yRqZ5BvqPEQCWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707036434; c=relaxed/simple; bh=RUA9DVZTSMUYUSqiFziWdhCqEzBXnuZwYGQG1Psuc2o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f3fmIhX/WriKjx/pWHBmF6ilN9aXW6KlhGJaw6ySO9xR0DLXc4bfDzg7bzdcO+vYVgzaUwabT9HWV5J9IcPPrwJfiSBEehkv/hZ8mCYc5UrYe7ZqlWARWwb/XVPHQV/2Y8GSUNbPL0YgKJhlhz9Z4C30KABZpVN4EJyQfV0atKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Qm3xI9KP; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (unknown [109.128.141.99]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 62F02B3; Sun, 4 Feb 2024 09:45:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707036349; bh=RUA9DVZTSMUYUSqiFziWdhCqEzBXnuZwYGQG1Psuc2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qm3xI9KPWatgZx9Vfp2ZGTt2BbrLo7KFQl25FZXXnR39FSUXqShk9f4xgiozv93GZ Y0wdCQWEq8aqKnau6t0WFypndsdujMXuVmjEwb3r3SxAFrhWY+OvHoxwImOwwE3o7O kyxBTFzbCzY4XLFdY6fIGuLunLLEA89SVbWzqVyY= Date: Sun, 4 Feb 2024 10:47:12 +0200 From: Laurent Pinchart To: "Ricardo B. Marliere" Cc: Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] media: media-devnode: make media_bus_type const Message-ID: <20240204084712.GE3094@pendragon.ideasonboard.com> References: <20240203-bus_cleanup-media-v1-0-33e8feeab912@marliere.net> <20240203-bus_cleanup-media-v1-2-33e8feeab912@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 In-Reply-To: <20240203-bus_cleanup-media-v1-2-33e8feeab912@marliere.net> Hi Ricardo, Thank you for the patch. On Sat, Feb 03, 2024 at 12:31:27PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the media_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 Reviewed-by: Laurent Pinchart > --- > drivers/media/mc/mc-devnode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/mc/mc-devnode.c b/drivers/media/mc/mc-devnode.c > index 680fbb3a9340..90646805bd81 100644 > --- a/drivers/media/mc/mc-devnode.c > +++ b/drivers/media/mc/mc-devnode.c > @@ -63,7 +63,7 @@ static void media_devnode_release(struct device *cd) > pr_debug("%s: Media Devnode Deallocated\n", __func__); > } > > -static struct bus_type media_bus_type = { > +static const struct bus_type media_bus_type = { > .name = MEDIA_NAME, > }; > > -- Regards, Laurent Pinchart