Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp126631pxb; Tue, 14 Sep 2021 20:53:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHp77xEGYMbuv9oOG8S1Z6wE0tlHcntbd0EmGx42MzNELDZMeszBB2zlwWdyr5ZR4pH9cc X-Received: by 2002:a92:c64a:: with SMTP id 10mr14117383ill.102.1631678017472; Tue, 14 Sep 2021 20:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631678017; cv=none; d=google.com; s=arc-20160816; b=vl6/Uc4uBdx2AS8uqUL6DIJrKNee6OB4a/Jk2W0yoBqD9R9PYX5hYZZPQz9F5hDvqm VgSRrOiuTfZOjZZoPPTQUVozIaNml2TU7O4+aoeRgXg1ztU7GDOu1cj8JxYUaUw6E0NW trrk2zHpvdHmQeamj2y7BP198FKFgLxhd3+iCflN8goWT2HClbQlRNtYNiEdIESuH56n 10rJfNnPGye+lBsL2Jdk2V0gOlhl/D9xa0n4K00b/vF3DHGY5eOSgbozBLm64WSk8Jjl 0NVwgRwZyPjibxJA+DkMbYhMjh20EQhkg0z921YvxW+bCNXBFdVCQ0abskApnw6VlB9Q t5xw== 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:sender :dkim-signature; bh=YbkO6eX3svmIKG5IOf3KbQnfzJzo05Zk/s9XsuhsdgM=; b=YeZBSbxjWeIQUDS+lI73eSQsGRq+jwl1ZQRazwCs0pw7hv9PCKMqI/WOien/j3rO+7 goe+JmMFO1UokdeqgcmZ0VZ4lqVtFbhBr67s/XtFguDsWRsNThzer7QcQhPOnkXd2zVP Moqg8YIKe/knjfe+VWHqix+1pR/e6BeVNIDX400XkyT/BQcUSd6Ct0UYmvbkP28jgeFd 3Pf3FoiEYDMRyfH7r/J4SE2R9kiDGnxS13X6ClDE1bn7rBjhKX57g66M0hwnSI81srQ3 LfkHGMZyiB1C/dsH4I06pWoRMy7naIrnUhCkuAIms+IBFIgITahldy46JDFgmPf84dqS FNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jkECE0ZR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 2si10702302iob.47.2021.09.14.20.53.26; Tue, 14 Sep 2021 20:53:37 -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=@gmail.com header.s=20210112 header.b=jkECE0ZR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236437AbhIODx6 (ORCPT + 99 others); Tue, 14 Sep 2021 23:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236366AbhIODxy (ORCPT ); Tue, 14 Sep 2021 23:53:54 -0400 Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CDC0C061766; Tue, 14 Sep 2021 20:52:36 -0700 (PDT) Received: by mail-oo1-xc36.google.com with SMTP id b5-20020a4ac285000000b0029038344c3dso436344ooq.8; Tue, 14 Sep 2021 20:52:36 -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=YbkO6eX3svmIKG5IOf3KbQnfzJzo05Zk/s9XsuhsdgM=; b=jkECE0ZRStw6Q+C2y91NLFDDGbMCo24+eUfO5W8Zf2UooRooEgR6+ccD826ws8BQOT egJP6pkgfrD8D/D6WBg4ybOgNN97BuF+ALm8IV7syJCNG23dtJrUQudCvZ2eBpar56cd eXOODyByiVqpceuqOrBtJivz6GOuicpHqM1jNQItDPt0BTo3c1gp+4LrFetDoRfKSbLp AZ5bmv7IwRLgfFKMSGwzJY4qpA3DTZ9o9t2d5Rm6WZI9XngbNVIHyBNwpuBO+ZWFWj9N 1ZAu1KhTyBj+FCIZTl/sex87MzTpSA33dMlts9CowFJlanAOw1xGk1UY0jtyPWRXC59T rqZQ== 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=YbkO6eX3svmIKG5IOf3KbQnfzJzo05Zk/s9XsuhsdgM=; b=ds9yFT0Mx5b6BX+99r36QhjxmNWxzdgKfcJCp8lYZuQMWfJkzvq8Bz0Nbce9D8r6Aj JoCqa1Bl1YDrqB+gTKIJK6vt5nZGSu1UUAfn5e8iinK5lK6wa0uQXXV8P+k9B52B8KBd XN1+oSKbAJrdW1YREvpzBFGsBikQokeSAY9TIjSM4MRpg00s1ixH4hyf6EksDksfRjWz /dyXzCB9VURzNIGfrpW+1+/Hov8qY30mGLtijtyTDYPIr5KWpR10y2++rpeRJMZvD3Mu kxW7d4SBHF8PiXRFTjqtOx4xaFEGvYXzt2Wgqw7ZkodI/wyGoiV1ovHOnOLBf6t31MU0 2wsw== X-Gm-Message-State: AOAM533+icDGokGalj494KTIjfFhhbkOSGxYPRxDGkK3zwiLxtiBmZGt DZ2aI0FAZYgKG2/WjMYitVg= X-Received: by 2002:a4a:e60e:: with SMTP id f14mr16906786oot.84.1631677955492; Tue, 14 Sep 2021 20:52:35 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id w12sm3107794oor.23.2021.09.14.20.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:52:34 -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 v2 2/4] net: i825xx: Use absolute_pointer for memcpy from fixed memory location Date: Tue, 14 Sep 2021 20:52:25 -0700 Message-Id: <20210915035227.630204-3-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net> References: <20210915035227.630204-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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_pointer() to work around the problem. Cc: Geert Uytterhoeven Signed-off-by: Guenter Roeck --- v2: No change 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; -- 2.33.0