From patchwork Fri Aug 13 22:00:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 496578 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp973725jar; Fri, 13 Aug 2021 15:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwdz2YqzQvk/WaXAwpyBh/hd6yXQOCTW4I7R/Cj9JE8/Q/h2t73mUU8YPvFHGg3lhhdQu9 X-Received: by 2002:a17:906:c085:: with SMTP id f5mr4680146ejz.250.1628892161481; Fri, 13 Aug 2021 15:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628892161; cv=none; d=google.com; s=arc-20160816; b=MXx4HQcpDuxVp4SHtWuNiyu8O9eNcwXSUbcdXJb+Z11DoUOJzXjm/MCs7JBj0T3Aaf ClpCCCWnSmQkLH1V3NILeU9INYjIskzyGyvgvG52cGhgGW8qgDt5cX0b9UrYJ6AwXH/c c0HgtiTGkNzrUV0/Ms/wJeXlTuQoqDNEpJN7Hudfuh96Rwo3Gu37FpSs6/iX7YXTmFB9 I9AQ94VIjn8l13t8BAf4eyYoHus/8odCJ8qQpRZ1AsgZ3wd1P3ZwU7vkGc9HIRqCYkk9 nNqTlFYLYnCDILBwWB+Vcckgk1I8JP4v6Z24bWpr1EmH8AKDGE4dZ5V7S9kUTEOU++EL iHZA== 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 :dkim-signature; bh=D7ibt3Lae3RXcE7WOmyu3z09/xMR6Le2PSBAAAdLFdU=; b=UWDSrB+KjfP3WYP3v3163CozFssv+SXr960T2AHb0PZ6ZU100/YTub2+UPdB/8B2wR mny//0lr41nE3DRz9Rz8RmYkYSIUdCxNbhovtN8/QJgdABkKlqrvTnXTueqRVkycfxNj fXTQ4WWxQLja41ojV3sDSn6/LSoJrjxjQesyvGegrP8foX00ih42M7LRMynsFolbUDDS qbsh5KT/yx3nPwcGEsatjCcZFyy6EwgQNdvNJpa8cnZ7GHet/NlkDYGvQA4vAXjd3aV3 j9k4glOirYGRNul818H4lFe4azqSGlcAAt7SvA1pPjNAehlqh0qz0xwt0kD545zK2YoA ni0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hVKB29Td; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si3299982eji.591.2021.08.13.15.02.41; Fri, 13 Aug 2021 15:02:41 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=@linaro.org header.s=google header.b=hVKB29Td; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235170AbhHMWDH (ORCPT + 8 others); Fri, 13 Aug 2021 18:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235144AbhHMWDG (ORCPT ); Fri, 13 Aug 2021 18:03:06 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 233EBC061756 for ; Fri, 13 Aug 2021 15:02:39 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id d4so22438595lfk.9 for ; Fri, 13 Aug 2021 15:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D7ibt3Lae3RXcE7WOmyu3z09/xMR6Le2PSBAAAdLFdU=; b=hVKB29Tdp9LzYodfipQgUNFoTQLBDI66LWsSnsKsthXwH/23aVidLzeYKKHAnhxWfF qylJUEcmwpbDttYGuNTxegmFzQLLYhwhi5LnnOQ4BQimumIO6ikoezX7NCLJsSNpPg+I j2aFbJUNNU5l4J4JRVeO2D7UOoQ2Zml9NaUZL7EWAIhf7Zo2AEQQK79NK7NN86gjCvPH b4Cqj1yzwi3mig3ORx1LqvLVxYX34wFwoQtfknra6wWbESRhUqmapKQvvT8nsvsmKh+L NAjb4CNNexYGHqJZ/2WRxS7OFEK78o+QSTKD6VqGz7M7a06guyf10AqFnOlvoG3Lu2W4 S4cA== 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:mime-version:content-transfer-encoding; bh=D7ibt3Lae3RXcE7WOmyu3z09/xMR6Le2PSBAAAdLFdU=; b=jCPf43IS4CUqDc9vofdWuilqcVKL4dIKlizxpKaLkzBEbk868h4IuKhUjjJK2VxVKd yyUX4VtZTr9PW9IkiKBze5PPZcw9j5VgnGDiYGrQxOv04+Qb0TwwC0s0wn1miq3aTdfp RtARcBq2gI1ZIJ54t1UdadKHS13QSvksLYKZv4aHzDAmnV2u8LB/EZl6yUXiqtHEpbJ+ 0buhB01haW2U/cLJ+M0vHNtac3puBGLUQV6RdjTF+JAWj9ukVLJLwVLTUq/tmWo/Sj5n PPpgQ7vNMVn5/mWlLzLCcj+am4Oy8pfglSpoZwa+jf90JykahC2BdcpJe3DJeZxgjVce ieOw== X-Gm-Message-State: AOAM531gFG25ka6v+PACWpumwmNIYrppclSNzXrxfxt7wt8M76088BzB uLz8NimVy4IoLa3R/QLY/JosCFrV861PEg== X-Received: by 2002:a05:6512:1295:: with SMTP id u21mr3259433lfs.384.1628892157401; Fri, 13 Aug 2021 15:02:37 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id s17sm274912ljp.61.2021.08.13.15.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 15:02:37 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski Cc: Imre Kaloz , Krzysztof Halasa , Arnd Bergmann , Linus Walleij Subject: [PATCH net-next 2/6 v2] ixp4xx_eth: fix compile-testing Date: Sat, 14 Aug 2021 00:00:07 +0200 Message-Id: <20210813220011.921211-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813220011.921211-1-linus.walleij@linaro.org> References: <20210813220011.921211-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Change the driver to use portable integer types to avoid warnings during compile testing, including: drivers/net/ethernet/xscale/ixp4xx_eth.c:721:21: error: cast to 'u32 *' (aka 'unsigned int *') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast] memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4); ^ drivers/net/ethernet/xscale/ixp4xx_eth.c:963:12: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &port->desc_tab_phys))) ^~~~~~~~~~~~~~~~~~~~ include/linux/dmapool.h:27:20: note: passing argument to parameter 'handle' here dma_addr_t *handle); ^ Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.31.1 diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 0bd22beb83ed..931494cc1c39 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "ixp46x_ts.h" @@ -177,7 +176,7 @@ struct port { struct eth_plat_info *plat; buffer_t *rx_buff_tab[RX_DESCS], *tx_buff_tab[TX_DESCS]; struct desc *desc_tab; /* coherent */ - u32 desc_tab_phys; + dma_addr_t desc_tab_phys; int id; /* logical port ID */ int speed, duplex; u8 firmware[4]; @@ -857,14 +856,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) bytes = len; mem = skb->data; #else - offset = (int)skb->data & 3; /* keep 32-bit alignment */ + offset = (uintptr_t)skb->data & 3; /* keep 32-bit alignment */ bytes = ALIGN(offset + len, 4); if (!(mem = kmalloc(bytes, GFP_ATOMIC))) { dev_kfree_skb(skb); dev->stats.tx_dropped++; return NETDEV_TX_OK; } - memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4); + memcpy_swab32(mem, (u32 *)((uintptr_t)skb->data & ~3), bytes / 4); #endif phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE);