Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp150784pxj; Fri, 14 May 2021 00:00:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg0Oz4cNNuGh9dKG8jSacU5M+NKU5wxTyA7BQfPHjKdaV2xpWxc+C2GNZDoYEu5roLFuHQ X-Received: by 2002:a05:6e02:10c6:: with SMTP id s6mr41766846ilj.15.1620975650505; Fri, 14 May 2021 00:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620975650; cv=none; d=google.com; s=arc-20160816; b=j2yMzIf8KOmNFfo2kFwnVm/EvgTZlXH99uhDysin44QeZcDKB7NltCwQNzjGNjxLDO 4QXH/5cSu/RklmoQtaa7W5pbameKDDIfL0TPhjGA1n5kMSvTz2Bag52f3HAqQpXIVv6T bXg42lvq7JougP1/iDtTq5E7ERTYe1KoWNB9lGzm0AakfX12M/nTbIE123biWh+xJT9G J1wGd+X7WDZOzEXg/E2LtDQ5fe1JG3IY5UsRmHr7jPGa+R65BoV55icYFcikXf0KufST Tb3DYKH1IhIlfqxTH9AveC45FOQeCtkOuASfbjKifCGtMrSGLB/7cjL1EcaiyW1nfRij FyNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=uesRCr8313wG+vCOWF3u1DHopuCyxne+XAdqmPkGhP8=; b=rr4KvJqrkWmco6gmSK++4Y0l1Vc8TSHKycQ/PLUVmQnaKDwv6RYu4DnZQrgJWMK7H1 C/zs64DeGg3dzCC2QAsdOU2FZ2qCV3xQAz6Y9PyrUnwKUmiNcWTgWlrh33zIC5scQkVP Zj82Y1CqgE5WaJp5fi+jdNqcjUdXh0sbUZQROH4nBZ7R8qbvPvGjXHp+UnT0Ebgaq2b6 ivMpoN2iugOPAW6lYCk/0cHZBY4GI1Wa7yVtynzNjprrvyMSd9Z/zLZDeChJli4MvS/o KZnCeY4FLsx7RlmSXhCg2jeZEByzoQ6keBCNWdYWkuxLONs1uaA9eswtqDLFDSFmFuRf flzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZxyXdXF+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si6465950ios.49.2021.05.14.00.00.34; Fri, 14 May 2021 00:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZxyXdXF+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbhEMThw (ORCPT + 99 others); Thu, 13 May 2021 15:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231402AbhEMThc (ORCPT ); Thu, 13 May 2021 15:37:32 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BDECC061761 for ; Thu, 13 May 2021 12:36:21 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id d63-20020a254f420000b02904f91ef33453so12325751ybb.12 for ; Thu, 13 May 2021 12:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=uesRCr8313wG+vCOWF3u1DHopuCyxne+XAdqmPkGhP8=; b=ZxyXdXF+ZnTVHwxKaCvnkw3FUcmy9NXlcK0ZegM4sCUniXCSoIvlO8w1qQa6KQRJkt YcQFIRNM6bmww0hgPIsjcIzAPjJwhKYkD38IIgNudvGW5fI5osGUurDlSWpIK/z0QJ1B 7fBBf3TtzbOnsBM17Wro1Xj0hsrWj12Ln0mKdIs2ZYTaoyCpy1blKnE3URdNDUMSXO9R 9DApNOLaoPoauwXsuTNt0Vfgxh0ZM+HBU4fMk+kYs5D89FGmM9OW2+p9sVrvwmByRv42 6aWrENvJPbG1qXg9n4E4pKADUA+qmAtbA4+FqQUPu8dkuwp99FPf+G08l1fSj4YLedhn Cz2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=uesRCr8313wG+vCOWF3u1DHopuCyxne+XAdqmPkGhP8=; b=LhR+kLxTZ1gD9dzr1XV0Cw7f0pJBUfb/rRjS7cuMx80iRi7LrRkkfJiOtwS9wy7kXx fyWSB6UVVDI1px4hQPai5m4GEgPgSBowysA46GE3qBGoYCtJ8ZIM6Fb6uPs/b+53xDHv w67xxdCXcspKOE0ARs+UubExXmzfp9Kgvn7lX7c67+Ml/s452tyRgaZhNQ+OHNvhx1Hi M+zk3IxqocSoSPSjbnRKbHQMwSA4mxjIQzSU2sTLTL5abZI1sJtXLvFp7yxeBq7ygAZ7 X0/2ETvJFqZgCF7hMRxU7Hwit3zUtt/aNYjYaTtLIAoRiSMvztvZ7gSM3LdEuXcvpMqV XPIw== X-Gm-Message-State: AOAM533DmIAthu9sGRlTePNioqEUyasxbtPab8IUy9zvLaF/JrnQhQRE Zk0fhPep7UaM6wBtxJCBL3Wr6HJFEa+EqA== X-Received: from spirogrip.svl.corp.google.com ([2620:15c:2cb:201:5f61:8ca4:879b:809e]) (user=davidgow job=sendgmr) by 2002:a25:aa72:: with SMTP id s105mr62972439ybi.95.1620934580631; Thu, 13 May 2021 12:36:20 -0700 (PDT) Date: Thu, 13 May 2021 12:32:04 -0700 In-Reply-To: <20210513193204.816681-1-davidgow@google.com> Message-Id: <20210513193204.816681-10-davidgow@google.com> Mime-Version: 1.0 References: <20210513193204.816681-1-davidgow@google.com> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog Subject: [PATCH v2 10/10] lib/cmdline_kunit: Remove a cast which are no-longer required From: David Gow To: Brendan Higgins , Daniel Latypov , Shuah Khan , Andy Shevchenko , Geert Uytterhoeven Cc: David Gow , kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With some of the stricter type checking in KUnit's EXPECT macros removed, a cast in cmdline_kunit is no longer required. Remove the unnecessary cast, using NULL instead of (int *) to make it clearer. Signed-off-by: David Gow --- This should be a no-op functionality wise, and while it depends on the first couple of patches in this series, it's otherwise independent from the others. I think this makes the test more readable, but if you particularly dislike it, I'm happy to drop it. lib/cmdline_kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdline_kunit.c b/lib/cmdline_kunit.c index 018bfc8113c4..a72a2c16066e 100644 --- a/lib/cmdline_kunit.c +++ b/lib/cmdline_kunit.c @@ -124,7 +124,7 @@ static void cmdline_do_one_range_test(struct kunit *test, const char *in, n, e[0], r[0]); p = memchr_inv(&r[1], 0, sizeof(r) - sizeof(r[0])); - KUNIT_EXPECT_PTR_EQ_MSG(test, p, (int *)0, "in test %u at %u out of bound", n, p - r); + KUNIT_EXPECT_PTR_EQ_MSG(test, p, NULL, "in test %u at %u out of bound", n, p - r); } static void cmdline_test_range(struct kunit *test) -- 2.31.1.751.gd2f1c929bd-goog