Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36912793rwd; Tue, 11 Jul 2023 07:14:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlH3XqcHH5fj1VcK8qht16X+X95mnQlLXg3bA0UMEYWY+cyGZU05QbCJ1WmTMfJLvZjWmaD1 X-Received: by 2002:a50:eb03:0:b0:51d:d450:cfe4 with SMTP id y3-20020a50eb03000000b0051dd450cfe4mr15372246edp.22.1689084886698; Tue, 11 Jul 2023 07:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084886; cv=none; d=google.com; s=arc-20160816; b=WepHqSHjJiqdvxNmvTOt2idnvALkX42OYshYvIk4XONrja4Tk65Pz22RxISsCDjCgB qKQPvSL9G2t1SeIusEslXN4qNQXMtzUkY2UdvfObwFmLz/pRD2JY76aFRl3XI1UEr4ot mp+CI8L8j3Hb5zxLLdtNXs2BtSiMJBFWDD0zk8JfQgUgD/WTbPmDIJ2t9W6zzSyQNioC rBvktJ28Q1eCUdvs2KbWTughS5RbzUV2imCE54Hd136LL2we9MvjaORKKojeCiSyR8xM nZ+LSu4jc9Z/lM3wv67WdHAC79WmsiYfHu2PEtK1+qDbNw1SAE5fUgVVBnqwayClT7og 0rrg== 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=4T2Gn+wwQX4vDEZVbbeq0oxRPaAuz9c8Ha1D3ZW0fO0=; fh=hXtGuEA05zkIvTZUgMtgz55njjZkjQgo/o+FAeiE56I=; b=DKxGYNqJp9U8Q5TP847wfGN0KBWCyw3my2M/yDbbSDIC5UjmkVEsKb2EKZmdOMzNS+ jlOhp5PHwJDGbNsepPGdrFggqkxQgqIGWhmRVKomU6MurEVlyEcUccAufgMgZH6Nhdnn sDV5RIZ9z3QYwehDU0FNK+TcSPpDvbUdrRQBEHBZL1Wd1jT0oGNGsjlZ+q6DhTEmYucg W/176711MfPsUe8uLJRGOQN/bKFb10DEqEO82+pHOkxBLvQhE60foV1X0iM/87lxOOiJ b0sqrfQJNgdFr1q0+0p7fQa4ef85i1E51O8SG22AksAVAbCG6lQ9gdlbkulOPgbrUD77 1/6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mz2lgffX; 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 e11-20020a50fb8b000000b0051e0ce77ffesi2098154edq.406.2023.07.11.07.14.21; Tue, 11 Jul 2023 07:14: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=@kernel.org header.s=k20201202 header.b=mz2lgffX; 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 S232158AbjGKNdH (ORCPT + 99 others); Tue, 11 Jul 2023 09:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbjGKNdG (ORCPT ); Tue, 11 Jul 2023 09:33:06 -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 607AFE69 for ; Tue, 11 Jul 2023 06:33:05 -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 E92FB614A9 for ; Tue, 11 Jul 2023 13:33:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9A40C433C7; Tue, 11 Jul 2023 13:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689082384; bh=JLpKJHGa4QT4OzQjT4GJbvB8G8yu+7yongiCOHpJjb4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mz2lgffXa5p11q4yQlij2u45AJ1V1F6jqyyUPP/+AAZ2UUOIV44u7fczefkjDjVRq XNXuuWCzgMk4ePmc2l3jCm0Q2s8ZoBHnxbAwrG3LUpbD2kxcbZyC/hCpU3uP1XRIeu ENDl4OaGqPDwhwhnHQCT/wg5K9u7Km2z1IM/GJR5htz/b8as2EseYJVS2mLqqWmO+N 1rgBM9LIhXq9mac5rXbBNyU/zNQYHh1LWB6lZrgJVXpXxpd1VA0BqSkNAGLJWJM7fQ JU9lkFsF4/0OdfKXcKRO37CO5P9fqWEFtUhPoyw1FT+bDxR9OcRiNm2WefpIO8FkyX 6S17+zpIfpDsQ== Date: Tue, 11 Jul 2023 16:32:59 +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: <20230711133259.GS41919@unreal> References: <20230710100624.87836-1-andriy.shevchenko@linux.intel.com> <20230711063348.GB41919@unreal> <2a2d55f167a06782eb9dfa6988ec96c2eedb7fba.camel@redhat.com> <20230711122012.GR41919@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 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. > 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. Thanks > > -- > With Best Regards, > Andy Shevchenko > >