Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4137677pxb; Mon, 27 Sep 2021 10:09:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm7Fq2pKS+U/fq0K8I1cNR9fgDQE3o4FpKVU1/GemTRsqh10dL7OJmZRaAjrFHq2LRmIXy X-Received: by 2002:a17:90a:e003:: with SMTP id u3mr146330pjy.137.1632762542905; Mon, 27 Sep 2021 10:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632762542; cv=none; d=google.com; s=arc-20160816; b=zl+wuF5ShjHk97U6FT43aKhVoSNTpo3ggXumtVSs/BPL5sHsh5ajXsYmIdgpmdOtwt 19riwLFzFjBk/3z4cCe33WgRc3QiT1O+I/QoNnaDyt6g6+MVswBS2vIFMHxs/qIS8xil 9ggIeudcb7TwFna2fUSeoMr8YCjLTRAw2wDMpDMLRBtzuiodjRwZnznACF7xQ0adA34H f+Lx4pMkHSa4bkn+I09coQ/wk7r2TOYIHZI6KmbPHI+MjDFpoyhUQl6l+JSyvkli3bXh uIxNUFA0p5GKoY5Qm6lLPT/qgMTtK9gIMTNFhpXsmfKNvR4/gEaM6+mmEsROKoGAU2Oa 5WKw== 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=ZY0OOZzgVxBIoxzIsxZxEtZ6yPt75W5Iyer9OHRGlcc=; b=xMgX7XiLzf55NgXtxtSFulgFoKI6Px412YzHoI5YlLIfro77tRRSw0/wCWsSM2IgA8 uoXwNN7ysMIlMievLzszGtdXQKAPqFyq5qmv+AI+9ddjVAabSK4/sckHW9in1AwBzoQG h7Q+nF2O18N0l5J3/jrLd67FBiPo34fgPGWtmjcrh3XHzE+ikvS2zxFHT01Csf8VwzLX tEh/gU5wZQKQ8n+n+5UftidMBtdzeawIu0zPVnxzY5ur2SQyMkkZEzt0fqKU7pVkd0fG aJxHxM0sjilDGN0hBDKS7W4HW5vQKnhFFcuTs0llzkCTjTihW0XFwUtePiT14gMKEXNa YDVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kNb97gI4; 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 q15si21118011pgk.374.2021.09.27.10.08.50; Mon, 27 Sep 2021 10:09:02 -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=kNb97gI4; 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 S235959AbhI0RIY (ORCPT + 99 others); Mon, 27 Sep 2021 13:08:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:47366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235898AbhI0RHW (ORCPT ); Mon, 27 Sep 2021 13:07:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E1BAB611C0; Mon, 27 Sep 2021 17:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762344; bh=n4DvtcZTm04iQNomVKcZGE6ClvJcKBb5pWQr++Yt2Es=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNb97gI4laGgKGJhx03vpRFoiWunEoMAYsi77abDIUlngRMeRuZNGti05+XkFvFJy Ee30JoCLp5HQqwgksakS/LhoqXX+6rBWWVO2o+TzgjM97eJa1N1HtDvwUA5SRHgvXe h7pI5dxZFTWMdDKacyKLse2Z2Ve6hIifQjDseCYQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Torvalds , Guenter Roeck , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 5.4 55/68] compiler.h: Introduce absolute_pointer macro Date: Mon, 27 Sep 2021 19:02:51 +0200 Message-Id: <20210927170221.863503653@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170219.901812470@linuxfoundation.org> References: <20210927170219.901812470@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: Guenter Roeck [ Upstream commit f6b5f1a56987de837f8e25cd560847106b8632a8 ] absolute_pointer() disassociates a pointer from its originating symbol type and context. Use it to prevent compiler warnings/errors such as drivers/net/ethernet/i825xx/82596.c: In function 'i82596_probe': arch/m68k/include/asm/string.h:72:25: error: '__builtin_memcpy' reading 6 bytes from a region of size 0 [-Werror=stringop-overread] Such warnings may be reported by gcc 11.x for string and memory operations on fixed addresses. Suggested-by: Linus Torvalds Signed-off-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- include/linux/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 9446e8fbe55c..bce983406aaf 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -233,6 +233,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, (typeof(ptr)) (__ptr + (off)); }) #endif +#define absolute_pointer(val) RELOC_HIDE((void *)(val), 0) + #ifndef OPTIMIZER_HIDE_VAR /* Make the optimizer believe the variable can be manipulated arbitrarily. */ #define OPTIMIZER_HIDE_VAR(var) \ -- 2.33.0