Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2567503pxb; Sun, 3 Apr 2022 11:38:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzBE9UzgMk28Rf37jwRNIRnaAos90RRA7lXkuLNkKN3UQLVMfXnyT1A2y6owf/dUlrl+i8 X-Received: by 2002:a17:906:e16:b0:6df:c796:25b5 with SMTP id l22-20020a1709060e1600b006dfc79625b5mr8145335eji.302.1649011129323; Sun, 03 Apr 2022 11:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649011129; cv=none; d=google.com; s=arc-20160816; b=unWa8EC9KVB5kKdWaGlaZeNLPYGmPUvEdJh42/wMZ9dNJWYtrDN00kMkrSAkveKtD2 mXdfijOGIq4ooIYztPLNA+NwMRAloXQsJmI2ziwGeCwBNb14fVbwmwn0DGIZZybNH52t 1bCEuWv6j+DGN7QUiUNdhzs6BIc/QKyugHpwLno0jvU62p5Zpf0xF6h+XESj9vpkzc+i 8agICy5iQey1fFLocqEaWzmYNkNXY3M9qzLt4czYQYp2LQHWDV1G32rIEwjgIidD+gcl ceG3p86WfdxoEML9T201nqgiYF6MMX71urzC8weerdf11N1WaLjJOVXrmvdbr3ifahI9 tZIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=oaN9C0oDq1idmqd2LmsOaaxM8zUlCcCIJMIjqQvndL4=; b=iffTkksFq2CnqIutjaPWRp2yq+irgtA8ZkIhLOXfiiJQVLALQsl42dQRpgQ7G9azeo zFbZZqoQuDHy19K/uejwTgZViv1Tj1Q6TfT2hAENjugOikWm0/RlkvUKtqmoOAEgoVdc ZQuIHBqS+GILslpxGT+cVNwuWlyAUmh8DYjVXqWjnPKY11B3hvFG+pFX+E0ETUjnnS67 jafMtcssNZehhG48/Ybm6CCGvBCbIAuya1UTU/VSMRWmJnObjlrH3p/r0kRUuzNu1zCz OqblN6CgfpnKThwPzBqxMQXD09g47sOrX/yrdj4GGhuiOK4YOxT+re5cPtTmJcwzvqRI EBxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="ea/IE/fe"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020a05640235d300b00418c2b5be1esi6247126edc.256.2022.04.03.11.38.24; Sun, 03 Apr 2022 11:38:49 -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=@linuxfoundation.org header.s=google header.b="ea/IE/fe"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245391AbiDAQ36 (ORCPT + 99 others); Fri, 1 Apr 2022 12:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346368AbiDAQ1y (ORCPT ); Fri, 1 Apr 2022 12:27:54 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 915C4BC2 for ; Fri, 1 Apr 2022 08:58:12 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id p21so3681595ioj.4 for ; Fri, 01 Apr 2022 08:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oaN9C0oDq1idmqd2LmsOaaxM8zUlCcCIJMIjqQvndL4=; b=ea/IE/fe0VT/Rd2tjIq/T5uvj1KigQvyuF63fwmr58Epj4H7G6yUy7U1w0tkzNRX3d stblNmSfNTlJOAyYOqhZUihlV//5gdYlfbG3FJPVku+U8s+os579AyHpvO9YKhFvdXxe 7ns9sglzF7d4QqAVTR+/QJBAyRghLLTY5DvAA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oaN9C0oDq1idmqd2LmsOaaxM8zUlCcCIJMIjqQvndL4=; b=rS/DBewrGs0gLCYDR0PD5OpvYQUGAq73gRdqgLPRitH1FgEowA6mOfdaruBj37kRTc X9/rZyQFtIpmUUX5BS1wsGP/kO2BIGRXFvGveFtz8HksHH8onnEtIoyhe8KeOfY6Ug4o N+w3P8tlrxGeZ7EAWeZpNnsEFou7S1mjzmIm8IV24eYc8pA7l/8gdZfMimYfRlkGxoN5 xG4ZXxnyogMMqgjs2KlIg4u/uH2Tr62V256jS9pQ4V/Ju4A6Qq0j6k2pkl0eW/fqU5YS 08AHrHNpXq3yMlV3r+6m+WTpmN28zX1UCbFr1EAGs92q2WZeOFOcGyFB/kjeopwbZE+9 e7EQ== X-Gm-Message-State: AOAM5323dpT9/QdSG62UsJ7bChGr38QXNcI/WI18hxUEvYVkDL6OVubD lPtzQxwyh174mM6mcuNFEfO/U+KVfKnvtA== X-Received: by 2002:a05:6602:3787:b0:649:ec10:183b with SMTP id be7-20020a056602378700b00649ec10183bmr185159iob.117.1648828691712; Fri, 01 Apr 2022 08:58:11 -0700 (PDT) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id c15-20020a92b74f000000b002c9cc44ede9sm1458833ilm.86.2022.04.01.08.58.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Apr 2022 08:58:11 -0700 (PDT) Subject: Re: [PATCH] selftests/bpf: Return true/false (not 1/0) from bool functions To: Haowen Bai , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Shuah Khan Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <1648779354-14700-1-git-send-email-baihaowen@meizu.com> From: Shuah Khan Message-ID: <7af611e7-88dd-9525-dccc-92bda4d1fb8d@linuxfoundation.org> Date: Fri, 1 Apr 2022 09:58:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1648779354-14700-1-git-send-email-baihaowen@meizu.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 3/31/22 8:15 PM, Haowen Bai wrote: > Return boolean values ("true" or "false") instead of 1 or 0 from bool > functions. This fixes the following warnings from coccicheck: > > ./tools/testing/selftests/bpf/progs/test_xdp_noinline.c:567:9-10: WARNING: > return of 0/1 in function 'get_packet_dst' with return type bool > ./tools/testing/selftests/bpf/progs/test_l4lb_noinline.c:221:9-10: WARNING: > return of 0/1 in function 'get_packet_dst' with return type bool > Thank you for including details on how the problem was found. > Signed-off-by: Haowen Bai > --- Reviewed-by: Shuah Khan thanks, -- Shuah