Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4062563rwb; Mon, 31 Jul 2023 00:03:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhdZIKSU+67q4brC9bz7rK8tH61RF9CMQekvVgK7fIcQrL8I7lVDNlQM8huA8lSlscUu5W X-Received: by 2002:a17:906:77d0:b0:99b:ef9c:e634 with SMTP id m16-20020a17090677d000b0099bef9ce634mr5781479ejn.65.1690786991056; Mon, 31 Jul 2023 00:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690786991; cv=none; d=google.com; s=arc-20160816; b=02mct17MRoHa+U/HW0AIDPjmf63igciGdvTV29s0BmRUM/wHWr8u0KwzZ8aSqX55+Y S/epjsjZvqjTOjtoU+vLPerMnl5wRCjw1IkGy18/Obf/+qYKIc3k6CB6jvYNf6cU7oyB OFgLh+w7h8NFgc3Ali90zHsW+P/JNvJEvqLUeD7YrpSA+VL3PWWsbe2fDdDTztAP16wZ Q8c9Z0sqjePCNQ/PacVB/oKtx0/cBhz5WgOMH6Tv+AkaOunFvAtRsXl+HwI0IUyTiCa4 rm2r7DImHazOOSkOK2M3h2IZFpnDNqcOpkbbKJ9aOes1WY0r9A8qON21AvUPXcqC4A5n yFXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=PP6Ro9Uab20huBMFCuUUKMel644vGdUwAuRyx8mk8sE=; fh=Q4MvkSz8FYcHPE+pFaGSR8c4aLVk8U0IU8szbKVfuTg=; b=0LhNd+PDZyXiwPCxb+VMlfhOZgaFP3Sq8yTajlb4he9afv64jNRrKH4aw1OVwc+RkX zFGqRfh5/7jHP90A0X8jgDKYib8RuhhktO0vhdpFsAytom/hA3XAgyyxmqbFYVV3bW0I XnYXmNK6FHh7NFhKF76Hjcz2QAkPZJ8TnSuxfP9v/4oXJaDPw/zOVOLt6QzuF90gEEFM lrnDLroD550wLX1Usc1bToTsCnuSwUjlccjiJXAE7ARDTgpGX3C4m27Wl/hr978h+/Qq xWSTsxzVqASwoFPf6Bv9s3rCZWqw8Ne7DhqgRMeRByNdjAchCVDFaqyjjKLiXEDzJsms CmCQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a17090622d600b0099bd627bb9dsi6414553eja.983.2023.07.31.00.02.46; Mon, 31 Jul 2023 00:03:11 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbjGaGs6 (ORCPT + 99 others); Mon, 31 Jul 2023 02:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjGaGs5 (ORCPT ); Mon, 31 Jul 2023 02:48:57 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC268E43; Sun, 30 Jul 2023 23:48:54 -0700 (PDT) X-QQ-mid: bizesmtp64t1690786128tv7gpioh Received: from linux-lab-host.localdomain ( [61.141.77.223]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 31 Jul 2023 14:48:47 +0800 (CST) X-QQ-SSF: 01200000000000E0X000000A0000000 X-QQ-FEAT: QityeSR92A3KJ4G72zyaN0HTxxqoyjC7ShObFSQuvAFUrjVZb+YBUpOsx4FYs dSFF+Le3swCbsYpROBvlOGaKpyQxs0NZYx3kU4xekvZv8D4ftEOl5qQWNbm8FaPsR3yDpry aiMn9QQLkcJ1hqQLm5iExH8pesG3b7hgNfMhkj1Yjb53cMJaQlfyU1VyDEpUAaggP4/+82R TQW/nKXFbMCOiQA6xuQ3eOIa1VdMQIIRRhIp/UaAXDZkMrAlazQguQ8PNwKI3yU+ttSai+8 nrdtDiGl6x50ZLO0H1cLvlkcRJRskkvPgbIj1QtlLlvZkow9W1FUouGW+OOA1+OW25EMp/g 5AnyYxVe2ceEoH+ihsEVySdOoonbIPjEdasuNDkgmtoxRdyRD0l4t2JSPDxwUuwjWGWjykZ X-QQ-GoodBg: 0 X-BIZMAIL-ID: 9979006878339547487 From: Zhangjin Wu To: linux@weissschuh.net Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tanyuan@tinylab.org, w@1wt.eu Subject: [PATCH 1/4] selftests/nolibc: drop unused test helpers Date: Mon, 31 Jul 2023 14:48:26 +0800 Message-Id: <20230731064826.16584-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230731-nolibc-warnings-v1-1-74973d2a52d7@weissschuh.net> References: <20230731-nolibc-warnings-v1-1-74973d2a52d7@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, Thomas > As we want to enable compiler warnings in the future these would be > reported as unused functions. > > If we need them in the future they are easy to recreate from their still > existing siblings. > > Signed-off-by: Thomas Weißschuh > --- > tools/testing/selftests/nolibc/nolibc-test.c | 99 ---------------------------- > 1 file changed, 99 deletions(-) > > diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c > index 03b1d30f5507..53e2d448eded 100644 > --- a/tools/testing/selftests/nolibc/nolibc-test.c > +++ b/tools/testing/selftests/nolibc/nolibc-test.c > @@ -161,31 +161,6 @@ static void result(int llen, enum RESULT r) > * of failures, thus either 0 or 1. > */ > > -#define EXPECT_ZR(cond, expr) \ > - do { if (!(cond)) result(llen, SKIPPED); else ret += expect_zr(expr, llen); } while (0) > - > -static int expect_zr(int expr, int llen) > -{ Why not a simple 'static __attribute__((unused))' line, then, no need to add them again next time. -static int expect_zr(int expr, int llen) +static __attribute__((unused)) +int expect_zr(int expr, int llen) { Thanks, Zhangjin > - int ret = !(expr == 0); > - > - llen += printf(" = %d ", expr); > - result(llen, ret ? FAIL : OK); > - return ret; > -} > - > - > -#define EXPECT_NZ(cond, expr, val) \ > - do { if (!(cond)) result(llen, SKIPPED); else ret += expect_nz(expr, llen; } while (0) > - > -static int expect_nz(int expr, int llen) > -{ > - int ret = !(expr != 0); > - > - llen += printf(" = %d ", expr); > - result(llen, ret ? FAIL : OK); > - return ret; > -} > - > [...] > -- > 2.41.0 > >