Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp219449imw; Wed, 13 Jul 2022 23:42:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sETY+hLwNtAODxdT/m9O093KKWnuZd3FzEppakwn918wH0Uv14Pzn+pK9m1ZwAgls4o5Xf X-Received: by 2002:a17:90b:4aca:b0:1f0:3395:6432 with SMTP id mh10-20020a17090b4aca00b001f033956432mr14110297pjb.19.1657780954920; Wed, 13 Jul 2022 23:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657780954; cv=none; d=google.com; s=arc-20160816; b=sAy7Frx93D+SLaLgKRvo0QYjEXS3SzDm92uK78NaH3DGLj1NMO5/NfFYy1qFwU6YYJ wu1ro8msuuAIrkSMZOGrzcb26z7+2v2YVMajj7saHAT17xHvFAGMNyP9GDTSbYt0yRBI VDk+AiYjPVeagTPlvIseKp89cLVF7jCUafU3NTkqtLkMrHPKF+rYumUufHq0N6zPXTwz sU6nFNKr8aK3PDZL42SjQWfzeFxiSm3yjOauq2PZqaadCKdlDm/pUfSGjyB/JabjcwkR sc0vL2SPxz3ldlad54ypR7KEOj+LLkb7Uz/wWoAf+AmL/6iKLE2YOi8XZsiBojPrWVoh iorA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pq95ND8BDQIHwxsqfPmYBdAOr2LWRGPXUOS7G88vYNI=; b=0FyqYsY87wEuB8CguK93p7KJi5Xj6fMx0P11AI7qACrK6uGnHaA2pzNINuhbhkWN/G Wf8bD2v4uskdp64NhVSChInQhIwFUnKeHf1BUOEMHcThh5+qJPlzYPGyp3GiQYVZdR4g luTlD8tZeJhDm+zjBoVlnkLpRn4WGuLipNM3F9HHP+RrYSCyEMhELPlmn7i/DD2ttl7J UU+Ap59ffGJTvWjz3PCy5jVVp7Z/QRYlPZvm5YIRF54ZYWHd6W0/rokmq9THk7VrK4Jh XHGSO6dDjCdSJG0D/8uChDQAUFhJE18GhZbaakleKpmYpOHHw86H5caOn6I3e2g2a76P 4Riw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mc0niwUH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a170902d49000b0016bedb87daasi1168147plg.437.2022.07.13.23.42.20; Wed, 13 Jul 2022 23:42:34 -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=@gmail.com header.s=20210112 header.b=mc0niwUH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234497AbiGNGVR (ORCPT + 99 others); Thu, 14 Jul 2022 02:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233455AbiGNGVP (ORCPT ); Thu, 14 Jul 2022 02:21:15 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A959F1EED1; Wed, 13 Jul 2022 23:21:14 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id ez10so1529280ejc.13; Wed, 13 Jul 2022 23:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pq95ND8BDQIHwxsqfPmYBdAOr2LWRGPXUOS7G88vYNI=; b=mc0niwUHgxn7oIC9eFaGWNcnvDu1V+as79Nu5JgwbKfVSmLi+rtAzf2GVzshoZ28kq 9Q48QZiUjhjsCECE6In9OsDA0k926V5Gb4qKamyvRF5PdT83Od9BrFw9CnQtKppSplGv 3XNOy2MF3ARw+5Pf0AGPJ+hz4tR0EWDknQTCcPCnBpEOa/ec1nmyyloMwjnYAsT7lXt3 kHtxOGVr4c1Bms88ujUUsJwTKX+NokAOqAnrCOpcKoZBZnGRG508NvJezPLFGSgkGNPE 761In9b79cciRBpogVK+fuFR6ndymTYq8zj9MMdyX0ZKnKvnH/ohDy1yVo8MMi11Yr13 tIjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pq95ND8BDQIHwxsqfPmYBdAOr2LWRGPXUOS7G88vYNI=; b=jeOrTaO7DPJgYymFBY1C1wu/LlCjch2pAMYnWLYhv66o8qq8WLaS/7KVgdIMwfTtDz FQOs1iBHoK+3w0pPIUvUwqCl2dSrGWYTh62q6YSBw37F2LXQTy8BLbWzO5stob6rgGdS 4elfxg8mrT1wr2z7y/LIbes3Y36QRLMzpMq9P6MBKDMI2Rvy7duaaVuX4gyOMCkiA00K QrexM9NFQgOGSUFdHFUpsiaKXdtwh9mHhXmu7jgwK+B17pHyGIFsJxzxFC+LDalawfeP DMRz6Ok1YxX5UfterPe4PFLCW68+pAO4/6t7TE5GQIwrkseo3WClIAiX0D4Y8asSpK/X Re4g== X-Gm-Message-State: AJIora9FIz8AEtxh5zorLJpXwwlSfkdtluFYf4UApLlkk2zcA5UXKTbN ptIBPTGxjvBSAQX5CUi5EN7b5r93c9yYZSIrXXQ= X-Received: by 2002:a17:906:cc0c:b0:72b:68df:8aff with SMTP id ml12-20020a170906cc0c00b0072b68df8affmr7264433ejb.226.1657779673195; Wed, 13 Jul 2022 23:21:13 -0700 (PDT) MIME-Version: 1.0 References: <20220714015647.25074-1-xiaolinkui@kylinos.cn> In-Reply-To: From: Andrii Nakryiko Date: Wed, 13 Jul 2022 23:21:01 -0700 Message-ID: Subject: Re: [PATCH bpf-next] selftests/bpf: Return true/false (not 1/0) from bool functions To: Stanislav Fomichev Cc: xiaolinkui , Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Tom Rix , xiaolinkui@kylinos.cn, Networking , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , open list , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Wed, Jul 13, 2022 at 8:37 PM Stanislav Fomichev wrote: > > On Wed, Jul 13, 2022 at 6:57 PM xiaolinkui wrote: > > > > From: Linkui Xiao > > > > 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:407:9-10: WARNING: > > return of 0/1 in function 'decap_v4' with return type bool > > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:389:9-10: WARNING: > > return of 0/1 in function 'decap_v6' with return type bool > > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:290:9-10: WARNING: > > return of 0/1 in function 'encap_v6' with return type bool > > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:264:9-10: WARNING: > > return of 0/1 in function 'parse_tcp' with return type bool > > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:242:9-10: WARNING: > > return of 0/1 in function 'parse_udp' with return type bool > > > > Generated by: scripts/coccinelle/misc/boolreturn.cocci > > > > Signed-off-by: Linkui Xiao > Reviewed-by: Stanislav Fomichev > > > Suggested-by: Stanislav Fomichev > That shouldn't be here :-) I didn't suggest the patch, you're > suggesting it, I'm just suggesting to properly format it. > Probably not worth a respin, I hope whoever gets to apply it can drop > that line (or maybe keep it, I don't mind). Dropped Suggested-by, applied to bpf-next. > > > --- > > .../selftests/bpf/progs/test_xdp_noinline.c | 30 +++++++++---------- > > 1 file changed, 15 insertions(+), 15 deletions(-) > > [...]