Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1402207pxb; Fri, 1 Apr 2022 12:24:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPvP86R/z3GeymPaUvhA71tDqhMzHuslcPFTNB/K4l3tzOFwopdy5L0inrSsJAgGlYTVJk X-Received: by 2002:a05:6402:1385:b0:413:2bc6:4400 with SMTP id b5-20020a056402138500b004132bc64400mr22982062edv.94.1648841049221; Fri, 01 Apr 2022 12:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648841049; cv=pass; d=google.com; s=arc-20160816; b=P8NHKw1Fl/kKFstiRoY/Qfs98i+B02I9XiSCEz47rO2C8QIb4YhPbwaLB2Lm5DrVDJ MdxM9o7ISgr0USKUDufOZvFmKHg1pO0YtTu1tug8FJE7VkxCmeWwCZNGytwK9DoZFaXX lqeUocB1G89h9GbCLXIOmGBlzwcb5KNzTUG2O8NXaJb3T6vqLTLTCMOulMxEVMIkbpDm YdQIHDt0wQLQqM0FSwgMQpynur41DjmGm0t09MWd9ivGPA1s8P49og1GRHO57LM5yByY oVgeViaVtg7ZZ0M5ItUtrHya27SWlKMLNNpDrzscFbENaH9wMlVQtEyjN4aq797AiMrr GOaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=fXs/sNH6Nz8VNLF4DioBwGDDaKbO/cCj+oFHMqPMEYQ=; b=OQa/d9B7WWHWaBMbuf4rCH8tLyqwfhu9ur+jckwjkzZi/BTGXvQ2UmfsdwBAMMKZnu Ih9pfiSk3qgR8JsuEl7shHkGwx7+Q/JO0KFeb7eu6xL/dsxcWo6LBwY+0i23MSBY5Bgu tCnyE2qAGtCCnmSjrHtIBfMTl7WKFC7Y9KbU3EVpmxz+K6PEvKLLzSXRtAnAVVy9t0zx FNrWAqIm0uzrim2eT2I68T8YtCuuIdbk3fjL+rXB14c+k/K456Q+n3V+j+2pnrqA0oT9 b90Kwf20TpzknvqElw0voKdqdZpY71aho7OcJoS6jse2kmNtP6toR50jHk7XRu2eBvHR aqeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=ddPTg6km; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); 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=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402510a00b00418c2b5be1csi2273652edd.254.2022.04.01.12.23.43; Fri, 01 Apr 2022 12:24:09 -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=@fb.com header.s=facebook header.b=ddPTg6km; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); 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=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244267AbiDACvZ (ORCPT + 99 others); Thu, 31 Mar 2022 22:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242572AbiDACvY (ORCPT ); Thu, 31 Mar 2022 22:51:24 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC10E22B0A; Thu, 31 Mar 2022 19:49:35 -0700 (PDT) Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22VNFqb1007713; Thu, 31 Mar 2022 19:49:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=fXs/sNH6Nz8VNLF4DioBwGDDaKbO/cCj+oFHMqPMEYQ=; b=ddPTg6kmhocZwFPDc59uCEQM/CosbNI7VdsyVxAXLZWKyoAIjYh0S6KTt/0WL0hQEFrp /V4dDisShmJDWedwm/ARH7zkC30imLcFKuhaw1T8xfucBYv1caGmpMJZfdIVl7p96LFI YYmQknzJiEIxR1gSpsUDv+8ZK2Z+UWXcVxA= Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2172.outbound.protection.outlook.com [104.47.55.172]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3f5gpcujgd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Mar 2022 19:49:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cV+JkGIzWF9AGpx+M6WgLwAy0SVrlanjgjbbu546Z0UuzCy+zvs2ArpOLH7jotGBqMcswpVJea8nDc4PecXg99St/TMSeMc5v7ldJNyF6vvmbnXvoykh+apeDUh35rTqVn3jOxSdlwgPZvT1t+DrjgMdYQonWInFkdCboDuETrpeDC60tc07p6DQArbJE3iVeQV/Bd9wijxfV8l+RHxwHpyLhCx0JuDcwUhUCI93wC366n/Axav2MBSor5gU1FkL5/R0TWhWTXLpT92iMEqsHfgDunHzTDtVaCPd5TEN0z4LFkjLayVbakxnd/TdVfktIWmi4UfUMI2JDY9W+dDFeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fXs/sNH6Nz8VNLF4DioBwGDDaKbO/cCj+oFHMqPMEYQ=; b=XYPpqIrfxKJCCbKbiPMVQOYpWjiQCmq/tuqAspEPfnMNt4N9bWva38xq7ZmpP097QxS4gxHfQZt9piBe1ugoZ0CXusHXAk2+eUdSpfF9BDe77EGnA51lOfbNx1tq4Bly1AOlI2pLHRS4fV1I8/StXAuwX/x70gCZtaQV9Zp00o7awYKz/jgLiEbX0q+0excBw8R12HsQPPTA9GFMJy3IcoCUwDOXpdgUJBxrYPtlOF9eF2G20pYeSKjI5yn541hmAXU4U5dYRQ7rP6kJv0giwSIPQKVbMnO/5E1x3JBK3FPFjSjptEHJPw0SI2/A3uyL2ljXN0fdMQsBB8hF8yZ70w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by BYAPR15MB2759.namprd15.prod.outlook.com (2603:10b6:a03:151::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.25; Fri, 1 Apr 2022 02:49:15 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::4da5:c3b4:371e:28c2]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::4da5:c3b4:371e:28c2%7]) with mapi id 15.20.5123.021; Fri, 1 Apr 2022 02:49:15 +0000 Message-ID: <854c30e3-1dc6-fc8c-caee-d4dfffb79c4b@fb.com> Date: Thu, 31 Mar 2022 19:49:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] selftests/bpf: Return true/false (not 1/0) from bool functions Content-Language: en-US To: Haowen Bai , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer 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: Yonghong Song In-Reply-To: <1648779354-14700-1-git-send-email-baihaowen@meizu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0P220CA0016.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::23) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2db47df-51c7-44b5-1acf-08da138a3568 X-MS-TrafficTypeDiagnostic: BYAPR15MB2759:EE_ X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3jJja1u4ntpSv4aTL5teYlzOms/slHB4LAUomwI2lt11x1/WgtbLdOwwjKwG7p/0iuvPf0zWKMg+LZc+l8xcmYZM8dwxlLYUwUToEKNtpmgGVp/AC3fgjQZCfw1X8HPn8cl/45UOfQgtiZ6wo5MJoqteEfgRzRaI1OOKmIAnDj7mBH+YiKb4ZY82HsqvoZgRTOLu0ELjqRhBJn4A5tN1ZtglNMpwOhSLvirwZLslXWBWRMg37zBjF3WKpfPB5qKo+mINY/fHnJhALJOKoXiGi9UUtDkutZZ5VYFE8x8hFzO+MmCsAlbgaTuxxn2xNMZICwR8rykkKeCU009tB4ArOK6V75CNreCspbEdO32lt/OF2an2yWk3WNwdn8QbHzx97HOP2WByobR2lDHwo9H3wgOxCN1YasGxjloN5jVfLHv/wNDHVwt46uYN3rk2esYDszHA9K8Hei4oFnrdmEurv9gnnWV1wwWbrxlrlwJF2CCa2FisWmFaD94CUKcbnCjLmTc3gALjuJeMUh1pj2ONW6ilAuSgEoeFoIiS3bgYRfyL85R5gblZD7sd9uRBo04biwpHYkKghf6Ddqw981ePvwzowHIRxRbv0vZK1BzQK3g+HN1ZkVxOiCZdZRT9ZJP4rGQtwYNTg0J0cqB9Wbx9B8Gja9QPxV1gRhi0DYh7S+Dfwoj+too9GMDLrqNLGj/AWWm7fTvy36TowDU5+elLdnKmfpBqUYK9UAtixlzg9395tvgbzQj3IGYPvH7/iv+D X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(52116002)(66556008)(66946007)(53546011)(5660300002)(921005)(66476007)(4744005)(31686004)(7416002)(2906002)(38100700002)(36756003)(2616005)(186003)(8676002)(4326008)(110136005)(6486002)(508600001)(31696002)(83380400001)(6506007)(8936002)(6666004)(6512007)(86362001)(316002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anNWRUhHTFNIRG00NWpiU2xPYWc3SS81aXU5ODQrL2tYeDd3WWU5N2dyalpv?= =?utf-8?B?akJSMTlNM3B3cDExUUkxcE11aXJxWVgyWWVGMW9yWXl2RStxRC9mUVRYUUM2?= =?utf-8?B?dXVidU9maS9ZN3JOTXN5ZkhHYWpIOXMvWCs1TzhHUkFNelpQMlhDeG5oaVNB?= =?utf-8?B?S1Z1OXdpY2trUVFjeDVITXR3dEcxb1FXbWlPK1FvL3pzZmYxVTBNK0lN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J3?= =?utf-8?B?R25tMjRWVlV2RzlJckRiL3JwYStrRG5ITU5IdnA4YTRMdStVdHgyczM1c2ZX?= =?utf-8?B?eVRvdjVrUE5YaExoazA4S3NzR0ZWalE3MHdRWjltWHduWnhUdFo1RDZXWUxy?= =?utf-8?B?Y3FJYVFkS01RNEIzeTVndWJSWkgrNlp5d2Y3b1FUYzl3STFZTFkrK3k3enVu?= =?utf-8?B?UzB1TmhJbng4ckUwRFV6N3NscE9Pckw1KzgrdVFDYkNwQUJjdk43QmFvSnFt?= =?utf-8?B?eG11TE9HV1BROEdxVTlVRGg0amJSUXY5enRZRUp4SlVYdTZVTEc1OTJ4YlY3?= =?utf-8?B?TEtzWktaMzVpS2drbnNxNVFsMStwQW5FQ3hkZldZaDdCejFzTkRuVTQwSC9j?= =?utf-8?Q?UDG/ULarXxmI7k8E=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2db47df-51c7-44b5-1acf-08da138a3568 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2022 02:49:15.0338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: owYR62Zy/JQ423uyCQ2ClTeMnek05t5C0/GrKmbWgchiz8qmwDUd5K4CRuu+50Al X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2759 X-Proofpoint-ORIG-GUID: YM1bE6Czf169Evg8n4k2u0AbqX8AykfC X-Proofpoint-GUID: YM1bE6Czf169Evg8n4k2u0AbqX8AykfC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-31_06,2022-03-31_01,2022-02-23_01 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,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,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 3/31/22 7: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 > > Signed-off-by: Haowen Bai Acked-by: Yonghong Song