From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] redundant code in common/cmd_i2c.
Date: Thu, 12 Nov 2009 15:38:19 +0100 [thread overview]
Message-ID: <m2ws1vkdus.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4AFBC3DD.5080800@denx.de> (Heiko Schocher's message of "Thu, 12 Nov 2009 09:14:21 +0100")
Hi Heiko,
> Hello PratapChandu,
>
> PratapChandu wrote:
>> The following code fragment in the file common/cmd_i2c.c seems to be redundant.
>> Is not good to delete ?
>>
>> Line 330 - 336 is like below
>>
>> #if 0
>> for (timeout = 0; timeout < 10; timeout++) {
>> udelay(2000);
>> if (i2c_probe(chip) == 0)
>> break;
>> }
>> #endif
>
> Yes, this seems to be dead code. Please provide a patch for removing
> it.
Ah uh, check the comment above which is directly related to this piece
of code. if you remove only the code, you have a dangling comment.
Maybe this was meant to be an option but nobody cared to make it
optional?
Actually I do not know if this was ever used, but we should try to do
the change consistently.
Cheers
Detlev
--
[Linux] USB consoles was a bad hack written on a drunken dare. I'm still
constantly amazed that the thing even works at all, let alone the fact that
people are actually using it :)
-- Greg KH <20090420225358.GC28697@kroah.com>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2009-11-12 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 15:14 [U-Boot] redundant code in common/cmd_i2c PratapChandu
2009-11-12 8:14 ` Heiko Schocher
2009-11-12 14:38 ` Detlev Zundel [this message]
2009-11-13 10:03 ` Heiko Schocher
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=m2ws1vkdus.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/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