Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37177822rwd; Tue, 11 Jul 2023 10:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHk+g7zXXBC3AtmFXBBITiVz1UKNmo/YLLtg6MWV2SweSPpPRB2RScTFRHv9T1Av7fJfKs4 X-Received: by 2002:a17:90a:c584:b0:259:a7a6:26f9 with SMTP id l4-20020a17090ac58400b00259a7a626f9mr27519397pjt.21.1689096251927; Tue, 11 Jul 2023 10:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689096251; cv=none; d=google.com; s=arc-20160816; b=0RcfG7qIFqgKsEIZYuyA27OjkbQpoPtrPZOjVJT+KyGAC8MJmwXAXHOuMCUVpqsgKe KXlol3zEfdDT3FVsqp1LnK+fHn2QGeiCoLsLDno8e0D+tcvaucVYRiWoSvIEBtOGHYO+ 3YDXPshvNW+rKGQogz40KnqoNPMKDRNM25AzKf5R9wjKkCvQQ4rgA+jz/BmWLLJHaG6a vQEEI4T6WZoxs5mpkJstC2J4Sl0zCuXAB/tOfY5FY2cCOs3Jt5DEM++AsnZuabiQVjtH OTDwPnkSdbVTnlzYw/OeID3JeG0QHCcrRqUTxId8oln8NnQLW/LssuC5YE+NeTX8M7GY eQNg== 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=5FhoFE/bLmIF2s4EasNIfzETfo6IH+Lt0c0iUR+fCQQ=; fh=hXtGuEA05zkIvTZUgMtgz55njjZkjQgo/o+FAeiE56I=; b=Z4qNGGhy6erR05qjiB1Kg3EzZgfwvefGXwOUpR4pQLSZSiHLmVfEtZ6wzIIO91sW6E slddT/VvZ3NYgFZ4/INSztw/HL5GD/VRizCruVv+hEdPzkbrEovSSTnHrMmJv+sTNyKZ 3z3QRGUXmB9ifCk1nO8XNclxgPW5sMVCJnvQ7YDEB3iILbMlAL1MPv2IKwrtnoP1ov3g P7Tw56uYERWqbKJIbM+ANcMUm6zpxF3ewRoYwIvVGtLoaFIZN6Ov6l3HNHsPIFsqmTXY Rj29JdhRyHjKZ7fKdYiJB5P/Qf9SRyh3oRtEl0n3+bEVpjUpqeCSYHLCGZC3paKaivCS zqpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S32dMWGz; 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 oa3-20020a17090b1bc300b00262cc4177ebsi10058959pjb.160.2023.07.11.10.23.59; Tue, 11 Jul 2023 10:24:11 -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=S32dMWGz; 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 S230313AbjGKRLF (ORCPT + 99 others); Tue, 11 Jul 2023 13:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjGKRLE (ORCPT ); Tue, 11 Jul 2023 13:11:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B5D7A1 for ; Tue, 11 Jul 2023 10:11:03 -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 1C41C61584 for ; Tue, 11 Jul 2023 17:11:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03EECC433C8; Tue, 11 Jul 2023 17:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689095462; bh=InfyI8SICKvF4zmJpauBWDNo/zPPdtTLtpODWeNYZJ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S32dMWGzpZI0vlWdhqWHPysllb8jt18+0TZ9/J6/kdL5p8gbnh9eiPh2pkxP+RwDr d0EN67ZYCRaVoqoGTdUn7tSaPbpFLOvIKB9W3RfO7Khnv/gc5uueJyhHejEN0QUEtp pIyQddscMT7tKiSD9x3pG9DciqYaTJHBdkJJC3KpKwgrjuvUf6W/QY5q9XxkZ/Pi6L 1gBsJQrRHm4KyQfkOzRIQfxTcHDyonHFTlhpw5HM9BDRs6j2HX+m+JAAOzoLO50WgT kTSiEJqjA5aP5GKAdjVoyApZESK4B7ir78UtN6hH91vgx3PoLSGiIsfyDB0tfShxUw r4Qhhl88+yrXQ== Date: Tue, 11 Jul 2023 20:10:58 +0300 From: Leon Romanovsky To: Andy Shevchenko Cc: Paolo Abeni , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet Subject: Re: [PATCH net-next][resend v1 1/1] netlink: Don't use int as bool in netlink_update_socket_mc() Message-ID: <20230711171058.GT41919@unreal> References: <20230710100624.87836-1-andriy.shevchenko@linux.intel.com> <20230711063348.GB41919@unreal> <2a2d55f167a06782eb9dfa6988ec96c2eedb7fba.camel@redhat.com> <20230711122012.GR41919@unreal> <20230711133259.GS41919@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 Tue, Jul 11, 2023 at 04:44:18PM +0300, Andy Shevchenko wrote: > On Tue, Jul 11, 2023 at 04:32:59PM +0300, Leon Romanovsky wrote: > > On Tue, Jul 11, 2023 at 03:45:34PM +0300, Andy Shevchenko wrote: > > > On Tue, Jul 11, 2023 at 03:20:12PM +0300, Leon Romanovsky wrote: > > > > On Tue, Jul 11, 2023 at 01:54:18PM +0300, Andy Shevchenko wrote: > > > > > On Tue, Jul 11, 2023 at 12:21:12PM +0200, Paolo Abeni wrote: > > > > > > On Tue, 2023-07-11 at 09:33 +0300, Leon Romanovsky wrote: > > > > > > > On Mon, Jul 10, 2023 at 01:06:24PM +0300, Andy Shevchenko wrote: > > ... > > > > > > > > So what is the outcome of "int - bool + bool" in the line above? > > > > > > > > > > The same as with int - int [0 .. 1] + int [0 .. 1]. > > > > > > > > No, it is not. bool is defined as _Bool C99 type, so strictly speaking > > > > you are mixing types int - _Bool + _Bool. > > > > > > 1. The original code already does that. You still haven't reacted on that. > > > > The original code was int - int + int. > > No. You missed the callers part. They are using boolean. I didn't miss and pointed you to the exact line which was implicitly changed with your patch. > > > > 2. Is what you are telling a problema? > > > > No, I'm saying that you took perfectly correct code which had all types > > aligned and changed it to have mixed type arithmetic. > > And after this change it's perfectly correct code with less letters and hidden > promotions (as a parameter to the function) and hence requires less cognitive > energy to parse. > > So, the bottom line is the commit message you don't like, is it so? Please reread my and Paolo replies. Thanks > > -- > With Best Regards, > Andy Shevchenko > >