Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1602871rwl; Sun, 26 Mar 2023 05:58:42 -0700 (PDT) X-Google-Smtp-Source: AKy350ZO2+zg7+kLxjWetg2Zi/5ze7uQGQ7QMCDAJiszNaeLgvaJOxeLNlsuM2sV8Vq1DVZCBdtQ X-Received: by 2002:a17:90b:38c1:b0:23d:3761:6085 with SMTP id nn1-20020a17090b38c100b0023d37616085mr10129006pjb.34.1679835522302; Sun, 26 Mar 2023 05:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679835522; cv=none; d=google.com; s=arc-20160816; b=ODDCF+l4vuQOsvJv8wTtRFfbhleogOnP/XKecxVomJFkg0oPdPKoKEH/Os5ds6KxqL 44I8/VAvOGF2SbGWa8UMw5ri4s4vtONHCx76weHhPm4YhEb8Kq/8rSrL3EFJuaxOBTae fyHSY9wQ7NF5Fe28AQmbdG3GiE0Y7TzWp/kywAms8hZVnIgWRTBd9YwneAOXvWJeC0bC whXzmr+VxX+4SIYUXcUekmLMA5+pp2/tv5atww9GPwRHubuA6bpmpb/29UJ7W3Q3bF4F aCEBVa6+BBLcO493xKgmAhlVHf7yqCNigniuY3SXm0CCVvy0GdClrhNB1cijj9cEX7nc Z+JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qdZLqPBMc+mEuGUfVieL++X6tZPYRc8cIgJAXggSEYE=; b=EeSaydYNbbfRBzJMFXdq5rPBDFAsXZc/r857yUg/t9adY42I+IYvCds8zqlOb/zyNj aAegqFTRvARBcKlIKwHCVeN2op0HFM6La1cdnbYd6QEx2aFpRLFPjyTowVhDQvvKMCs2 m2yQ2b3UxZ7d+whTF7foTLbMSzjZyIc4wPyR2lBqG4laqN431UaTFYj8u3YhOknhXOre bx0/JFvYERr+5mV6R8MtvB2LezGXmP1egG+b2pAHV+IDFH3/P7YTYkEf3QokmWwWzMhj XwDSnpHao+sWYjxim2FWgoyaWHmH7IW2kQYIPD/SLdBkWC4C/SE4JyolXlJ5hnI3l/vn sbdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hN5Pfo5D; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh11-20020a17090b4acb00b00233e9243c88si4094982pjb.187.2023.03.26.05.58.30; Sun, 26 Mar 2023 05:58:42 -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=@kernel.org header.s=k20201202 header.b=hN5Pfo5D; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbjCZMzq (ORCPT + 99 others); Sun, 26 Mar 2023 08:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjCZMzo (ORCPT ); Sun, 26 Mar 2023 08:55:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AE09421C for ; Sun, 26 Mar 2023 05:55:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EC5FB60ED8 for ; Sun, 26 Mar 2023 12:55:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B81EC4339C; Sun, 26 Mar 2023 12:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679835342; bh=ubdl5TTM9L2aMksryZTZ6yEHbF8j+VsWvgFdWaQW7WM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hN5Pfo5D7EmPv5LUn7mTqJuS8aK2pJ0J8R29SOjUw+txKABL+NK5l9YX5wO9o/Y5A b7DusX/fKCO1kww7hWt8Zt0ZVHWR3fpDD34I4sM1xHIgrV6CeaujaYocrGu/Niw0Ax hihj5pLtu0+nGLx+PI+vJvGaqyqyfRh0PR2S2B1kWZbu1CHgGLTqfnwoJihqMIcmIG JZBELZyOgxjlDSNz54u5SqPh65KIN9gC3OVFYw/zm7Y2TiHuI2JzbPiySU/BsCKQk+ +XtPchcTCVMfEHY/F1MCVgajTs8WXlHlzCk3Pz/Ok369H+NbuTMKkUqVamMYo+bH6X PqBS5+W0+3cDg== Date: Sun, 26 Mar 2023 14:58:16 +0200 From: Marek =?utf-8?B?QmVow7pu?= To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: Gregory CLEMENT , linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] firmware: turris-mox-rwtm: make kobj_type structure constant Message-ID: <20230326125759.qhq62wjaeu75rd3j@kandell> References: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 Didn't I already give reviewed-by tag? Reviewed-by: Marek Beh?n On Fri, Mar 24, 2023 at 04:27:50PM +0000, Thomas Wei?schuh wrote: > 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 >