Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp388200iog; Wed, 15 Jun 2022 04:30:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFafm9BKcs5bgqwDlADFtmrlWtRyz2tyElcuF5CnjddwdIya025z3I79xJhXG1bVcokQDT X-Received: by 2002:a05:6402:518d:b0:431:5487:9606 with SMTP id q13-20020a056402518d00b0043154879606mr12321638edd.177.1655292617599; Wed, 15 Jun 2022 04:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655292617; cv=none; d=google.com; s=arc-20160816; b=rScirwguFXIeVNLknCTtAazNEEaOW0P6GXe5bgSzWy46WsKqKsni7UMnXU3F2ZYrB2 sapcXyjtuUh8oiBB42YI0mH8ssevBTMmoGzzY/9IBezvA4+jB9dy5N3qKjKMTJSgw16c DNVK6RRY7KCL9uijb0JUVry7Rz+JJRhPrGjUuMG6eV4J2LrytxJx4wOwOEdYhCAO2UJK bQswuR03rd+8dYQJDw+IRaFPT+h0MHA2CESU6M6C91uIn0Yc9CDCZWvpFs0QznQKh0Nh pgFgsNnv2T/0X8oG496nqbjS4aa8GesHQ4DbtQZ3Y3qzD9dcko1hZADpJ2ny/neaza+U P6Qw== 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 :message-id:date:subject:cc:to:from; bh=22exwN3gIi4Pfu2R5cpo+7Mmwjyf1dYzNz3NiFM+o+g=; b=b5LuLaymy7dsRJe8Wf7kIRLk0JRlA45Eheu5RHSjeGeS/O/AoTJosqEPgjj6bUYaw1 W044qtAuW+S5mUTM0Mpb0KH7lMqQId4GmSEL0cfby5L/r46VqO1sorci8T6oR0X7kvpC ntcw8qsqrZs28bWZqwGUqbCcyeoDSgnDtLiyVXfgBiOgJLjxxX33zf408TCFWdrH9hm3 9Gc6qFZWALa0LgnvJ7wxRIUUELVOy9Q1OUeqT7qmYK4LL5B+1MMXp4vZ8mnvpuR8cYqF GiVVQhE057cBcdF4MqbO5wYOJwJ3uXxc4yfPyct0E7RryCb4KHDTQoWsOzQd9Lu8WGIf OH/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dk23-20020a0564021d9700b004314f75adb4si1363757edb.461.2022.06.15.04.29.51; Wed, 15 Jun 2022 04:30:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347763AbiFOL2t (ORCPT + 99 others); Wed, 15 Jun 2022 07:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347176AbiFOL2a (ORCPT ); Wed, 15 Jun 2022 07:28:30 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 881F650B06 for ; Wed, 15 Jun 2022 04:28:28 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:1568:8330:e22d:e2d2]) by michel.telenet-ops.be with bizsmtp id jPUP270030XlP1U06PUP9Y; Wed, 15 Jun 2022 13:28:26 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1o1R4E-0043qr-4S; Wed, 15 Jun 2022 13:20:10 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1o11IZ-0063Z6-13; Tue, 14 Jun 2022 09:49:15 +0200 From: Geert Uytterhoeven To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Vinod Koul , =?UTF-8?q?Martin=20Povi=C5=A1er?= Cc: linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH -next] dmaengine: apple-admac: Fix build on 32-bit/non-LPAE platforms Date: Tue, 14 Jun 2022 09:49:15 +0200 Message-Id: <20220614074915.1443629-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PHYS_ADDR_T_64BIT is not set: drivers/dma/apple-admac.c: In function ‘admac_cyclic_write_one_desc’: drivers/dma/apple-admac.c:213:22: error: right shift count >= width of type [-Werror=shift-count-overflow] 213 | writel_relaxed(addr >> 32, ad->base + REG_DESC_WRITE(channo)); | ^~ Fix this by using the {low,upp}er_32_bits() helper macros to obtain the address parts. Reported-by: noreply@ellerman.id.au Fixes: b127315d9a78c011 ("dmaengine: apple-admac: Add Apple ADMAC driver") Signed-off-by: Geert Uytterhoeven --- drivers/dma/apple-admac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/apple-admac.c b/drivers/dma/apple-admac.c index c502f8c3aca79be1..d1f74a3aa999d773 100644 --- a/drivers/dma/apple-admac.c +++ b/drivers/dma/apple-admac.c @@ -209,10 +209,10 @@ static void admac_cyclic_write_one_desc(struct admac_data *ad, int channo, dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%lx\n", channo, &addr, tx->period_len, FLAG_DESC_NOTIFY); - writel_relaxed(addr, ad->base + REG_DESC_WRITE(channo)); - writel_relaxed(addr >> 32, ad->base + REG_DESC_WRITE(channo)); - writel_relaxed(tx->period_len, ad->base + REG_DESC_WRITE(channo)); - writel_relaxed(FLAG_DESC_NOTIFY, ad->base + REG_DESC_WRITE(channo)); + writel_relaxed(lower_32_bits(addr), ad->base + REG_DESC_WRITE(channo)); + writel_relaxed(upper_32_bits(addr), ad->base + REG_DESC_WRITE(channo)); + writel_relaxed(tx->period_len, ad->base + REG_DESC_WRITE(channo)); + writel_relaxed(FLAG_DESC_NOTIFY, ad->base + REG_DESC_WRITE(channo)); tx->submitted_pos += tx->period_len; tx->submitted_pos %= 2 * tx->buf_len; -- 2.25.1