From patchwork Mon May 21 18:45:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10416211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A43EC6053B for ; Mon, 21 May 2018 18:48:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 947C4289E2 for ; Mon, 21 May 2018 18:48:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 882AC289E5; Mon, 21 May 2018 18:48:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 311E4289E2 for ; Mon, 21 May 2018 18:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbeEUSsB (ORCPT ); Mon, 21 May 2018 14:48:01 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:46968 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbeEUSqn (ORCPT ); Mon, 21 May 2018 14:46:43 -0400 Received: by mail-qt0-f194.google.com with SMTP id m16-v6so20183984qtg.13; Mon, 21 May 2018 11:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4kIhJpiGgXvIDgLBFrZ/QnYTDIwxtp6d0Nm8H1LamMo=; b=P2bpWWXQDWPY3SPTHcD1jJMuXsibLIy3LF3lgpjpLtw8x7tI7n2apXObH0HkE+WYvA YRbTqsHlqRnga4eBEPg1ScGcZhZIrW1OuekOC/lcSX6VGZ/6p6mVOlpTeRX6eGDwmjpI WkeEoiLfgP6ivf54ko5b6UVMX9BZkt2xKeZHz5/11GSTKx4/ohBunHYfCrHoHT/QuWVJ 805ovuGXsvj82KGHxSEMWRSKdeMwlQJZCRXjwwJsNSto/Nobmm4IRuEacw8KFEuNrm7s T9gI9zwJLKFPdPXqP+0jhSi28VG6/jxb/4R6MfP41bDPcdBlXqjHvui2zz6UkaOaSOIY zCTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4kIhJpiGgXvIDgLBFrZ/QnYTDIwxtp6d0Nm8H1LamMo=; b=sgl9NYdgUnA/wBIcWv4XxlbG6VbRtvJnehxBn+N3+v/lNan+iULIC4/ljBBqPA8LF0 y/mHXCACGnVbuCVEyyjdp61R6rKA3p/TaNZQK6vxx3ygBiTYvLJssO2uhixi9nRZe0/N OHkYythLrrp1aauUMlQShzIvG1RV40Rllni3FId3uiKVxYZ5wNpLoJbVL8JAole0UC15 qsU4PzzWChVSzcc7QKLGH6BMs+cTZy6AX9jSrOfLx/icVcPYWSxlRLZD62Uz78pBDB2n l4x5FZYyV11hCTjlobMO+BnbvY+JapDCTfo6dyyUzObhZddX2rnMW+TI5oqdcpKE9ATk sgGg== X-Gm-Message-State: ALKqPweMxm9+YHvPZdV5YuJ+cR+AXMDaFkR4HRa37kIddF+kasBmqvDQ entQciho9kcO33/ISeKGgTO5H8KM X-Google-Smtp-Source: AB8JxZrnTISgYU3pxTz+zMIbgL5OgZ2GoUMDpMeZNcHoAyZLheeFr8SKapCji8Xij+kmsVgf4tc5hw== X-Received: by 2002:ac8:186f:: with SMTP id n44-v6mr18517921qtk.241.1526928402345; Mon, 21 May 2018 11:46:42 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id s186-v6sm10197885qkb.53.2018.05.21.11.46.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 11:46:41 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Grygorii Strashko , "David S. Miller" , Ivan Khoronzhuk , Andrew Morton , Keerthy , Bhumika Goyal , =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= , Richard Cochran , Lukas Wunner , Rob Herring , linux-omap@vger.kernel.org (open list:TI ETHERNET SWITCH DRIVER (CPSW)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next 5/5] ti: ethernet: davinci: Fix cast to int warnings Date: Mon, 21 May 2018 11:45:55 -0700 Message-Id: <20180521184555.21555-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180521184555.21555-1-f.fainelli@gmail.com> References: <20180521184555.21555-1-f.fainelli@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we can compile test this driver on 64-bit hosts, we get some warnings about how a pointer/address is written/read to/from a register (sw_token). Fix this by doing the appropriate conversions, we cannot possibly have the driver work on 64-bit hosts the way the tokens are managed though, since the registers being written to a 32-bit only. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/davinci_cpdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 9ec49213de5e..cdbddf16dd29 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -1080,7 +1080,7 @@ int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data, writel_relaxed(buffer, &desc->hw_buffer); writel_relaxed(len, &desc->hw_len); writel_relaxed(mode | len, &desc->hw_mode); - writel_relaxed(token, &desc->sw_token); + writel_relaxed((uintptr_t)token, &desc->sw_token); writel_relaxed(buffer, &desc->sw_buffer); writel_relaxed(len, &desc->sw_len); desc_read(desc, sw_len); @@ -1121,15 +1121,15 @@ static void __cpdma_chan_free(struct cpdma_chan *chan, struct cpdma_desc_pool *pool = ctlr->pool; dma_addr_t buff_dma; int origlen; - void *token; + uintptr_t token; - token = (void *)desc_read(desc, sw_token); + token = desc_read(desc, sw_token); buff_dma = desc_read(desc, sw_buffer); origlen = desc_read(desc, sw_len); dma_unmap_single(ctlr->dev, buff_dma, origlen, chan->dir); cpdma_desc_free(pool, desc, 1); - (*chan->handler)(token, outlen, status); + (*chan->handler)((void *)token, outlen, status); } static int __cpdma_chan_process(struct cpdma_chan *chan)