Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp999467rwl; Fri, 7 Apr 2023 08:26:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YpterZEIgua+IONZicXMy9BaCXnrZ7CBjrMBh7BvErWfOFBYJ0Bg3yQr22jI/K67t9WccE X-Received: by 2002:aa7:d78b:0:b0:4ac:b614:dd00 with SMTP id s11-20020aa7d78b000000b004acb614dd00mr2988922edq.30.1680881215277; Fri, 07 Apr 2023 08:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680881215; cv=none; d=google.com; s=arc-20160816; b=IRINoyvVLN/YP+PmWmzY7zocSMUX5fCuPEOOjmupafBDIBzn4MVmQdzLy/BgP8xetr 0Kpdbb4dmV4VU9Bo4HqUfSncxdfyECBXLAjZo9jadLYkmv/F3VpZ4MAvYVDWtn3/fMXN mp2iXg/qs6n0WzNebbA4YeJEvzaywYg8mOnTPyrssGAL7HCUNA+YqvGb/a2/63/0N2tf MQUYaTjk+HK2vJlIN2a/sjSzOZCfw5tnCctwzH1Ppde18tqG0wTAazSOkuXaDYPifNLj ZZI3UUuI13aimvRMCfVw8NDG5vn7rFFiEoHtr5wPit1EhP/lfRQ/E5k22b6hYgPVJw83 sxNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=su/J+YHOkVstEerJgZqlQlSEAis538QbzL9GrGRB2XE=; b=pBtnFQjnSnQOrazH2F1VZJf/rstrrs7jJDyGXFu9N/zc9CZX2XFAusiXx7udcw2B0s EnpxiYA6dbke4amBqwy4eXmPYnDNb/d2WTaGk5c1Tdd7QyXi2VAl444MSt0gezAKbWBk bLrorMvy9HhVK+pyxHvqlOWeezY/ZXSoAdzJc5FpuOQbCjgnTfiJ4c+fIbkdYtsdCpnX NdpTPbkcgqUgGnq3DRFbZhqfJYTWacivL4hmRzOKRRApI9Q0+r8Axi72w9Os64OpawdP vfrnJzEBNm8h9UdUpKwgnpg8G+3/nQC6MOdpV07JPiom8x6rGnbkIJ+oxz9rI6Zfiz+0 NE5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Fu506EZL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a05640202cc00b004fc68e7a3d1si3167210edx.206.2023.04.07.08.26.22; Fri, 07 Apr 2023 08:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Fu506EZL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbjDGPSF (ORCPT + 99 others); Fri, 7 Apr 2023 11:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231495AbjDGPSE (ORCPT ); Fri, 7 Apr 2023 11:18:04 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7C8F5253 for ; Fri, 7 Apr 2023 08:18:02 -0700 (PDT) Received: (Authenticated sender: gregory.clement@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 04192E0007; Fri, 7 Apr 2023 15:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1680880681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=su/J+YHOkVstEerJgZqlQlSEAis538QbzL9GrGRB2XE=; b=Fu506EZLqIBXb5kPblIFRQHeArdM0a4pX/EIqXteyGe51tix/tqx+Yr4RYtSGc9MJ9uC9f QO2Xjcg1K5eN50gInIe3lu0Y29uF2UcYfTKZ+GizsY0wlARETALqdV3OOkSYKcMxCNccuX nQAruSpGg5+shruQYxaCgUeRrAR5yt5Eyk3Hx2nOKmhIkhA+EaAX6+aNmNBlwdllJpmUww IRRJvS6EZDf+i6arQ8eRA4MHhlDTJQ14FCpykuMvlK1AJrcTCp8RD+Q4hYvev4ubtszKev IZhp+wDv3wsmfTnon4kL40/FSMGo7DRCAT3TdUYauCgo+eYo/UQ1AkYwmDizvg== From: Gregory CLEMENT To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Marek =?utf-8?Q?Beh=C3=BAn?= Cc: linux-kernel@vger.kernel.org, Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Subject: Re: [PATCH RESEND] firmware: turris-mox-rwtm: make kobj_type structure constant In-Reply-To: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net> References: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net> Date: Fri, 07 Apr 2023 17:18:00 +0200 Message-ID: <87sfdb3emv.fsf@BL-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Wei=C3=9Fschuh writes: > Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") > the driver core allows the usage of const struct kobj_type. > > Take advantage of this to constify the structure definition to prevent > modification at runtime. > Applied on mvebu/arm64 Thanks, Gregory > Signed-off-by: Thomas Wei=C3=9Fschuh > --- > drivers/firmware/turris-mox-rwtm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris= -mox-rwtm.c > index 6ea5789a89e2..2de0fb139ce1 100644 > --- a/drivers/firmware/turris-mox-rwtm.c > +++ b/drivers/firmware/turris-mox-rwtm.c > @@ -104,7 +104,7 @@ static void mox_kobj_release(struct kobject *kobj) > kfree(to_rwtm(kobj)->kobj); > } >=20=20 > -static struct kobj_type mox_kobj_ktype =3D { > +static const struct kobj_type mox_kobj_ktype =3D { > .release =3D mox_kobj_release, > .sysfs_ops =3D &kobj_sysfs_ops, > }; > > --- > base-commit: 2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c > change-id: 20230227-kobj_type-firmware-turris-6cd4a66bac19 > > Best regards, > --=20 > Thomas Wei=C3=9Fschuh > --=20 Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com