Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37202314rwd; Tue, 11 Jul 2023 10:46:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbNzh2CEEfd7jXzZzKIVBb9HP/Oc4v4YR+avAnwiIl7akgANqHh1u8z2ATbv0fPr5DOkqq X-Received: by 2002:a17:907:3a0f:b0:982:8de1:aad9 with SMTP id fb15-20020a1709073a0f00b009828de1aad9mr14222275ejc.64.1689097606973; Tue, 11 Jul 2023 10:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689097606; cv=none; d=google.com; s=arc-20160816; b=qHm5uAUjg9DA0cEipvUHeJg3MO6PahIXjEH+Lvt99pz9Q/Tct+0C34DsQeyUDA5gUi dRyR9ipHVKkf/szGuzwVVw2uhxsH/JKDeP5In/GZIv5YI+dmh4S616QeetjOi4vVG7uz KRJ4UuP672CePAmEiFYNHCjGm7Va/YGbQxlH2DBJQSLuVALwxQiUkBLNdLoYGxesiRL2 pEKDlp+tGSQdGHUAtXxwR9BEW7kwjPa2Lb80WheFvcvQakFpKJdZkuzWh9LP6CPQieEZ TX9NQAmp3KwU1AWqSTsnjoeXMd14i+E3a3KGhLdvwAWKdxAkxw18NzMEv+MhJxExr+0C F+6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xki9dwa1rJM37AaaVy6WSGAKy3HcLSAuRNkE0hFcSds=; fh=3s93pn09cuQs+3trOZABSJVQj3Feywhad4sG9F69afQ=; b=zYNfJPXwAmZ/hHIrQooXi+A6hHnonK5rrPJwyzp0mwWGwN5Z9VLMbR7hJtop7A+Gdv BILMr6Hrx2xgUH6t/uINnPo1GfJnVM/fgbc5McPdQXSU5zHqzKOh1WOMZgL2Lx4Ffdzs Urdj9rxblhZwn5wd+yEXV1RUdVUAytj3vEVq/hS6riNXNHrP6y0BFB529CxwuokThjTK snSYVldou6ltsIzCAAkj0V5hA4gry8Z0tN8oF5+7D/zU0u4dMO+eHgfZdR+1Lgr4LCpn P22NUHoQ/zGlOsfsOq88IAMHW4i7CmluOsmIswzl7b1SO5cHwyVww1gkUiSadmX6v5dE pCTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jYe6aPwV; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a170906454500b00992ca771e3asi2578224ejq.48.2023.07.11.10.46.21; Tue, 11 Jul 2023 10:46:46 -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=@intel.com header.s=Intel header.b=jYe6aPwV; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232848AbjGKRWp (ORCPT + 99 others); Tue, 11 Jul 2023 13:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232949AbjGKRWc (ORCPT ); Tue, 11 Jul 2023 13:22:32 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBCD0E77; Tue, 11 Jul 2023 10:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689096127; x=1720632127; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1iz+vAT80sPKY+3kIN8nS42GeY4BvNh//nVonB/RqM0=; b=jYe6aPwVNYLZP4Ove3FPMamnIx/ZXrkOBlG5NFIr6xwU8fQUnkizwGHa 3IS6ZFEIoknuiMaEkqLRN24EvO3DBmNlD6WjVExiED19Dxro5tK3sxz+F 7U+aVJDwEb8Ck7lQfU4A91Pm7U13S3EURPOUSHz4vmjM0ybTOMKt5yhBF bH81aGc9nukwH/nlXP1ucOpdxLdOTdhaSdaOpwWQ1mwCgixYotH5IkV/W 9BisjjE7rU4tA0s/3G81tB485RYlMKuUfb9EvrrF0WLrfMN8Wiq8nEnqE 1kAaOstp3QrDaSvN83afX9/UR2Icrs/83uCFGxyxPtlaORm4y2E33mvMp A==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="362149156" X-IronPort-AV: E=Sophos;i="6.01,197,1684825200"; d="scan'208";a="362149156" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 10:19:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="1051870165" X-IronPort-AV: E=Sophos;i="6.01,197,1684825200"; d="scan'208";a="1051870165" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP; 11 Jul 2023 10:19:53 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qJH1j-001uQI-2u; Tue, 11 Jul 2023 20:19:51 +0300 Date: Tue, 11 Jul 2023 20:19:51 +0300 From: Andy Shevchenko To: Leon Romanovsky 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: References: <20230710100624.87836-1-andriy.shevchenko@linux.intel.com> <20230711063348.GB41919@unreal> <2a2d55f167a06782eb9dfa6988ec96c2eedb7fba.camel@redhat.com> <20230711122012.GR41919@unreal> <20230711133259.GS41919@unreal> <20230711171058.GT41919@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230711171058.GT41919@unreal> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 08:10:58PM +0300, Leon Romanovsky wrote: > 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. Yes, and this line doesn't change the status quo. We have boolean in the callers that implicitly went to the callee as int. > > > > 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. I have read them. My point is that you should also look at the callers to see the big picture. -- With Best Regards, Andy Shevchenko