linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: mikey@neuling.org
Cc: michael@ellerman.id.au, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: legacy_serial loop cleanup
Date: Sat, 25 Mar 2006 23:44:32 +1100	[thread overview]
Message-ID: <1143290672.3710.50.camel@localhost.localdomain> (raw)
In-Reply-To: <20060324041727.F131267B56@ozlabs.org>


> +static void __init setup_legacy_serial_console(int console)
> +{
> +	if (console >= 0) {
> +		struct legacy_serial_info *info =
> +			&legacy_serial_infos[legacy_serial_console];
> +		void __iomem *addr;
> +
> +		if (info->taddr == 0)
> +			return;
> +		addr = ioremap(info->taddr, 0x1000);
> +		if (addr == NULL)
> +			return;
> +		if (info->speed == 0)
> +			info->speed = udbg_probe_uart_speed(addr, info->clock);
> +		DBG("default console speed = %d\n", info->speed);
> +		udbg_init_uart(addr, info->speed, info->clock);
> +	}
> +	return;

Hrm... What is the point of having a function ending with return; ?

What about, instead, something like:

	if (consoles < 0)
		return;
	do shit ...


Ben.

      parent reply	other threads:[~2006-03-25 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24  4:17 [PATCH] powerpc: legacy_serial loop cleanup Michael Neuling
2006-03-24 18:26 ` Hollis Blanchard
2006-03-25  4:45   ` Michael Neuling
2006-03-25  7:05     ` Stephen Rothwell
2006-03-26  0:07       ` Michael Neuling
2006-03-25 12:44 ` Benjamin Herrenschmidt [this message]

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=1143290672.3710.50.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=mikey@neuling.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).