From patchwork Sun Sep 12 16:01:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 509689 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 6773AC433F5 for ; Sun, 12 Sep 2021 16:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E45060FDC for ; Sun, 12 Sep 2021 16:02:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235957AbhILQDX (ORCPT ); Sun, 12 Sep 2021 12:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235890AbhILQDN (ORCPT ); Sun, 12 Sep 2021 12:03:13 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70903C06175F; Sun, 12 Sep 2021 09:01:59 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id i8-20020a056830402800b0051afc3e373aso9867983ots.5; Sun, 12 Sep 2021 09:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tyfgbpEWB0om8tzf9mpCL7ZcoNm2ky582Pji67hHRFQ=; b=FipBo31bo4Y9wn2cwKQRxkhXZxLWCn+R45DcIskkVp75c1TgMGyjogwJwyZOXFC4tv stoxC1TbwWGQ+SVkngtXViHocHoaVTtD2BBYiJPvDjNTybowvZ5OzMJ0BvcZBw1tSFVV WvuF8X0N5/D8+gT4APANqLNRhq+59UrNncv3vpGQBPma8SCO7gYwVE6iGXjpUZDSx5LK Mrre1qNJSrKUOp7Bz8xYEI5VjP5yPoQFMHyY65D1co3w7stKAEc0MHHesMO+X31r8VOS nbGd99VOHdmPbZHJyPppMEZ1X8zmprSmHfblrUwwAkfgGe5JEZF/CJPrdQSQaVVyJAYv OeTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tyfgbpEWB0om8tzf9mpCL7ZcoNm2ky582Pji67hHRFQ=; b=kuVVKphCs7lCFENKBeX639R8znLBqOyB4vueN6wQvvDRbHtmLZMQo3yjcLwzQ5S9h7 PPWhTYDltwBsNdfjUGyc8ONSv9YXRSwEBkYMvfqDLn0vjIvnN/Bb0wYFzHUtoiEEb2ed 6drADNG0LVEMUVajecAuvbjhITcu6tsD2mOXwq2NNVhC62U1ck0zKp7YvtPHRDC7tnMg fnbx9UGborB4PTnpZTbajG9nOT+/i58PKB1AKhL6HNwBotmh72zLGerCYGeExwANYFIV T7Qpx6wdr/MnqVsUzewvOlN+Y8MYgABaqOMlCYZOA/TMNh04CWvuh68crMsGgPwXnnuT p8Og== X-Gm-Message-State: AOAM533sXR8jF19Tyslzm7I+RpovkAlOCUT+AGWHTz/zYET6GbxR1TIk KQZAio+3hiuJcEmtYLPtBBE= X-Google-Smtp-Source: ABdhPJxxG3bEJyuh5jpoScB+mVZoZXu5mY1xmvYgshRPfbEKeGsAX+9/2UT/b42Hz89aP+JjI1OTIA== X-Received: by 2002:a9d:410:: with SMTP id 16mr6428022otc.83.1631462518827; Sun, 12 Sep 2021 09:01:58 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id t1sm1208957otp.9.2021.09.12.09.01.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 09:01:58 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, Guenter Roeck Subject: [PATCH 2/4] net: i825xx: Use absolute_pointer for memcpy on fixed memory location Date: Sun, 12 Sep 2021 09:01:47 -0700 Message-Id: <20210912160149.2227137-3-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210912160149.2227137-1-linux@roeck-us.net> References: <20210912160149.2227137-1-linux@roeck-us.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org gcc 11.x reports the following compiler warning/error. 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] Use absolute_address() to work around the problem. Cc: Geert Uytterhoeven Signed-off-by: Guenter Roeck --- drivers/net/ethernet/i825xx/82596.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet/i825xx/82596.c index b8a40146b895..b482f6f633bd 100644 --- a/drivers/net/ethernet/i825xx/82596.c +++ b/drivers/net/ethernet/i825xx/82596.c @@ -1144,7 +1144,7 @@ static struct net_device * __init i82596_probe(void) err = -ENODEV; goto out; } - memcpy(eth_addr, (void *) 0xfffc1f2c, ETH_ALEN); /* YUCK! Get addr from NOVRAM */ + memcpy(eth_addr, absolute_pointer(0xfffc1f2c), ETH_ALEN); /* YUCK! Get addr from NOVRAM */ dev->base_addr = MVME_I596_BASE; dev->irq = (unsigned) MVME16x_IRQ_I596; goto found;