From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50D58C34022 for ; Wed, 19 Feb 2020 04:54:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C55824656 for ; Wed, 19 Feb 2020 04:54:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CGR/0y06" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C55824656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D8DA46B000A; Tue, 18 Feb 2020 23:54:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D3F326B000C; Tue, 18 Feb 2020 23:54:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B92F36B000D; Tue, 18 Feb 2020 23:54:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id A21196B000A for ; Tue, 18 Feb 2020 23:54:36 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2CA608248047 for ; Wed, 19 Feb 2020 04:54:36 +0000 (UTC) X-FDA: 76505660952.28.drop67_b060a76e285a X-HE-Tag: drop67_b060a76e285a X-Filterd-Recvd-Size: 4601 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 04:54:35 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id r27so21881269otc.8 for ; Tue, 18 Feb 2020 20:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5UFOi8jLMJhZKfbS1bLXcN2MTOzPVzspy8Ufb+K/+9A=; b=CGR/0y06bDux3uipIKmL2A6gq/Cjwnfz6TpotKAct40JBSC1dCgyK/xpIMrUuQqODG ndabVlZXu3nu5sDRXd5T6gc+0Z5fnGquP6EpnNzE86kWuGTBiNeWK9EQAry7s3uaNTb6 eGn2yiX29eXa/P82eFd5E4QAdhju0gshmPP1AuAgAxgIEllQg0iQsrb+ECFDI2+AvB9r +fQurI2f1KQsm6vtGkq+TCmq4jlPB/gWa1h33C20pXb5fZ5KIAZ4UcmMoGzUaiHRI5mH kog8lhdtN1kfcA5LAqLn0c6uFsltFxkqPIXvqql6Pzi81xN5aIMqpQ4LObP47x/z4Yhq yUNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5UFOi8jLMJhZKfbS1bLXcN2MTOzPVzspy8Ufb+K/+9A=; b=RvR6qNhxhS7v+ucdq8A3WcI6Xr/O8SxZIqjhs1WZNBGPLqs++0mif+vQ8vzCIiVebA FMHOfm9rFZIw4sCPwz1rerLXR//36fZuFrPHB3pDkVrX+NjogaMW+SQkc86zfgItLt2X ceOR9Duhrh/FUAQ4tXK0eTlt8I45j5e37vp5Ik7DlhI5NzUxSWZ6l0v+uD0SxIrEbXBG HtlumgEP15Nm6iJgsbkoHDjgP2t+VJQVxMCWHIRkvJUY+IiZfnVnB//HTkvx4GexxGQy tqny/gJo8ts7rFzepxjonNv1WMLykf6sG4lKqLouT+c0GB7kkYpvnh/+cI+fMLuigvh5 1v1Q== X-Gm-Message-State: APjAAAXH6Cdz/8bfGlMDLd+t2/s7eLV7h15lI+atyNFvQdmVlo+vIuiC QqQSCjDDVU1oIwvrnmUyPvw= X-Google-Smtp-Source: APXvYqyYvjiYUbVKqo1foePiJ1LRz3yob4g25LDX4h9uBovWKx7QdkcX8t6eDUmuVpPdUDin0haoFw== X-Received: by 2002:a9d:7dc9:: with SMTP id k9mr18133478otn.117.1582088075110; Tue, 18 Feb 2020 20:54:35 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id c7sm288894otn.81.2020.02.18.20.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 20:54:34 -0800 (PST) From: Nathan Chancellor To: Masahiro Yamada , Michal Marek , Arnd Bergmann , Steven Rostedt , Ingo Molnar , Jason Baron , Catalin Marinas , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 4/6] dynamic_debug: Wrap section comparison in dynamic_debug_init with COMPARE_SECTIONS Date: Tue, 18 Feb 2020 21:54:21 -0700 Message-Id: <20200219045423.54190-5-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200219045423.54190-1-natechancellor@gmail.com> References: <20200219045423.54190-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Clang warns: ../lib/dynamic_debug.c:1016:24: warning: array comparison always evaluates to false [-Wtautological-compare] if (__start___verbose =3D=3D __stop___verbose) { ^ 1 warning generated. These are not true arrays, they are linker defined symbols, which are just addresses so there is not a real issue here. Use the COMPARE_SECTIONS macro to silence this warning by casting the linker defined symbols to unsigned long, which keeps the logic the same. Link: https://github.com/ClangBuiltLinux/linux/issues/765 Signed-off-by: Nathan Chancellor --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index aae17d9522e5..c7350aa6e853 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1031,7 +1031,7 @@ static int __init dynamic_debug_init(void) int n =3D 0, entries =3D 0, modct =3D 0; int verbose_bytes =3D 0; =20 - if (__start___verbose =3D=3D __stop___verbose) { + if (COMPARE_SECTIONS(__start___verbose, =3D=3D, __stop___verbose)) { pr_warn("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n"); return 1; } --=20 2.25.1