From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chengguang Xu <cgxu519@gmx.com>
Cc: gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap
Date: Tue, 30 Apr 2019 11:32:06 +0300 [thread overview]
Message-ID: <20190430083206.GA2239@kadam> (raw)
In-Reply-To: <20190426073837.23086-1-cgxu519@gmx.com>
Please don't say RESEND, say [PATCH v2]. RESEND is for when we ignored
your patch. (Maybe we made a mistake or maybe the mailing list tagged
it as spam and deleted it or something). Use [PATCH v2] instead.
On Fri, Apr 26, 2019 at 03:38:37PM +0800, Chengguang Xu wrote:
> When allocating dynamic major, the minor range overlap check
> in __register_chrdev_region() will not fail, so actually
> there is no real case to passing non negative error code to
> caller. However, set variable ret to -EBUSY before chekcking
> minor range overlap will avoid false-positive warning from
> code analyzing tool(like Smatch) and also make the code more
> easy to understand.
>
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
Then here under the --- cut off line put:
v2: rebase against the latest linux-next
That way we will remember why the patch was sent twice and what changed.
> fs/char_dev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
regards,
dan carpenter
prev parent reply other threads:[~2019-04-30 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 7:38 [RESEND PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap Chengguang Xu
2019-04-30 8:32 ` Dan Carpenter [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=20190430083206.GA2239@kadam \
--to=dan.carpenter@oracle.com \
--cc=cgxu519@gmx.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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.