kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: tg3_phy_copper_begin: duplicated argument to ||
Date: Wed, 25 Jul 2012 12:42:38 +0000	[thread overview]
Message-ID: <20120725124238.GA29871@localhost> (raw)

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

                 reply	other threads:[~2012-07-25 12:42 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=20120725124238.GA29871@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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).