lkml.org 
[lkml]   [2008]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts
Hello Hans,

Hans J. Koch wrote:
> Am Fri, 23 May 2008 11:10:09 +0200
> schrieb Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>:
>
> > Hans J. Koch wrote:
> > > Am Fri, 23 May 2008 07:55:27 +0200
> > > schrieb Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>:
> > >
> > > > Hello Hans,
> > > >
> > > > > - Copyright (c) 2006 by Hans-JÃŒrgen Koch.</para>
> > > > > + Copyright (c) 2006-2008 by Hans-JÃŒrgen Koch.</para>
> > > > This looks wrong.
> > >
> > > DocBook XML is supposed to be UTF-8.
> > Correct. But still the problem is real. The headers of your mail
> > claim the content to be encoded in UTF-8, but actually it's latin1.
> > So I cannot apply the patch you sent with git am without hand editing.
>
> Try the version below.
This one is better---I can apply it.

> + if (copy_from_user(&irq_on, buf, count))
> + return -EFAULT;
> +
> + if (!idev->info->irqcontrol)
> + return -ENOSYS;
I would swap these two. copy_from_user is more expensive than testing
idev->info->irqcontrol. (Is it really?) Anyhow only fetching a value
from userspace if you really need it looks more clean to me.

Otherwise the patch looks fine.

Uwe


--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-05-23 12:59    [W:0.069 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site