Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp879034pxk; Thu, 17 Sep 2020 20:08:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMp9FOmVru1doVEO4MLX4tHG+1twTAj3kcwu4bz8bUYNqh5m3xOjA1h5X7q+X4OjogAHXM X-Received: by 2002:a17:906:4b4a:: with SMTP id j10mr33587709ejv.498.1600398518987; Thu, 17 Sep 2020 20:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398518; cv=none; d=google.com; s=arc-20160816; b=rnv5MSjziJvZLVG3MwGXQ72U2KvSw6+3KQP7FYphwC177pbKcVTOu7SGXoDA6piOnc Qd9o7Ac0VD2fQHOkT4wCLAGoNfLXZ1RHZEqucpi+EPJZGaSuiOjO2KvsjSL7+VmeQHpT neBpQt8f/4j+Cgz6PbvQMMCMN5lS2OVHdjOjuIuTIZDFVtEnNrHKZMPOCNyJwAA37i7H JF+cV6GKQY/mZfz1+7t6K7GRmfBrv6G6j82R0xL39U2Uqjx9v/Bns96nsocs5eBmHuE7 MXcHh+LY7k5CjZIfgLlfzTyZMctFpyIy6hC+pfN4hR9Ike1MNhKqRQQwyS8NBbUkG5jw zGMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C6uqWbH2VgF04UkaG/upaA5juhXIDfl2JiZYGld24zA=; b=b47C7KzL40BoOHP+hc192yRjJ7TFL48Aa7vlM3lKi2IUs7UiKqW3Kvn7GLcVO0MyYX 0wDZ+Bpp05UvmzsFxOHgIBqF0gJHOiLlbL4dgBYReYq72nHmPNuHIcbUdAZINmdhAE7e 5TEGIKcUWvrnxPxNtnAqb/isRGlvpNjbEa1dBDalelW6umMLnB7q5SzsuBm2WB/7e9YA alGK/WrJLg/Nxv6VXNrpik7sB/SkAbnzeWNUD08Rn/5ZozA675+2P1kvH0JMENnC6qCM FrhtIl1mLni/bwglE6ru82+l/+SU55OsuXrxGyZe+zenAL/SMwgVC3XdGUar2aR0ahd7 Lkrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ehD15/++"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oa23si1227503ejb.708.2020.09.17.20.08.15; Thu, 17 Sep 2020 20:08:38 -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=@kernel.org header.s=default header.b="ehD15/++"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727429AbgIRDD5 (ORCPT + 99 others); Thu, 17 Sep 2020 23:03:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:52754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726690AbgIRCE4 (ORCPT ); Thu, 17 Sep 2020 22:04:56 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E9D0B23770; Fri, 18 Sep 2020 02:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394695; bh=30aueBxnLewts4sm1SeRzuk0NwIdhEbuLDPo3L7enzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ehD15/++NYHpWWy5D4UYJ7ytSAvLA+uXR7lpJv7AMnsVPlimiBk+aIJtew/KDpTnE aCEXhGSXeT7Pb5gSPUvYhnyOSQ6+IHCwCsppmtFWQGMceunFJPmKZ2KSmXbYf9muNM EhqT9Zl61xYb9u5T4Yhu2rHAM8yy2EY376LXlUEc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Nick Desaulniers , Steven Rostedt , Sasha Levin Subject: [PATCH AUTOSEL 5.4 183/330] tracing: Use address-of operator on section symbols Date: Thu, 17 Sep 2020 21:58:43 -0400 Message-Id: <20200918020110.2063155-183-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit bf2cbe044da275021b2de5917240411a19e5c50d ] 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. Using the address of operator silences the warning and does not change the runtime result of the check (tested with some print statements compiled in with clang + ld.lld and gcc + ld.bfd in QEMU). Link: http://lkml.kernel.org/r/20200220051011.26113-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/893 Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- 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 9007f5edbb207..db8162b34ef64 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -9146,7 +9146,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 (&__stop___trace_bprintk_fmt != &__start___trace_bprintk_fmt) /* Must be called before global_trace.buffer is allocated */ trace_printk_init_buffers(); -- 2.25.1