Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: vkoul@infradead.org (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/9] PL08x further cleanups
Date: Mon, 25 Jul 2011 20:08:31 +0530	[thread overview]
Message-ID: <1311604711.8206.19.camel@vkoul-mobl4> (raw)
In-Reply-To: <20110725142201.GA14955@n2100.arm.linux.org.uk>

On Mon, 2011-07-25 at 15:22 +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 25, 2011 at 07:21:12PM +0530, Vinod Koul wrote:
> > On Mon, 2011-07-25 at 14:43 +0100, Russell King - ARM Linux wrote:
> > > No.  This function is used as:
> > > 
> > > +       width = pl08x_width(addr_width);
> > > +       if (width == ~0) {
> > >                 dev_err(&pl08x->adev->dev,
> > >                         "bad runtime_config: alien address width\n");
> > >                 return -EINVAL;
> > >         }
> > > 
> > > Notice that it returns a u32 so negative errnos don't make sense.  It
> > > returns ~0 to indicate error.
> > > 
> > > The code is actually correct as it stands, it's just gcc deciding to
> > > emit a warning for an unhandled enum value which isn't really unhandled.
> > > Just move the 'return ~0;' at the end of the function inside the switch
> > > as a default case to shut it up.
> > Okay but shouldn't this ideally check for width < 0, that way we can
> > return proper errors?
> 
> No.  Two reasons:
> 
> 1. u32 < 0 does not exist.
> 
> 2. It's returning a sub bitmask value for the register, so signed numbers
>    conceptually don't make sense.
Agreed, Pushed this with return ~0;
You should be able to see your patchset along with this change in my
tree now

-- 
~Vinod Koul
Intel Corp.

  reply	other threads:[~2011-07-25 14:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 13:10 [PATCH 0/9] PL08x further cleanups Russell King - ARM Linux
2011-07-05 13:10 ` [PATCH 1/9] DMA: PL08x: remove unused constants Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 2/9] DMA: PL08x: select LLI bus only once per LLI setup Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 3/9] DMA: PL08x: clean up LLI debugging Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 4/9] DMA: PL08x: separately store source/destination slave address Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 5/9] DMA: PL08x: separately store source/destination cctl Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 6/9] DMA: PL08x: constify plchan->cd and plat->slave_channels Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 7/9] DMA: PL08x: cleanup selection of buswidth Russell King - ARM Linux
2011-07-05 13:13 ` [PATCH 8/9] DMA: PL08x: avoid recalculating cctl at each prepare Russell King - ARM Linux
2011-07-05 13:13 ` [PATCH 9/9] DMA: PL08x: cleanup selection of burst size Russell King - ARM Linux
2011-07-07 19:51 ` [PATCH 0/9] PL08x further cleanups Linus Walleij
2011-07-13 23:05 ` Koul, Vinod
2011-07-21 16:08   ` Russell King - ARM Linux
2011-07-21 16:11     ` [PATCH 1/9] DMA: PL08x: remove unused constants Russell King - ARM Linux
2011-07-21 16:11     ` [PATCH 2/9] DMA: PL08x: select LLI bus only once per LLI setup Russell King - ARM Linux
2011-07-21 16:12     ` [PATCH 3/9] DMA: PL08x: clean up LLI debugging Russell King - ARM Linux
2011-07-21 16:12     ` [PATCH 4/9] DMA: PL08x: separately store source/destination slave address Russell King - ARM Linux
2011-07-21 16:12     ` [PATCH 5/9] DMA: PL08x: separately store source/destination cctl Russell King - ARM Linux
2011-07-21 16:13     ` [PATCH 6/9] DMA: PL08x: constify plchan->cd and plat->slave_channels Russell King - ARM Linux
2011-07-21 16:13     ` [PATCH 7/9] DMA: PL08x: cleanup selection of buswidth Russell King - ARM Linux
2011-07-21 16:13     ` [PATCH 8/9] DMA: PL08x: avoid recalculating cctl at each prepare Russell King - ARM Linux
2011-07-21 16:14     ` [PATCH 9/9] DMA: PL08x: cleanup selection of burst size Russell King - ARM Linux
2011-07-25 13:38     ` [PATCH 0/9] PL08x further cleanups Vinod Koul
2011-07-25 13:43       ` Russell King - ARM Linux
2011-07-25 13:51         ` Vinod Koul
2011-07-25 14:22           ` Russell King - ARM Linux
2011-07-25 14:38             ` Vinod Koul [this message]
2011-07-25 13:51         ` Vinod Koul

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=1311604711.8206.19.camel@vkoul-mobl4 \
    --to=vkoul@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.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