Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36915257rwd; Tue, 11 Jul 2023 07:16:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlEiGp2MMczbJDy/6cH9qIF5qvh8ALUwS8IDpqKUiYQM5SozTaUSwJ2v2CvrMvjpWhipOLyW X-Received: by 2002:a05:6512:1090:b0:4f9:5580:1894 with SMTP id j16-20020a056512109000b004f955801894mr15337442lfg.15.1689084972343; Tue, 11 Jul 2023 07:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084972; cv=none; d=google.com; s=arc-20160816; b=XRL3kNzUyUQFLXqM3buWCjI8QIk3wuuFN9FOggsb4z+ptMSce3hXOAYsp7czQLshff nit6pKWVjiCegdM76M8jTzmLu0finDnWWApaQZI/fK1sckm3LS9AT3RfIq6yfXvHdUDK tpYwNhL7L5FfwQ1Mmh5XyLchb+g1YDohgeGb6Y/h2wtw7YCIEwRwQ7lYxfzHcHTeXBSv lcQ0jfJ7BaQumXqsix5MtMkAF2uWaRvoSnflN4TZufrEApJ2NyvvAGsDhR1m+PUKq4ym RlKhjAVXIDRC5JiZ/PXbNo6sDDimRqhzdoDqdAmWU1OyjR6GitZvy4faLgWCiGuDzjzS tfHg== 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=8mXaTXpSmmCU/s5a2oM5HDs3Tr9WQAGBC8AS1EUJUrk=; fh=3s93pn09cuQs+3trOZABSJVQj3Feywhad4sG9F69afQ=; b=Iz++2XQh06NV5HK3fex6zq6/r84MEPY7eVzRSCMb0f4EjfzqFT5o/EU+q+VlhazUFt +Wz+FP4AfUWI6hbt4Fc52gxvCxJoDrUMiGRf7lJFGhrGpRQBy0AUgLoGWU0ghAnkzcfY hG0yf+HGWRz6gEotDw28XIIUflVeE4J6HUnRpCgJadI1EOCgpekeP9bdSmNNcIgY8utM NZrhM0INbxstEXe9M3XlYvfy+AQ3vAmcjepkcx4+KdTdLmORMUHlWmmsAImRlIaG02+Z Jcr2aLsM+A/6fGqjXSWNXkzUj5pgsXLZw6Wi2Zv/MCOMZfoY8DmOm9mIBeA/psEMmwqy ZIQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DKj7955h; 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 m20-20020a50ef14000000b0051e28859bdfsi2346829eds.279.2023.07.11.07.15.48; Tue, 11 Jul 2023 07:16:12 -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=DKj7955h; 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 S232871AbjGKNoa (ORCPT + 99 others); Tue, 11 Jul 2023 09:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbjGKNoY (ORCPT ); Tue, 11 Jul 2023 09:44:24 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6820E10C7; Tue, 11 Jul 2023 06:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689083062; x=1720619062; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9whZIVbPFswM7Gv172Nf0MtfoDbbo099QAczhdHkuAs=; b=DKj7955h4etJM1ghaGmg0Up/EioSo2H37b8dms18W00s4kHL6Hky4eFf LxT7TvRZhJJkJUIWajIyyend457mofbEouqThlAHVNkm7Dt8Sc0PdGYSq 8Ruj3NxRIpecaUzUmbt3UnVd+2aJSvfwYx1t0Tfe8FC00YBtL3k9hiEXK unIerEO3lEkNHTw/CSz75oNuQH9O247+bcmgJgJICpTrUz3qysl8xe5nD tU2Emjf2Oqbbj7MHQv7j+AaZhVtK1foAhXrDTssThpArUqv6qvB4gSuA7 EL6GWa428wY2cLF1w2JViX27kdgm7AcgnzTa/qx4D7jxQPOtSgpKhkIBe w==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="354483878" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="354483878" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 06:44:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="750766091" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="750766091" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 11 Jul 2023 06:44:19 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qJDf8-001ra6-14; Tue, 11 Jul 2023 16:44:18 +0300 Date: Tue, 11 Jul 2023 16:44:18 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230711133259.GS41919@unreal> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 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. > > 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? -- With Best Regards, Andy Shevchenko