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 16E6AC34050 for ; Wed, 19 Feb 2020 04:54:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CBB5524656 for ; Wed, 19 Feb 2020 04:54:39 +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="RlTQIa8C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBB5524656 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 BE4176B0008; Tue, 18 Feb 2020 23:54:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B1B4C6B000A; Tue, 18 Feb 2020 23:54:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 970026B000C; Tue, 18 Feb 2020 23:54:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 7F6656B0008 for ; Tue, 18 Feb 2020 23:54:35 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F08AE180AD817 for ; Wed, 19 Feb 2020 04:54:34 +0000 (UTC) X-FDA: 76505660910.23.unit95_adf0a929ce34 X-HE-Tag: unit95_adf0a929ce34 X-Filterd-Recvd-Size: 4723 Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 04:54:34 +0000 (UTC) Received: by mail-oi1-f196.google.com with SMTP id p125so22564882oif.10 for ; Tue, 18 Feb 2020 20:54:34 -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=Dr2Q+aHg/1SGjzpWBsBNv11ATwozDGCBBkaKKg29VLU=; b=RlTQIa8CRCM+VNzdVRfUcZhF+5zjAHPs4z0EywqhlgDJhQIBms6nhmImjyHTTHYkOy kAE1qCHWRhwFAjVqLvaXZJa49nISb8dLeexOQVcMXPsAchxmy08bxmlmomC0ljC4G6r/ TPAs3CCUKPBkIrP/fhQdDQthulzH5Mx98wdmPnKA4kQLIIZVOm1iycVFu/zwQzT6lvAs IAELIMXwPbuzc3ConrlHpGVxcz4GPCA6jwhoQCgJFAH91pN7I24IxHQJoVQwmxq+q/US yFqU1TwG+sb6fsmvXFmjg9uYEDKwyxy2qReN/DutUyQQASjz7GWVWs8oeR5tslTVZTNO Bd0Q== 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=Dr2Q+aHg/1SGjzpWBsBNv11ATwozDGCBBkaKKg29VLU=; b=UxwCwSckjyxJ6fSMRSK7d6qf6iEABPzza49nPvMvjCj8OL9Fh+dfODM4M+WcehSON2 EZUq+SfTP6Lu4FlphvEVLPSn9LRPISqf7FhA5o5XelX06U1w4nYJOEjpyE0lskpTtMl8 na50q61bYan7/SrXcmIK+y/jql0cRy2Tx+5WNDMx0PZKlY8BpqUIcQIFrJkM0oRTlZ/6 QAcWATPl/LbWpzvW+gqiAQHhBAzgJUySjrLO1fwfApcA3QMqkcjSEO+7R+Nfs6wb97TO Z/N5hKXbLgrkCobiCpbesyaDBAL3KEKhhdq+iXbfBVoSJDyl0lD9U3MtygH8G0ke1QKD wfCg== X-Gm-Message-State: APjAAAUTl/QOvJz8veu6en8x+UWoPZ6HgdgmKswNUIir/zK05rcTUA1f OQc8v95hrAmh5JhDpksB1QGDCF4R X-Google-Smtp-Source: APXvYqxyb3BnXAjNQrjcn8HqOmkV+kjEbAKY9iDmYxHQnfG5ebZsrdug8IdEe5BqVTLiXeR2InjgJQ== X-Received: by 2002:aca:5dc3:: with SMTP id r186mr3577268oib.137.1582088074161; Tue, 18 Feb 2020 20:54:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 20:54:33 -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 3/6] tracing: Wrap section comparison in tracer_alloc_buffers with COMPARE_SECTIONS Date: Tue, 18 Feb 2020 21:54:20 -0700 Message-Id: <20200219045423.54190-4-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: ../kernel/trace/trace.c:9335:33: warning: array comparison always evaluates to true [-Wtautological-compare] if (__stop___trace_bprintk_fmt !=3D __start___trace_bprintk_fmt) ^ 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 --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c797a15a1fc7..e1f3b16e457b 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -9332,7 +9332,7 @@ __init static int tracer_alloc_buffers(void) goto out_free_buffer_mask; =20 /* Only allocate trace_printk buffers if a trace_printk exists */ - if (__stop___trace_bprintk_fmt !=3D __start___trace_bprintk_fmt) + if (COMPARE_SECTIONS(__stop___trace_bprintk_fmt, !=3D, __start___trace_= bprintk_fmt)) /* Must be called before global_trace.buffer is allocated */ trace_printk_init_buffers(); =20 --=20 2.25.1