Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1365216rwl; Fri, 24 Mar 2023 09:32:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aJuwaRslrLT6uMtlvDgfrEV39PT+2DpL5X2zvAm6On4USbuzLIBhy8wFp0xu3FZpZaOFOz X-Received: by 2002:a62:5254:0:b0:5d9:27a5:60e6 with SMTP id g81-20020a625254000000b005d927a560e6mr3648232pfb.8.1679675578782; Fri, 24 Mar 2023 09:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679675578; cv=none; d=google.com; s=arc-20160816; b=abobgRRj6PeXUNQEcI8sbvhVc/wAGn3aorNorOBHEIxOWJGhiwej1PMO7gGSo2gfgG Tqq3mZYhCviYPbMKZKKTn/Lx7+GQMyRr9hkNFt9jCnMRz4U/Gr42WGTvv6B2jA7JtlC5 Q/beAGoHcThxPUBlmLLto2f3Pb9P0KW6bDhORdngo5ehmbcOsgcGT57+UVJOOEvF+0Aq gePz83OZQm1M+FrFLYp2Ly2ur2rzduko01USjvu+bj+aY13AGOF+5Rf12ELTYrmZF064 Fd5cyx1fSL5xzXEOtoHE40DTXzmZh5VjMvHhXi0vXzEScDsH2N2R6rjRuqQQSuz6dma+ bX4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from; bh=XdEWtEBX13NUMGqWmwAxyq4bHShyV7Hj3RQdFGjWZRo=; b=cx+CksYi04FToGap8zJjyBDgGt5ZdOHzgedB2U8egu4TTW90SuNCUw/zPDee0k/l5A 14firmCHPjfqp3zeY/x28rh7XjBFDnuWUI87FahhTQJXmxA/MPHGZK7cKlf1Onv8zR2R lm+6tWR/kMTpUtsgnWhhm+EORJvReDKRPbInmhTNhq+G2OA8FhcibSXyRxI5XMHfURTH 5BPiKT0Dx0V6kr4gMd+4YCU67N+aAUgVTgV7m28+sY5eVt1w164oBH4mX0hufDuAZdlx +z9ZBfdPRilB5WXGF9W99Qnm7mAZvwo2h3rdRmg2dRZUYh0r1p69gmdEBoVVI54wVV0x TI9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=s0xdX41B; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r37-20020a63fc65000000b004fbd23110d5si20723689pgk.546.2023.03.24.09.32.46; Fri, 24 Mar 2023 09:32:58 -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=@weissschuh.net header.s=mail header.b=s0xdX41B; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbjCXQ17 (ORCPT + 99 others); Fri, 24 Mar 2023 12:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjCXQ15 (ORCPT ); Fri, 24 Mar 2023 12:27:57 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 629C110DA for ; Fri, 24 Mar 2023 09:27:56 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1679675274; bh=w1AtCKbY6nnJO2/ZZs3qGl6Rm9TfeXKRDa5zeO4CX/o=; h=From:Date:Subject:To:Cc:From; b=s0xdX41BeEC7aFzuWR2AZr+zmTWO3NXUfeoruVuO5x4LyiKgF83KbN4Ex52+3tB74 U2AxQhroqYG1XxOlRBSBre19UmAx0etMNNPjCFfH7CV3ZesWZdBE1DCaLSHtmmJJyZ TkWlCUHBnTpuKBLDBP0y/wENAMfLPxk3427KwlHc= Date: Fri, 24 Mar 2023 16:27:50 +0000 Subject: [PATCH RESEND] firmware: turris-mox-rwtm: make kobj_type structure constant MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net> To: =?utf-8?q?Marek_Beh=C3=BAn?= , Gregory CLEMENT Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1679675272; l=1061; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=w1AtCKbY6nnJO2/ZZs3qGl6Rm9TfeXKRDa5zeO4CX/o=; b=JHdCkDQfdyDUYKGWt/2PKvbeMKl+uiEqFhs1/oBfitKVSCNZfm8MMnGDnkfB0zuyxnwg4sQeN neLqzYd443pABVdvR6MQTCxt+tb2FkVRno7zy8tm/Dc5TfLraEk6ijO X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,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 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. Signed-off-by: Thomas Weißschuh --- 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); } -static struct kobj_type mox_kobj_ktype = { +static const struct kobj_type mox_kobj_ktype = { .release = mox_kobj_release, .sysfs_ops = &kobj_sysfs_ops, }; --- base-commit: 2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c change-id: 20230227-kobj_type-firmware-turris-6cd4a66bac19 Best regards, -- Thomas Weißschuh