Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1397045ybi; Fri, 12 Jul 2019 15:22:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtF/Cl4ip41GLHKMEge5oywYof7VIgPkBiCtMZdJwr2Mx3k9xO3oipFb4BNE+8dGQ86TLD X-Received: by 2002:a63:484d:: with SMTP id x13mr13554833pgk.122.1562970149839; Fri, 12 Jul 2019 15:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562970149; cv=none; d=google.com; s=arc-20160816; b=YHaFpPcob2Y2pmvXlERgOuyJ5Z4WcGgmjFRPBi9dyniaC4tzJUlNFQ6PuD1REzFNIR gdUmlgetdOzB3QWTB29/s+CDbEiL/z90VbqqVYaxSO1tHwRbGSOvSzdKvSdAle+LcntZ jfkX34lrO1RNEFkdHqpZbjCZX6o4kRMSKOPeGkodGuzHisnyHh7uTgvVfiqBNa5fk4K7 Iba6ADam3XLaE7bxhhyAwysWFyekFiQql3zCmlC69zfr/ITDbk5gZFSyQKvWr0GJFmmc JpNRsF1tfpYF9BzpQVFpu1sgpH9tf+sz2EWwtbTSu+Gp8lcQbOIblBpdmI8cBLWVuz7I +CUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=zsaTEV5Bh54btkVd6e9DvM50eOUBgtr+upv58G3ejXU=; b=kSSZ80uINUQRw1vEeGNSEL7GGCIjPFFqZVGQZ3wH40fTeEIP+BNUZdBvWTBRMk8SfI 5vCq0LLGi970GaCK8xaNldLXTXABTQF2ggUvaYj8/Rf5felQDh61E97d9nqTIP6nkFEY dYfxjed5DjHgfddo85ElYxuozaLnuy3A328oncN3cwlvLTOG5gVTw4Rp8RHQU6HGT+ot ezoYaEqBmzbt20x8EIYDpO4Vxo9EOvv42wwpWdXevk+jWQ7qM9+6Gcwq0si94VZ1Y9X0 P8JcFTuyurOgPFkauSWvj+EBvjc64yphj2AR9zljDRGHrljaoou3crq2AXZGPeFoc0qh bY6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si9381423pfh.276.2019.07.12.15.22.08; Fri, 12 Jul 2019 15:22:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728061AbfGLWUB (ORCPT + 99 others); Fri, 12 Jul 2019 18:20:01 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:34138 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727245AbfGLWUA (ORCPT ); Fri, 12 Jul 2019 18:20:00 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EE2EC14E01AA6; Fri, 12 Jul 2019 15:19:59 -0700 (PDT) Date: Fri, 12 Jul 2019 15:19:59 -0700 (PDT) Message-Id: <20190712.151959.494337984512463318.davem@davemloft.net> To: arnd@arndb.de Cc: ivan.khoronzhuk@linaro.org, grygorii.strashko@ti.com, andrew@lunn.ch, ilias.apalodimas@linaro.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [net-next] davinci_cpdma: don't cast dma_addr_t to pointer From: David Miller In-Reply-To: <20190710080106.24237-1-arnd@arndb.de> References: <20190710080106.24237-1-arnd@arndb.de> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 12 Jul 2019 15:20:00 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Wed, 10 Jul 2019 10:00:33 +0200 > dma_addr_t may be 64-bit wide on 32-bit architectures, so it is not > valid to cast between it and a pointer: > > drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_si': > drivers/net/ethernet/ti/davinci_cpdma.c:1047:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_idle_submit_mapped': > drivers/net/ethernet/ti/davinci_cpdma.c:1114:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_mapped': > drivers/net/ethernet/ti/davinci_cpdma.c:1164:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > > Solve this by using two separate members in 'struct submit_info'. > Since this avoids the use of the 'flag' member, the structure does > not even grow in typical configurations. > > Fixes: 6670acacd59e ("net: ethernet: ti: davinci_cpdma: add dma mapped submit") > Signed-off-by: Arnd Bergmann Applied.