From: Jeff Garzik <jgarzik@pobox.com>
To: Daniele Venzano <webvenza@libero.it>
Cc: NetDev <netdev@oss.sgi.com>
Subject: Re: [PATCH 4/5] sis900 printk and stack usage audit
Date: Sat, 11 Dec 2004 14:11:13 -0500 [thread overview]
Message-ID: <41BB4651.4040106@pobox.com> (raw)
In-Reply-To: <20041208110835.GE31707@picchio.gall.it>
Daniele Venzano wrote:
> @@ -952,7 +952,11 @@
> sis900_reset(net_dev);
>
> /* Equalizer workaround Rule */
> - sis630_set_eq(net_dev, sis_priv->chipset_rev);
> + if (sis_priv->chipset_rev == SIS630E_900_REV ||
> + sis_priv->chipset_rev == SIS630EA1_900_REV ||
> + sis_priv->chipset_rev == SIS630A_900_REV ||
> + sis_priv->chipset_rev == SIS630ET_900_REV)
> + sis630_set_eq(net_dev);
>
> ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ,
> net_dev->name, net_dev);
> @@ -1141,16 +1145,12 @@
> * max >= 15 --> set equalizer to max+5 or set equalizer to max+6 if max == min
> */
>
> -static void sis630_set_eq(struct net_device *net_dev, u8 revision)
> +static void sis630_set_eq(struct net_device *net_dev)
> {
> struct sis900_private *sis_priv = net_dev->priv;
> u16 reg14h, eq_value=0, max_value=0, min_value=0;
> int i, maxcount=10;
>
> - if ( !(revision == SIS630E_900_REV || revision == SIS630EA1_900_REV ||
> - revision == SIS630A_900_REV || revision == SIS630ET_900_REV) )
> - return;
> -
> if (netif_carrier_ok(net_dev)) {
> reg14h = mdio_read(net_dev, sis_priv->cur_phy, MII_RESV);
> mdio_write(net_dev, sis_priv->cur_phy, MII_RESV,
This is a step backwards.
You are _adding_ multiple copies of the same piece of code, just to
avoid calling a function.
Jeff
next prev parent reply other threads:[~2004-12-11 19:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 10:47 [PATCH 0/5] sis900 printk and stack usage audit Daniele Venzano
2004-12-08 11:01 ` [PATCH 1/5] " Daniele Venzano
2004-12-11 19:04 ` Jeff Garzik
2004-12-11 19:06 ` Jeff Garzik
2004-12-12 8:15 ` Daniele Venzano
2004-12-08 11:04 ` [PATCH 2/5] " Daniele Venzano
2004-12-11 19:09 ` Jeff Garzik
2004-12-12 8:19 ` Daniele Venzano
2004-12-08 11:06 ` [PATCH 3/5] " Daniele Venzano
2004-12-11 19:09 ` Jeff Garzik
2004-12-08 11:08 ` [PATCH 4/5] " Daniele Venzano
2004-12-11 19:11 ` Jeff Garzik [this message]
2004-12-12 8:23 ` Daniele Venzano
2004-12-08 11:10 ` [PATCH 5/5] " Daniele Venzano
2004-12-11 19:11 ` Jeff Garzik
2004-12-12 8:27 ` Daniele Venzano
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=41BB4651.4040106@pobox.com \
--to=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=webvenza@libero.it \
/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).