From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user
Date: Fri, 04 Jun 2010 17:14:37 +0000 [thread overview]
Message-ID: <4C09347D.9000007@bfs.de> (raw)
In-Reply-To: <20100604103629.GC5483@bicker>
Dan Carpenter schrieb:
> On Fri, Jun 04, 2010 at 02:26:05PM +0200, walter harms wrote:
>> Doint to many things at once is bad. IMHO it is more readable to do so:
>>
>> +status = copy_to_user(buf, hdr, 2);
>> +if ( status != 0) {
>>
>> Maybe the maintainer has different ideas but especialy lines like will gain.
>>
>> -if ((status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen)) != 0)
>> +status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen):
>> +if ( status != 0) {
>>
>> just my 2 cents,
>
> You're right of course as always and checkpatch warns about these as
> well.
>
> I figured if it was in the original code, it was probably OK to leave it.
> But I now recognize this as pure laziness on my part and I appologize.
> Twenty lashes for me and all that. Fixed patch coming up. ;)
>
> regards,
> dan carpenter
I hope my guidance will ease your way to enlightenment. ;)
re,
wh
prev parent reply other threads:[~2010-06-04 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 10:36 [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user Dan Carpenter
2010-06-04 10:36 ` [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors Dan Carpenter
2010-06-04 12:26 ` [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user walter harms
2010-06-04 12:26 ` [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors walter harms
2010-06-04 15:37 ` [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on Dan Carpenter
2010-06-04 15:37 ` [patch] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors Dan Carpenter
2010-06-04 15:39 ` [patch v2] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user Dan Carpenter
2010-06-04 15:39 ` [patch v2] V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors Dan Carpenter
2010-06-04 17:14 ` walter harms [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=4C09347D.9000007@bfs.de \
--to=wharms@bfs.de \
--cc=kernel-janitors@vger.kernel.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 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.