Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1963576rwr; Fri, 21 Apr 2023 02:06:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ZRmMmkxmbm9VbVqFcVKUEfvU0tPFNPPPwPGA7dqiulT8v4NG9QimqP9WiVI4b1PjTw4FJ0 X-Received: by 2002:a17:90a:9285:b0:246:5787:6f5d with SMTP id n5-20020a17090a928500b0024657876f5dmr10481108pjo.10.1682067985201; Fri, 21 Apr 2023 02:06:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682067985; cv=pass; d=google.com; s=arc-20160816; b=mjfgvS6YOGqb7ADrzHj0ur2oB/5+6jm+uZmTxFNyddUsw0lB56ZXy1gpPG3+2gP9uY MCXHhSFtwPkSEv4Z/PzqA2wdro+TFfoJzV9Fc/33ZwBuqDkkZiqcBUVNOO0ftkgsSzB+ M6OZx2xrslCtLnwtrqA3bEqz4zPNQGJ13D9z+/IXnWPKAJ9pLbyIxirbFy9e+MR2bolP 1GEJeZIg/mCMJnd3HUO2xkR5o9ACHvjhJMZG/XUkmjz5OUwceNtboTrpOR8cdaCHCHZi TFI/hzAgU2pY9NQYGzbT1+us+uLk8FopZB/ZYdOu/jyUl2gSha+FoGrXSbvoKclVUtFE xYDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aQNXjXUOuOfNQ22c9rAV7qhXRXXarc09AHBsnEhqrSE=; b=K1zJjFrq9zWrdmo/GtaRmZ02e9GF2tm7TYA8H2xzcRjpAQk46+hLzgi3dzmBd6Uxb+ L1PppW/B+Ttktp/dTvgzMmM5BqUgQHrRMCJiCKj2SOZhI2MCf000LO96asRg0kYdUmto Uk48I1KsapYq8jPaOjgfRi0ljH6yfVQ7sk6Vpdz/xSSFY6012RE1LrP1FlQqycFWHPTL 3z7HThBluSRbAIFB5SPGk3jwO2hiwBMIP9YulaWjBFs+h2rsNs7FhoYc1ipejPzxUYLW MsBMEwHcl1x8R+WhblRRJFSMbCY2CEr3Y/caGKu3XPe0Q/fiOEixXxmEc2FLRHEOHZVt 0BBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=pzfMce0x; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a17090aeb9200b002474701edc0si4033755pjy.188.2023.04.21.02.06.10; Fri, 21 Apr 2023 02:06:25 -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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=pzfMce0x; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbjDUJCL (ORCPT + 99 others); Fri, 21 Apr 2023 05:02:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231506AbjDUJBs (ORCPT ); Fri, 21 Apr 2023 05:01:48 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2123.outbound.protection.outlook.com [40.107.94.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916963C0F; Fri, 21 Apr 2023 02:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e0bHgd+LZ08dq2HJzUjB3J/M9gt4Yo0rgEJ+/ZLbSDxsdIy6HarPU2cut98jOgBtnUS7lG06gtzhsRcXRd47DXVc7MJGldPYUKcRIPeNBdtED/DxyOiI7fd2gTeaHxqBOvRdiw0NIYhmDLzmu/jLF6y9pKEvS3FhG4Prp24Qk1nO5AEzP/pmrkKTVXijseqmhqvOZ5ehdzsHYvs4NYqZI3rKZ6csxNANO4bXDlsEtJULdeP4LiLIXxEivv5lG4cKygoiimUFc6VzKZXO9dD771vgWpAKhXcXvON8BQgQHNEIBqI79CKGF1ghwad40gCvdRWnPowg+tmvFQjDLLO3Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aQNXjXUOuOfNQ22c9rAV7qhXRXXarc09AHBsnEhqrSE=; b=KoLgOMBWa/CcLF/hrvTNSQfb9ok4rajUFE6XlBrqlJJorPqhOrgQX4oCWdUht91KdUMEa0ZflSkOujfKwCUPwDTbZoMrlm/cKBFZMeMdWXbFbKw5IbqvBtrdP80+nfRt395HppiM/1K8aKMpgGA8dfy2hEpTlU2yq/CKYSIel8QcWAjZLIdWdxRBomwgc6gEThsAtpeZpncPmWyK1bSVRISepnmOGM9sI/2DOon/qd5XeJ83ttVjclSo071aqqiBRgIBQOqGpX7lIP/KKFkZAZnsTP97arc7SS22AwPplNzCbZ67Ux6snjrtwBg2r8UkqI4zN4hJsLQRDZRJaYXMDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aQNXjXUOuOfNQ22c9rAV7qhXRXXarc09AHBsnEhqrSE=; b=pzfMce0xh3Ycx8CTNNKL14tMCvrxeHcDcGm0JYVXO8l1Gs7boKnWv442P2AIGKfQt0WG9QR9ugFADkkezDioq4tS0ssxPKyzy0uAN9Ftkq/G2sQrnxv4iw9P0idrj+ccEXEAucsJafmLxZtZxKTTLRvIwpPH8R0ciBz33pewEHU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by BL3PR13MB5161.namprd13.prod.outlook.com (2603:10b6:208:338::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Fri, 21 Apr 2023 09:01:44 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34%4]) with mapi id 15.20.6319.022; Fri, 21 Apr 2023 09:01:44 +0000 Date: Fri, 21 Apr 2023 11:01:36 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Michal Kubecek , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Xiaoliang Yang , Petr Machata , Danielle Ratson , Pranavi Somisetty , Harini Katakam , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Ferenc Fejes , Aaron Conole , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net-next 1/9] net: enetc: fix MAC Merge layer remaining enabled until a link down event Message-ID: References: <20230418111459.811553-1-vladimir.oltean@nxp.com> <20230418111459.811553-2-vladimir.oltean@nxp.com> <20230420170354.n76b53ws6bitcoj2@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420170354.n76b53ws6bitcoj2@skbuf> X-ClientProxiedBy: AS4P192CA0019.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5e1::8) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|BL3PR13MB5161:EE_ X-MS-Office365-Filtering-Correlation-Id: c3c488a0-c24e-47b6-08cd-08db42470738 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H0uz61Uq1j3aVekvscYfCqnkvQwriKpgTsLXf0OUKQXwZj3nnZRw5yiMvqRTRBmZhZUc82io0G06SYtN7FE2pnjad1lXJB7EkHr9svX7Kpg/kw8VzrcjU0rotIWf9eBQtwasvWFhAEP+pQoyljGZwQK7g2kywvrt2CNYTqGhVaARzd11DlfwBwufUkgoxlNFBXGJFxyTUqAkaAb6F1+hpQA2JGsP8VnDWcCt65ARcy+98E/PoJPqzUVJmq+NKS+rhGXePmfntlviYZhEIFbENp5R/zXOSyXXbaQ0CJqOla1New298jA8R9+r6BLNgHF5BZklanN0XPQ1fZfwzgJyYT55thiCrXjGtJKQg16wts8Vc2wRW3ABbCyW9Jlsu08B/ylbEvmPpIelpShkxcNpuJ6s3JdlN0mPFRhuK8eJ1QjmbbF2qkV4gNbfIz7LHbJDPNlZ7/53GpD86GdPuLvOJru8vviXoGMrOq28b2o+KYFl1o8/pDfTgta4EENT+r4gsPdRwgN2qgqbS1xtdUUQUguQpTT9tuuWOhK4RDaaNtWmA2t4JOEUNIyAysnQ04tp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39840400004)(346002)(396003)(376002)(136003)(366004)(451199021)(36756003)(54906003)(478600001)(6486002)(6666004)(41300700001)(8936002)(8676002)(38100700002)(66946007)(316002)(4326008)(66476007)(6916009)(2616005)(66556008)(186003)(6512007)(6506007)(86362001)(44832011)(2906002)(5660300002)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IoiNWkVsZVORxSIOnFlke8hkRWYC4smmpQf07cVvlvPzh7OrYoopk2r4eB8s?= =?us-ascii?Q?4qf41kbmyl6GPbUM4Ray1wkQSBvfn+ubXKBP8hYYuCSDGZok9HwO+HDY+nGP?= =?us-ascii?Q?BZjx/G+jKPLSH2NZpkAisNjvuuFt0+UblAo0bhybJss9/pwT0CEi6jEQoczT?= =?us-ascii?Q?Og5+SF037R6/PKbKUVNhsr9ropYNfvgOYYLy0nkCkQBNYGOosbXzztyeE9CR?= =?us-ascii?Q?3f92Y82snq775fTGf0DQApNAfRYECvSLynpQLzIF5gB4tbhpKgVjzfZPSonO?= =?us-ascii?Q?tK7sSkV4TAG2Zjqevl/TMblo5ePkwz0is64OWFnVMd2Gfx99OZT9p9MZqcn2?= =?us-ascii?Q?sl+yD2b67k2GQTjxjgmHMxUk7p7g7HVvwlCzuu/1RNCYA0TjG9N4+rZpZfRb?= =?us-ascii?Q?k2wIXo1ZqLcVEG1bhtHi79ctKUk0m0s0nhj/9KIUsACGpf53KzTcsvifSc+U?= =?us-ascii?Q?MIFc1lbI69MK7KySaX9yekCXSVarhLo8Jok370mtiP42QLqE9W1tsxyzy1gh?= =?us-ascii?Q?rmSb8t3/3c1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s0F51l2p?= =?us-ascii?Q?lNDEUgDaTLmNFX3h4EiGQMkkQzEhEgZDQNPbKFvim076FwX0MBy9kkH68R8G?= =?us-ascii?Q?sfgjoDlzJm26bztkNy/ozqBYkMojkxemLKcUDGb6UK8LlRw3da3SmWwYtt7F?= =?us-ascii?Q?WpjConI3zAlRJNUAhOFbb/aH0taBlerGX9Qn8IguGZkRCt+B7MKEC7Aw2aWz?= =?us-ascii?Q?RZyTd3NROv+sDuLzy5IT3W3mDcn5xeioMDOld115KwpOuPrMEi167jryUfZJ?= =?us-ascii?Q?ZPEOOA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3c488a0-c24e-47b6-08cd-08db42470738 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2023 09:01:43.7321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PIbqg9N+gdxx/UoRGddSR7vy8avuryFGZShHowo9jx17Z0PCvNRAM6on/esLfQeS+OMhuenMD/ZnLc9oMZ2FyoQNbU4fNTgBUy2HrMpv5A4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR13MB5161 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Thu, Apr 20, 2023 at 08:03:54PM +0300, Vladimir Oltean wrote: > On Thu, Apr 20, 2023 at 04:22:04PM +0200, Simon Horman wrote: > > > - /* If link is up, enable MAC Merge right away */ > > > - if (!!(priv->active_offloads & ENETC_F_QBU) && > > > - !(val & ENETC_MMCSR_LINK_FAIL)) > > > - val |= ENETC_MMCSR_ME; > > > + /* If link is up, enable/disable MAC Merge right away */ > > > + if (!(val & ENETC_MMCSR_LINK_FAIL)) { > > > + if (!!(priv->active_offloads & ENETC_F_QBU)) > > > > nit: The !!() seems unnecessary, > > I wonder if it can be written in a simpler way as: > > > > if (priv->active_offloads & ENETC_F_QBU) > > I agree. Normally I omit the double negation in simple statements like this. > Here I didn't, because the expression was split into 2 "if" conditions, > and I kept the individual terms as-is for some reason. > > Since the generated object code is absolutely the same either way, I would not > resend just for minor style comments such as this one, if you don't mind. > However, I do appreciate the review and I'll pay more attention to this > detail in the future. Thanks. I agree the result should be same. No need to resend because of this.