From patchwork Sun May 30 12:22:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junchang Wang X-Patchwork-Id: 53996 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 482D8B7D2F for ; Sun, 30 May 2010 22:22:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752814Ab0E3MWG (ORCPT ); Sun, 30 May 2010 08:22:06 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:45534 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400Ab0E3MWE (ORCPT ); Sun, 30 May 2010 08:22:04 -0400 Received: by pxi18 with SMTP id 18so1132964pxi.19 for ; Sun, 30 May 2010 05:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=9hur0K81FRT456QHk/kvT7VKIaP9a+1JpzydUu1cwAw=; b=h+GuGsmhXkyKR0ji8Mqg42DVovlxCUURKFbdwSySBPudZgdEFsUblcDqK7a/81Ja/7 u6E4lJWRyBJ7HSKy2TqE/XBih0TeMRt/HcfvxhBksWDPf55KrlTIfq0JKBSU7zCx5/lk 5dp8fEy81nFpF6dKHK6WtSN/+kssDrGqKKlpE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=mTduWg+u3tG54iQ7C2craIV14kZ92htFe0M/6Ln6dCVu53/CVV4QDiZ2vphjvypcm0 MLNOw2sbTqTIHvu7z7wLWjmF2IEaB+R9wamFav+Ph6nkCMK9CtpNaJxHy3ruROVrTXYm AoQoaeOD0bNqooO5SRiWh+4KxHeZofFCf5/Pc= Received: by 10.115.84.32 with SMTP id m32mr2374052wal.103.1275222121798; Sun, 30 May 2010 05:22:01 -0700 (PDT) Received: from host-a-55.ustcsz.edu.cn ([58.211.218.74]) by mx.google.com with ESMTPS id f11sm39222062wai.11.2010.05.30.05.21.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 May 2010 05:22:01 -0700 (PDT) Date: Sun, 30 May 2010 20:22:14 +0800 From: Junchang Wang To: davem@davemloft.net, romieu@fr.zoreil.com Cc: netdev@vger.kernel.org Subject: [Patch]8139too: remove unnecessary cast of ioread32()'s return value Message-ID: <20100530122213.GB1146@host-a-55.ustcsz.edu.cn> Mail-Followup-To: davem@davemloft.net, romieu@fr.zoreil.com, netdev@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org ioread32() returns a 32-bit integer on all platforms. There is no need to cast its return value. Signed-off-by: Junchang Wang --- drivers/net/8139too.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 4ba7293..cc7d462 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -662,7 +662,7 @@ static const struct ethtool_ops rtl8139_ethtool_ops; /* read MMIO register */ #define RTL_R8(reg) ioread8 (ioaddr + (reg)) #define RTL_R16(reg) ioread16 (ioaddr + (reg)) -#define RTL_R32(reg) ((unsigned long) ioread32 (ioaddr + (reg))) +#define RTL_R32(reg) ioread32 (ioaddr + (reg)) static const u16 rtl8139_intr_mask = @@ -861,7 +861,7 @@ retry: /* if unknown chip, assume array element #0, original RTL-8139 in this case */ dev_dbg(&pdev->dev, "unknown chip version, assuming RTL-8139\n"); - dev_dbg(&pdev->dev, "TxConfig = 0x%lx\n", RTL_R32 (TxConfig)); + dev_dbg(&pdev->dev, "TxConfig = 0x%x\n", RTL_R32 (TxConfig)); tp->chipset = 0; match: @@ -1642,7 +1642,7 @@ static void rtl8139_tx_timeout_task (struct work_struct *work) netdev_dbg(dev, "Tx queue start entry %ld dirty entry %ld\n", tp->cur_tx, tp->dirty_tx); for (i = 0; i < NUM_TX_DESC; i++) - netdev_dbg(dev, "Tx descriptor %d is %08lx%s\n", + netdev_dbg(dev, "Tx descriptor %d is %08x%s\n", i, RTL_R32(TxStatus0 + (i * 4)), i == tp->dirty_tx % NUM_TX_DESC ? " (queue head)" : ""); @@ -2486,7 +2486,7 @@ static void __set_rx_mode (struct net_device *dev) int rx_mode; u32 tmp; - netdev_dbg(dev, "rtl8139_set_rx_mode(%04x) done -- Rx config %08lx\n", + netdev_dbg(dev, "rtl8139_set_rx_mode(%04x) done -- Rx config %08x\n", dev->flags, RTL_R32(RxConfig)); /* Note: do not reorder, GCC is clever about common statements. */