linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: linux-kernel@vger.kernel.org,
	Matt Porter <mporter@kernel.crashing.org>,
	Li Yang <leoli@freescale.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Thomas Moll <thomas.moll@sysgo.com>
Subject: Re: [PATCH -mm 4/5] RapidIO: Add switch domain routines
Date: Tue, 4 May 2010 16:24:57 -0700	[thread overview]
Message-ID: <20100504162457.0c8d23ba.akpm@linux-foundation.org> (raw)
In-Reply-To: <1272901558-9292-5-git-send-email-alexandre.bounine@idt.com>

On Mon,  3 May 2010 11:45:57 -0400
Alexandre Bounine <alexandre.bounine@idt.com> wrote:

> +static int
> +idtcps_set_domain(struct rio_mport *mport, u16 destid, u8 hopcount,
> +		       u8 sw_domain)
> +{
> +	/*
> +	 * Switch domain configuration operates only at global level
> +	 */
> +	rio_mport_write_config_32(mport, destid, hopcount,
> +				  IDTCPS_RIO_DOMAIN, (u32)sw_domain);
> +	return 0;
> +}
> +
> +static int
> +idtcps_get_domain(struct rio_mport *mport, u16 destid, u8 hopcount,
> +		       u8 *sw_domain)
> +{
> +	u32 regval;
> +
> +	/*
> +	 * Switch domain configuration operates only at global level
> +	 */
> +	rio_mport_read_config_32(mport, destid, hopcount,
> +				IDTCPS_RIO_DOMAIN, &regval);
> +
> +	*sw_domain = (u8)(regval & 0xff);
> +
> +	return 0;
> +}

This ignores the return values from rio_mport_write_config_*().

AFACIT these things always return hard-wired 0 anyway.  Perhaps we
should give up and change ->cread() and friends to return void.  That
beats the alternative of adding lots of untestable test-n-return
unwinding code.


  reply	other threads:[~2010-05-04 23:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 15:45 [PATCH -mm 0/5] RapidIO: Set of patches to current -mm tree Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 1/5] RapidIO: Fixed typos and minor edits Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 2/5] RapidIO: Add debug configuration option Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 3/5] RapidIO: Modify initialization of switch operations Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 4/5] RapidIO: Add switch domain routines Alexandre Bounine
2010-05-04 23:24   ` Andrew Morton [this message]
2010-05-05 12:24     ` Bounine, Alexandre
2010-05-03 15:45 ` [PATCH -mm 5/5] RapidIO: Use default route value for CPS switches Alexandre Bounine
2010-05-18  6:28 ` [PATCH 0/1] RapidIO: Fix maintenance access to higher memory areas Thomas Moll

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=20100504162457.0c8d23ba.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alexandre.bounine@idt.com \
    --cc=galak@kernel.crashing.org \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@kernel.crashing.org \
    --cc=thomas.moll@sysgo.com \
    /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).