kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tg3_phy_copper_begin: duplicated argument to ||
@ 2012-07-25 12:42 Fengguang Wu
  0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2012-07-25 12:42 UTC (permalink / raw)
  To: kernel-janitors

Hi Matt,

coccinelle complaints about:

drivers/net/ethernet/broadcom/tg3.c:4053:8-39: duplicated argument to && or ||

I'm not sure if the code intends to retry the operation (or a silly
copy&paste error). If it's the former case, it might be better to add
a comment..
               
 4046                 if (!tg3_readphy(tp, MII_BMCR, &orig_bmcr) &&
 4047                     (bmcr != orig_bmcr)) {
 4048                         tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK);
 4049                         for (i = 0; i < 1500; i++) {
 4050                                 u32 tmp;
 4051                           
 4052                                 udelay(10);
 4053 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> if (tg3_readphy(tp, MII_BMSR, &tmp) ||
 4054 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>     tg3_readphy(tp, MII_BMSR, &tmp))
 4055                                         continue;
 4056                                 if (!(tmp & BMSR_LSTATUS)) {
 4057                                         udelay(40);
 4058                                         break;
 4059                                 }
 4060                         }
 4061                         tg3_writephy(tp, MII_BMCR, bmcr);

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-25 12:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 12:42 tg3_phy_copper_begin: duplicated argument to || Fengguang Wu

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).