Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4519039rwb; Tue, 8 Aug 2023 09:35:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5sDGBQ7dfMRvDarQYbMrI00QGRv4c8vTkT5IwMcF7BESZFM8ApRF/fcoHvWA9wuKuumNj X-Received: by 2002:a05:6a20:8417:b0:135:110c:c6e1 with SMTP id c23-20020a056a20841700b00135110cc6e1mr38918pzd.7.1691512510934; Tue, 08 Aug 2023 09:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691512510; cv=none; d=google.com; s=arc-20160816; b=sWumOlIbdvf6HadxSdH+pCUv8Dnmsrl/Mr/B5KhhqI0XMVkYK0nm/r+6nbhoWLTISp k5WY/sLFHhSRd9Oc3aTQgCDmp+H/VWcwcZbp4D9Shvk3uzsmnGJN32GFSKcfStsRWb2D ymVGY/CeFQBqx9eD4Y1TcGhOu9DXTE3QsOLgmdc+1EVLNNyv2MIAobfCAnFagz0IS5yI jm2UsW9PtyZDb2cNHoy56gvAHMy/As4cPj/mocBOdnRwWSNZZDkEJ1Pqex7mVojBKU/l JiGn2ldUFCm1VwVh2OS+PYneMnAEqVXcFK4XoQtHOulLCT4REqCjXSaurVxdIKd7rm1A ulbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vnFoBJzHAw06YjuTBOAxRHHHJBXwzl9fM864yY6v9P0=; fh=FnVANAjqeJQyuT7Z8gd0F/NXDDRYZ/8WQBEIVNInlYY=; b=tC9hNlSxJIqKsj6G7hWuSSDipAaPpS2ox569LKgatNZooSyvIVCVfOhQmYgS4IG9LZ 0pZkb9OcMc112OF6sAzOuL2YmpC2C/hUN+5sC3kXQoNt1knN4zxDHcmHw5wIsk2r2axN SGWqOeK41E5ECjwYErIjijo4T+Qv7UKK4rNuaXdetH6jOyNqSwGzCkCvShSyoe46tpnX 7G4QPhr6nf3wZ/+C9YYuKlnTlfALXp8ImMpaAch7UbIp4hwJvM1/IOsuAChXG2/IPDo7 DLV0NpxI3INqeWx+VhYZBVOeojFNsE3VIARCGNtePrbI6c9369RhxICarX8MrqWWA6vy 1pKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Y5pRYOYJ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x184-20020a6386c1000000b0055c79555b97si7362410pgd.876.2023.08.08.09.34.58; Tue, 08 Aug 2023 09:35:10 -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=@broadcom.com header.s=google header.b=Y5pRYOYJ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232077AbjHHQO6 (ORCPT + 99 others); Tue, 8 Aug 2023 12:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232209AbjHHQNl (ORCPT ); Tue, 8 Aug 2023 12:13:41 -0400 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D3194204 for ; Tue, 8 Aug 2023 08:47:51 -0700 (PDT) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3a751d2e6ecso4668817b6e.0 for ; Tue, 08 Aug 2023 08:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1691509670; x=1692114470; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vnFoBJzHAw06YjuTBOAxRHHHJBXwzl9fM864yY6v9P0=; b=Y5pRYOYJEHlcQx9dUz0woqwclIvFKb4X9OTExcM189RE1plDl1UhrBnnfPv6SRFRwm E7QPgn8zopdx18tGcfCTlplCRBJydkxusnZryCYM73CzrQ3xy89xDr28PhxNcC+ZsSGa kOwQBn+P3HUwXbrGvW7A5PY+I1JdJy7bY++1s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691509670; x=1692114470; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vnFoBJzHAw06YjuTBOAxRHHHJBXwzl9fM864yY6v9P0=; b=ZiZdPO6QpRzSxi34jDcya3lhrxiHJn6az4+c527qclLDpKTcJD/Iaj3UPparnMvjxw 38cvK4psU4iU9mFfl2OBaWeKzxjkJpRd8zddy7LSmvB7rSRPe3NqjeeApl4YjmcordfG iig4kGcRbaSXCst9i8QcfqLrM2ktvsy6UYsOgOtjPSMeAzLtA64EaNx7WZE9Qg64tyqb Bi/VxOxjdWR7LfgD/+KHF9l78Zmul6VnWtC71YcXZAzEdnopuVECT/0V+gTPJDnseV9K lCAHLs+KLp+Ra7jmdsMvEjiGCumcGAosNCv00xRrPAU4JT4UPodxuJreLLCgB7zSfQm1 M3Ug== X-Gm-Message-State: AOJu0YzIqotIVxVPopovM+Y1bRBkJXZQIIeqmbm2L0IK3vuHIKbjr89R xrXMGBC9k3ShR/A8+Et96wneqS8QkrOaqSwxJEWrk0sbnv+6IQO+Udq5kA== X-Received: by 2002:a05:6871:522c:b0:1b0:883e:3095 with SMTP id ht44-20020a056871522c00b001b0883e3095mr14451636oac.56.1691484379911; Tue, 08 Aug 2023 01:46:19 -0700 (PDT) MIME-Version: 1.0 References: <20230807091347.3804523-1-linma@zju.edu.cn> In-Reply-To: <20230807091347.3804523-1-linma@zju.edu.cn> From: Pavan Chebbi Date: Tue, 8 Aug 2023 14:16:06 +0530 Message-ID: Subject: Re: [PATCH net-next v2] rtnetlink: remove redundant checks for nlattr IFLA_BRIDGE_MODE 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, simon.horman@corigine.com, 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 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000000c5aea06026b49b7" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=no 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 --0000000000000c5aea06026b49b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 7, 2023 at 2:44=E2=80=AFPM 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 i= n > each ndo_bridge_setlink handler function. > > Suggested-by: Hangbin Liu > Signed-off-by: Lin Ma > --- > V1->V2: delete the link to last commit as it already in tree > Acked-by: Pavan Chebbi > -- > 2.17.1 > > --0000000000000c5aea06026b49b7 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbQYJKoZIhvcNAQcCoIIQXjCCEFoCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3EMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8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