All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus Klotzbücher" <mk@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 1/2] mpc83xx: Add MPC837x PCIE controller RC mode
Date: Tue, 25 Mar 2008 12:11:11 +0100	[thread overview]
Message-ID: <87abkndpo0.fsf_-_@denx.de> (raw)
In-Reply-To: <20080325103613.GA32107@game.jcrosoft.org> (Jean-Christophe PLAGNIOL-VILLARD's message of "Tue\, 25 Mar 2008 11\:36\:13 +0100")


Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> writes:

>> +
>> +	reg16 = in_le16(hose_cfg_base + PEX_LTSSM_STAT);
>> +	if (reg16 < 0x16) {
>> +		printf("No link\n");
>> +		hose->indirect_type = INDIRECT_TYPE_NO_PCIE_LINK;
>> +	} else {
>> +		printf("link\n");
>> +	}
> please remove the bracket on the else

Come on, this is being ridiculously pedantic.

And wrong by Linux coding style. Quoting from Documentation/CodingStyle

Do not unnecessarily use braces where a single statement will do.

if (condition)
        action();

This does not apply if one branch of a conditional statement is a single
statement. Use braces in both branches.

if (condition) {
        do_this();
        do_that();
} else {
        otherwise();
}

Best regards

Markus Klotzbuecher

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

  reply	other threads:[~2008-03-25 11:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24 18:42 [U-Boot-Users] [PATCH 1/2] mpc83xx: Add MPC837x PCIE controller RC mode Anton Vorontsov
2008-03-25 10:04 ` Liu Dave
2008-03-25 10:36 ` Jean-Christophe PLAGNIOL-VILLARD
2008-03-25 11:11   ` Markus Klotzbücher [this message]
2008-03-25 14:29     ` Jon Loeliger

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=87abkndpo0.fsf_-_@denx.de \
    --to=mk@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.