Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4638245rwb; Tue, 8 Aug 2023 11:18:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrQSSReHM4BRtSwgQotJYlvV0mVilFLuWYUJnB5JT8xqy9bpKxFWo5FcOZ0+u4YXn2sU/M X-Received: by 2002:a17:90a:38c5:b0:268:1e9:53bf with SMTP id x63-20020a17090a38c500b0026801e953bfmr316080pjb.37.1691518737817; Tue, 08 Aug 2023 11:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518737; cv=none; d=google.com; s=arc-20160816; b=1Je4J4XoTuiNDfYMsrnssYnvvURsVIggPN0Te1AJMM3Sm3RWmq03qapjEGf7PpHds5 BDeVOvYePYmPVw0wGn79KLxm6IDrXrSNDnHK2JUT0NPXQqqLGOWLWtIY+23LIKsV8oQI 2B13rZrElTE7b3A+unXza5iZ9vs03Cnx59yoPUrHmtl0qZDGiC+OD+6vaIuVWChzHxH2 TfAEZc2rJ1c6TBtM53N6XZuo9qZrIB4rojDDKYfJytJgoSR/hq5QDmlm9ePdGLArIqMH 1YURPdx3JeniIKTq+p6cnx7gahCYnA63mamU77u9aj4/kWLxljILSlXOFtz1DZg8nCSQ L9/A== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cnZf2WGZSvflJB1FhzReIffiJtMSAaUi4LWxGLsML8g=; fh=CS27w0xjHNyTFBYg8lvVXwxLlha70z3Augj4vr4SX8g=; b=nAi6ScCX1/15T55IqHpAmqDnQxqXQ46AglH0I/Nar/5i6iEQxLSsdDilSfRustYnlP 00HJq4EfBNj9f7eW8m0OjiYVeGO6CR9s8QxiRWOowbDdanrkZG8QcR7rU4r/VjnBdzL2 jGs+ABV+0IaPPrIiolIU4dcbHSWb2el6BhrftoIjUn3XmIkr9cj37J7H4MWREg65MBCX IKB9AbtkJrPgl9wwBGTX05xbeXryroNXRmv2V0gcITODouaZ2aJffGHu7Z3dKnN3pnCW dgKGkVFXUMUKJzxDOKt2Dzhl55xHsw5ZK+fUbw3DJZIYX3Gmu3cW/vNIJoMAs4Z/z1BH do4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bv6idbcn; 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 g2-20020a17090a8f0200b002634cad1d64si7575789pjo.75.2023.08.08.11.18.46; Tue, 08 Aug 2023 11:18:57 -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=Bv6idbcn; 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 S230282AbjHHR51 (ORCPT + 99 others); Tue, 8 Aug 2023 13:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbjHHR4v (ORCPT ); Tue, 8 Aug 2023 13:56:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A6B2AF13; Tue, 8 Aug 2023 09:25:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46A6462531; Tue, 8 Aug 2023 12:46:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B258C433C8; Tue, 8 Aug 2023 12:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691498789; bh=bwqg+nZJaOp58U9gLi7+hIbzVoD6HWVrHABj3u2osQ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bv6idbcnou7dvWv3pfCSTobSlZ8fXVeIw2yMmJVRggQHuTlgeo+lUsF5L8mUAfrxw Fb2BkRhuXr61SboC+ZUEBawjWZCulZnmjCs4zf47NOf4EXTLrZlZdXPLIYTdZ5kBGA YdPp9jZSZ0hSZQYFhhy0b4/5OT6RjvfsYvu4qaZ1cKuY54iLY8SbN3WArnkfzPxntX PsuYgLY/tsgFrUsjKdyt/eicIpeXIqk1sy66Iw0BblMhZoNn9tCT4MJJr1JexQSgfA dd1N2mGvCM08nCLESVFn3n3+mWH9CqCwu/xITCIqguMtve2XtiLfah+dEHIN/rNpJw l1P1t+mmv4g1w== Date: Tue, 8 Aug 2023 14:46:23 +0200 From: Simon Horman To: Lin Ma Cc: michael.chan@broadcom.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, saeedm@nvidia.com, leon@kernel.org, louis.peens@corigine.com, yinjun.zhang@corigine.com, huanhuan.wang@corigine.com, tglx@linutronix.de, na.wang@corigine.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com Subject: Re: [PATCH net-next v2] rtnetlink: remove redundant checks for nlattr IFLA_BRIDGE_MODE Message-ID: References: <20230807091347.3804523-1-linma@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230807091347.3804523-1-linma@zju.edu.cn> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Mon, Aug 07, 2023 at 05:13:47PM +0800, Lin Ma wrote: > The commit d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink checks > IFLA_BRIDGE_MODE length") added the nla_len check in rtnl_bridge_setlink, > which is the only caller for ndo_bridge_setlink handlers defined in > low-level driver codes. Hence, this patch cleanups the redundant checks in > each ndo_bridge_setlink handler function. > > Suggested-by: Hangbin Liu > Signed-off-by: Lin Ma Reviewed-by: Simon Horman