From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Thu, 12 Nov 2009 15:38:19 +0100 Subject: [U-Boot] redundant code in common/cmd_i2c. In-Reply-To: <4AFBC3DD.5080800@denx.de> (Heiko Schocher's message of "Thu, 12 Nov 2009 09:14:21 +0100") References: <880fa7950911110714w54afa0a4h896dcb64dc82e4c0@mail.gmail.com> <4AFBC3DD.5080800@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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