mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thiago Farina <tfransosi@gmail.com>
To: trivial@kernel.org
Cc: yanghy@cn.fujitsu.com, baum@tehutinetworks.net,
	andy@greyhouse.net, davem@davemloft.net, shemminger@vyatta.com,
	apkm@linux-fundation.org, ben@decadent.org.uk,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thiago Farina <tfransosi@gmail.com>
Subject: [PATCH]  trivial: remove duplicated MIN macro from tehuti.
Date: Tue,  3 Nov 2009 08:10:29 -0500	[thread overview]
Message-ID: <1257253829-4531-1-git-send-email-tfransosi@gmail.com> (raw)

Since the kernel api already has the macro "min",
just use it instead of declaring another one.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 drivers/net/tehuti.c |    2 +-
 drivers/net/tehuti.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index ec9dfb2..863084d 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1878,7 +1878,7 @@ static void bdx_tx_push_desc_safe(struct bdx_priv *priv, void *data, int size)
 			udelay(50);	/* give hw a chance to clean fifo */
 			continue;
 		}
-		avail = MIN(avail, size);
+		avail = min(avail, size);
 		DBG("about to push  %d bytes starting %p size %d\n", avail,
 		    data, size);
 		bdx_tx_push_desc(priv, data, avail);
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index 4fc875e..1241419 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -76,8 +76,6 @@
 #define FIFO_SIZE  4096
 #define FIFO_EXTRA_SPACE            1024
 
-#define MIN(x, y)  ((x) < (y) ? (x) : (y))
-
 #if BITS_PER_LONG == 64
 #    define H32_64(x)  (u32) ((u64)(x) >> 32)
 #    define L32_64(x)  (u32) ((u64)(x) & 0xffffffff)
-- 
1.6.5.1.61.ge79999


             reply	other threads:[~2009-11-03 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03 13:10 Thiago Farina [this message]
2009-11-04 13:07 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-11-02 20:45 Thiago Farina
2009-11-04  1:36 ` Yang Hongyang

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=1257253829-4531-1-git-send-email-tfransosi@gmail.com \
    --to=tfransosi@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=apkm@linux-fundation.org \
    --cc=baum@tehutinetworks.net \
    --cc=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=trivial@kernel.org \
    --cc=yanghy@cn.fujitsu.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

all inboxes | Powered by JetHome®