Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1162009rbb; Mon, 26 Feb 2024 00:03:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUqDw5ip8fmQjATzhdLQhuR7DexGL3O/QS26M57JZAoOp1DCaxQOwcYR1D0x45dQUzZsebzU8Oe8lD3hJ1J9A3Hy2AbjQCJnAECmV89pg== X-Google-Smtp-Source: AGHT+IHn5ORSDQaqkxweRe+qhvQ2vmLaDM72dc16Wn/PEGKG6APTTLxuYRYNAh07BM2/oPv1/fz+ X-Received: by 2002:a17:906:8302:b0:a43:4256:96a5 with SMTP id j2-20020a170906830200b00a43425696a5mr1399746ejx.57.1708934593366; Mon, 26 Feb 2024 00:03:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708934593; cv=pass; d=google.com; s=arc-20160816; b=dAB0iOpl6vfHAx7/EdhlpAOfdd6RqV8B9UDzAvOl6sFakh+89a12HkVu0DR9VrD0ZW uJ91eh0jNCfACY43CElWMOltahUlZN1T7bmBLnJdH0ep04z5RyOj42YHJOz9sjdnAwrF VefDW5PBxkxXS4jfuH0NLWwyajnHjWZ97Bhz+h/nEGH5aIbNSagFrtJyMtcPGcT2UpPa eTnhPIxjLMoS8orsdX+Pk+PKpeFPqCCZ1D9otihN3FfsSL98FELZE76InuHXpXpgt9V6 NEWIoT+sc0L+JvNIdzvixoxreJELPBR6KFJplHlp92C9sq/vwnK6CjP14zjjLt1q4KH+ BWyg== 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=awjj8e99OhV4H2DjADPqGa9SAb03wsnkiyR+EOGeAwM=; fh=y7tObkmmdXOpYByF1gAlO+KMzZzvBv2XXBFsL3D4Ayw=; b=ANyPMrDEvaOrdJWi4PQTvbhWNFNwGT098ZNPfAbem3eOEtjpwDCTte19UF4W+UVTU5 SfxhcEc1dg92OYS4ECQDwR5Y6sIx9bvHSOQ4azSCtMRHDEFSoN6MEJezA26Jv7mXWK1u wHKQKQD+M3ev8dUOmTVpmV1JGBcG9svpuewKBeXh3FPaO5Dddh7IJJZJVQmrDq3adjOl q8va6yKtOLTM54vbTu9BjNjQ1btF3wGtdxVQW1qjwWGEuRcrwKXtUZvWMJiWlfjZdp8B uqclCyEihxflaHOh8Wg0YerEiZ1KgDCfaYN//VZ8Ro6kHoglN/2+MwClwWm5ksl64e59 3wCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jgto7MOS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lj18-20020a170906f9d200b00a435146e567si581994ejb.621.2024.02.26.00.03.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80719-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=@kernel.org header.s=k20201202 header.b=Jgto7MOS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2313A1F22737 for ; Mon, 26 Feb 2024 08:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7EC11C695; Mon, 26 Feb 2024 08:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jgto7MOS" 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 203531C290 for ; Mon, 26 Feb 2024 08:03:07 +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=1708934588; cv=none; b=rreuCPjvz4Bk2o8qHf2Nbfa6uPYg9roFZ07OrO+ybMi4AQRMzK6B25SxZe0ixi/nBxPaXHB656K//G0+KsduHIki/TqJhOE/6VoEguMZdDhqjcR8rL5aWrS0t+6WroxW4yP2p72KEiiWuTgISxid8dgu3OF1ppGHnl2GgaFaWEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708934588; c=relaxed/simple; bh=BeTOLJtP9AdrBcyMBpzL9OYFKJ9cR8nzGWdiyS7Gj+E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DCd80ScxAUS7cpUG0OmLW48WdEj71K/b9crjJii2qLJf/kt54aKd9OUxeonhAk2J2GUdy0fpqVJ1D5NPRnU6QRsJRQ0n0iU9RtxTLTn1MDOVJfLt7nU6ey0zsxfW960irgUMoqWcQLf7Fv+pOhfrp0h5D5Q0oZKCKhMk9VI+UZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jgto7MOS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55353C433C7; Mon, 26 Feb 2024 08:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708934587; bh=BeTOLJtP9AdrBcyMBpzL9OYFKJ9cR8nzGWdiyS7Gj+E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Jgto7MOSPftYRs/CvdQZe0jlNQ0kX07dEjimQFDf87NFbLUPSxHE+zvNRJmt5BYxd ia0kX3UbVJyF5JLmyACNQ7oeCtdDoFP0pv05gp39NHtbTU9YxbBotuDfHJrIQ695BM 31W17sEYfpVhaRn+u41BkRoauj7CIDoyNdih2UUW5ziRj4QC70BEizlNnUScGfGIa4 dm4aUUEHrCfrvYwapscD73+vRN1TXRPWL2+Ugb7F5aFBEMoZD+oyghpzWWfgtkra9e B/n1ytflWFv1ObGUoz3EQnDtk3wQuoVSe8AG2TMPLmh77tQydQxDP34px7rmzIva3e uV44/lD/UjrXw== Date: Mon, 26 Feb 2024 10:03:02 +0200 From: Oded Gabbay To: "Ricardo B. Marliere" Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH] accel: constify the struct device_type usage Message-ID: References: <20240219-device_cleanup-accel-v1-1-5031e5046cff@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=us-ascii Content-Disposition: inline In-Reply-To: <20240219-device_cleanup-accel-v1-1-5031e5046cff@marliere.net> On Mon, Feb 19, 2024 at 04:48:28PM -0300, Ricardo B. Marliere wrote: > Since commit aed65af1cc2f ("drivers: make device_type const"), the driver > core can properly handle constant struct device_type. Move the > accel_sysfs_device_minor 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 > Signed-off-by: Ricardo B. Marliere > --- > drivers/accel/drm_accel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/accel/drm_accel.c b/drivers/accel/drm_accel.c > index 24cac4c0274b..16c3edb8c46e 100644 > --- a/drivers/accel/drm_accel.c > +++ b/drivers/accel/drm_accel.c > @@ -23,7 +23,7 @@ static struct idr accel_minors_idr; > > static struct dentry *accel_debugfs_root; > > -static struct device_type accel_sysfs_device_minor = { > +static const struct device_type accel_sysfs_device_minor = { > .name = "accel_minor" > }; > > > --- > base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d > change-id: 20240219-device_cleanup-accel-a990dc3bfbc1 > > Best regards, > -- > Ricardo B. Marliere > Applied to -next. Thanks, Oded