netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: netdev@oss.sgi.com
Cc: romieu@fr.zoreil.com
Subject: [PATCH] r8169 cleanup
Date: Fri, 10 Sep 2004 16:59:00 -0500	[thread overview]
Message-ID: <200409101659.00322.jdmason@us.ltcfwd.linux.ibm.com> (raw)

Removal of unnecessary code.  

In the first part, the double not is not necessary.  In the second part, Tx 
timeouts are already logged and this line is not needed.  Finally, a bit of 
code beautification (though it may only be for my eyes).

Thanks,
Jon

--- /usr/src/linux-2.6.9-rc1-mm4/drivers/net/r8169.c    2004-09-10 
11:16:57.535521016 -0500
+++ r8169.c     2004-09-10 16:06:49.398539048 -0500
@@ -654,7 +654,7 @@ static u32 rtl8169_get_rx_csum(struct ne
 {
        struct rtl8169_private *tp = netdev_priv(dev);

-       return !!(tp->cp_cmd & RxChkSum);
+       return (tp->cp_cmd & RxChkSum);
 }

 static int rtl8169_set_rx_csum(struct net_device *dev,  u32 data)
@@ -1694,7 +1694,6 @@ rtl8169_tx_timeout(struct net_device *de
        void *ioaddr = tp->mmio_addr;
        u8 tmp8;

-       printk(KERN_INFO "%s: TX Timeout\n", dev->name);
        /* disable Tx, if not already */
        tmp8 = RTL_R8(ChipCmd);
        if (tmp8 & CmdTxEnb)
@@ -1779,8 +1778,7 @@ static int rtl8169_start_xmit(struct sk_
        struct TxDesc *txd = tp->TxDescArray + entry;
        void *ioaddr = tp->mmio_addr;
        dma_addr_t mapping;
-       u32 status, len;
-       u32 opts1;
+       u32 status, len, opts1;
        int ret = 0;

        if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {

                 reply	other threads:[~2004-09-10 21:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409101659.00322.jdmason@us.ltcfwd.linux.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).