From patchwork Wed Feb 19 04:54:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11390335 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37015930 for ; Wed, 19 Feb 2020 04:54:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03E2C24656 for ; Wed, 19 Feb 2020 04:54:41 +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 03E2C24656 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B1B4C6B000A; Tue, 18 Feb 2020 23:54:35 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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-Spam-Summary: 2,0,0,886271c9b107fcdf,d41d8cd98f00b204,natechancellor@gmail.com,:masahiroy@kernel.org:michal.lkml@markovi.net:arnd@arndb.de:rostedt@goodmis.org:mingo@redhat.com:jbaron@akamai.com:catalin.marinas@arm.com:akpm@linux-foundation.org:linux-kernel@vger.kernel.org:linux-kbuild@vger.kernel.org:linux-arch@vger.kernel.org::clang-built-linux@googlegroups.com:natechancellor@gmail.com,RULES_HIT:41:355:379:541:800:960:966:967:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:2196:2199:2393:2525:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3867:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4385:4605:5007:6261:6653:7514:7903:8957:9025:9413:10004:11026:11658:11914:12043:12048:12114:12294:12296:12297:12438:12517:12519:12555:12679:12895:13069:13161:13229:13255:13311:13357:13894:14096:14181:14384:14394:14687:14721:21080:21444:21451:21627:21666:21939:30054,0,RBL:209.85.1 67.196:@ 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 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 != __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; /* Only allocate trace_printk buffers if a trace_printk exists */ - if (__stop___trace_bprintk_fmt != __start___trace_bprintk_fmt) + if (COMPARE_SECTIONS(__stop___trace_bprintk_fmt, !=, __start___trace_bprintk_fmt)) /* Must be called before global_trace.buffer is allocated */ trace_printk_init_buffers();