Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319850pxb; Mon, 20 Sep 2021 18:43:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJvz17p9Fqon/fgOfy3yJ/shswUhsd4owemaze72ojgm6EGWvL890HL0VkBFkcyvtk5V4R X-Received: by 2002:a05:6402:2919:: with SMTP id ee25mr32601290edb.395.1632188597917; Mon, 20 Sep 2021 18:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188597; cv=none; d=google.com; s=arc-20160816; b=B296iFkidnq9/DYEhbZlYv68v42b1wYm7Dy0knKdQk9rLcW/6ltTNsuXahXeeTkdAr ekQp9jP6GDVkr2QvPdfxHHT+YR7WZ+gpxn/sb4DzFn0pZpn9f6FOGbOzwKaJgKGSrV5o UcsT0DCE4VntAMRyunOeYzsg1dW8upsdAm9JnebBPnYWOykqUzOU8PE+F3l0/VIXB5qJ 5o2fGSjeQa1nNiBnOHm0xeX4qBUNNbcp+DJNaAeA3IqJNDNEKVW6v3tC8gOu18cXv2y7 PgVwUxYoPLW84RI1jFApZfe+tgPp1JcraJv9GaO50Zler3ZJq3z4SI4H4WwaDNQJL+m3 LREA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y+GzaJjBbxYkY71KHC/lS3jLWWB9tKEdhAdf1GPEWeY=; b=kjQ6QIWBQM46+9RflQldC5hmoIsnGVMU7aXs+eADF6tXggc9P84QnJVOK0pedbBV5C kQ9KAstZ38atYntUN8WKlRlCuVg/nVteSbKpYI38jmCH5Df1j+inTfik7Q3TGVBqs6wp NDcvZpvxZIsSXc8EM/yft2Alc0PmR30MeHuVjRmpMOU+rFpDYVKnvfWDuocDsBlFHu9G rutJ8+bN8quwjaqRtuJaqnkq+jAh5p5v/Om1AE6Q7iTZr7AG9qQ2i4TvInljgSFlKNo6 6bkhxw5/X+P9zv0Wof6XgxhhyozMaIO4yEuzwfB7oksC0/Ztf82X7f6oh/jse038LYGK XTJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tZijFq0d; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b25si20415034ejl.528.2021.09.20.18.42.54; Mon, 20 Sep 2021 18:43:17 -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=@linuxfoundation.org header.s=korg header.b=tZijFq0d; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243393AbhITQrs (ORCPT + 99 others); Mon, 20 Sep 2021 12:47:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243121AbhITQr1 (ORCPT ); Mon, 20 Sep 2021 12:47:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78B94611AE; Mon, 20 Sep 2021 16:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156360; bh=QEIpEauqMVQHTTKwPThLQMQF/ItxHwVo6fas/4hyDyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tZijFq0dwN0T3ags6bqx7drp0wV5j1MQ53xVOsI9d3QW6+owppXNOHaobWi4umi2F apX7QopRf3mYBthzpzAFAz7d527/vLYcbv9Bau8IY3GLJNXez4iepwUfomemuHTFJt SSPTGkRtzCAYGE1uqp1dP4li5li0ygadcHxCOoaA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Dooks , Russell King Subject: [PATCH 4.4 006/133] ARM: 8918/2: only build return_address() if needed Date: Mon, 20 Sep 2021 18:41:24 +0200 Message-Id: <20210920163912.813951997@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Dooks commit fb033c95c94ca1ee3d16e04ebdb85d65fb55fff8 upstream. The system currently warns if the config conditions for building return_address in arch/arm/kernel/return_address.c are not met, leaving just an EXPORT_SYMBOL_GPL(return_address) of a function defined to be 'static linline'. This is a result of aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h"). Since we're not going to build anything other than an exported symbol for something that is already being defined to be an inline-able return of NULL, just avoid building the code to remove the following warning: Fixes: aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h") Signed-off-by: Ben Dooks Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- arch/arm/kernel/Makefile | 6 +++++- arch/arm/kernel/return_address.c | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -16,10 +16,14 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. obj-y := elf.o entry-common.o irq.o opcodes.o \ - process.o ptrace.o reboot.o return_address.o \ + process.o ptrace.o reboot.o \ setup.o signal.o sigreturn_codes.o \ stacktrace.o sys_arm.o time.o traps.o +ifneq ($(CONFIG_ARM_UNWIND),y) +obj-$(CONFIG_FRAME_POINTER) += return_address.o +endif + obj-$(CONFIG_ATAGS) += atags_parse.o obj-$(CONFIG_ATAGS_PROC) += atags_proc.o obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -10,8 +10,6 @@ */ #include #include - -#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) #include #include @@ -56,6 +54,4 @@ void *return_address(unsigned int level) return NULL; } -#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */ - EXPORT_SYMBOL_GPL(return_address);