Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EFEAC61DA4 for ; Tue, 14 Feb 2023 08:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjBNIld (ORCPT ); Tue, 14 Feb 2023 03:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbjBNIlI (ORCPT ); Tue, 14 Feb 2023 03:41:08 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C017723659 for ; Tue, 14 Feb 2023 00:40:55 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id k16so6681264ejv.10 for ; Tue, 14 Feb 2023 00:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fpl2dYq09X1UimTogkpAO+pdBXIqBUdMeEeTg/7qSas=; b=Bg8GgDZY7kilURoRNLSzE7rxV3xwzXlJM55ZH1SFuchlelKg4/Oo2ByXZyYFUPpDax 9Ju6E4HG3M6A+SBoj3mm1DCi5h38nSAxOxQcIVBUwkmszC1uj9DadSmk/AAGVd6B8zHk t70bGTz4hL1S82MoXdc7UpQsOOYDwEqKNbgvLD8Gkrc3zlxaNyieJY/tptgdf4lMKfOl qSHK0ls61o9vzdtYW4RmuFjluOFGVvl3IdigDrnZjuTxDTmdggijPGCfNzfpczqepD4a cz0HmuE6HZUh2La1hs25nVI/K16REIw7eMbVnw6HRdGInSwspQCzAqTkwMCniqKUK1G8 jZYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fpl2dYq09X1UimTogkpAO+pdBXIqBUdMeEeTg/7qSas=; b=zQsdFUlEafFrg8Qadawm9e/71bpZsNmKBUvJeX3VPRl2QwCwENoIDXVaMY0T6AC/Z2 +kiJMdJQNln4qko78GF7GoB82uEyp+wAtJ9HRgmFpoF2d19Q1NjXunrntDadDC9EVLS3 sS4ys8sgELuORNH2G6rVitelYLAI6ADzSb9OsirLA8rchVM+uDDGg8Z0CJ8n6vAG0or6 lLkftH3q97Aa7C9Zb0c78P8KUVD+EuBc8SLu7xQzmgpDx/0BmZ0OKLbCeK6iqCyLf0Iq 4gYs2qeiFOEvqrQXFa6fymGQq5dOTOFZaBmGhoNgNxLHNLUAsWesCZi3jps6vZZ49/LB VQjw== X-Gm-Message-State: AO0yUKV11HOC1mM5NISUPe7gTqSOLqTxUqXj+6appl61I3F4PoQ4xsyb tPb7zgHflkHBdVKplsVIaOfjOA== X-Google-Smtp-Source: AK7set+I//8fpiZU3b0KhszicIsqrrq4SNLouZHvMeHfov9b5wupT38PcfS5I7rS9K0/QE6Ss3FaiA== X-Received: by 2002:a17:906:ecb2:b0:878:5372:a34b with SMTP id qh18-20020a170906ecb200b008785372a34bmr1732692ejb.45.1676364054093; Tue, 14 Feb 2023 00:40:54 -0800 (PST) Received: from [192.168.0.161] (62-73-72-43.ip.btc-net.bg. [62.73.72.43]) by smtp.gmail.com with ESMTPSA id t21-20020a170906179500b0088a9e083318sm7921654eje.168.2023.02.14.00.40.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Feb 2023 00:40:53 -0800 (PST) Message-ID: <0a255859-9ec1-c808-d7d5-3500a6c49386@blackwall.org> Date: Tue, 14 Feb 2023 10:40:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH net-next v2 1/2] net: bridge: make kobj_type structure constant Content-Language: en-US To: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= , Roopa Prabhu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230211-kobj_type-net-v2-0-013b59e59bf3@weissschuh.net> <20230211-kobj_type-net-v2-1-013b59e59bf3@weissschuh.net> From: Nikolay Aleksandrov In-Reply-To: <20230211-kobj_type-net-v2-1-013b59e59bf3@weissschuh.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/02/2023 06:23, 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 > --- > net/bridge/br_if.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c > index ad13b48e3e08..24f01ff113f0 100644 > --- a/net/bridge/br_if.c > +++ b/net/bridge/br_if.c > @@ -269,7 +269,7 @@ static void brport_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t > net_ns_get_ownership(dev_net(p->dev), uid, gid); > } > > -static struct kobj_type brport_ktype = { > +static const struct kobj_type brport_ktype = { > #ifdef CONFIG_SYSFS > .sysfs_ops = &brport_sysfs_ops, > #endif > Acked-by: Nikolay Aleksandrov