From: Wim Van Sebroeck <wim@iguana.be>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-watchdog@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] watchdog: ts72xx_wdt: cleanup return codes in ioctl
Date: Tue, 29 Oct 2013 07:44:26 +0000 [thread overview]
Message-ID: <20131029074426.GA19704@spo001.leaseweb.com> (raw)
In-Reply-To: <20130823093832.GL31293@elgon.mountain>
Hi Dan,
> There seems to be some confusion here which functions return positive
> numbers and which return negative error codes.
>
> copy_to_user() returns the number of bytes remaining to be copied but we
> want to return -EFAULT.
>
> The rest is just clean up. get_user() actually returns zero on success
> and -EFAULT on error so we can preserve the error code. The
> timeout_to_regval() function returns -EINVAL on failure, but we can
> propogate that back instead of hardcoding -EINVAL ourselves.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This patch has been added to linux-watchdog-next.
Kind regards,
Wim.
prev parent reply other threads:[~2013-10-29 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 9:38 [patch] watchdog: ts72xx_wdt: cleanup return codes in ioctl Dan Carpenter
2013-10-01 15:39 ` Guenter Roeck
2013-10-29 7:44 ` Wim Van Sebroeck [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=20131029074426.GA19704@spo001.leaseweb.com \
--to=wim@iguana.be \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-watchdog@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox