From: Nicolai Stange <nicstange@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolai Stange <nicstange@gmail.com>
Cc: Eric Engestrom <eric.engestrom@imgtec.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] debugfs: remove unused variable
Date: Wed, 21 Sep 2016 10:50:38 +0200 [thread overview]
Message-ID: <8737kt4owx.fsf@gmail.com> (raw)
In-Reply-To: <20160921080111.GB15998@kroah.com> (Greg Kroah-Hartman's message of "Wed, 21 Sep 2016 10:01:11 +0200")
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> On Tue, Sep 20, 2016 at 05:17:15PM +0100, Eric Engestrom wrote:
>> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
>> ---
>> fs/debugfs/file.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
>> index 592059f..04eca0b 100644
>> --- a/fs/debugfs/file.c
>> +++ b/fs/debugfs/file.c
>> @@ -195,7 +195,6 @@ static int full_proxy_release(struct inode *inode, struct file *filp)
>> const struct dentry *dentry = F_DENTRY(filp);
>> const struct file_operations *real_fops = REAL_FOPS_DEREF(dentry);
>> const struct file_operations *proxy_fops = filp->f_op;
>> - int r = 0;
>>
>> /*
>> * We must not protect this against removal races here: the
>> @@ -204,7 +203,7 @@ static int full_proxy_release(struct inode *inode, struct file *filp)
>> * ->i_private is still being meaningful here.
>> */
>> if (real_fops->release)
>> - r = real_fops->release(inode, filp);
>> + real_fops->release(inode, filp);
>
> Hm, shouldn't we be propagating the result back up the call chain?
AFAICS, the VFS layer doesn't ever evaluate the return value of
->release(), c.f. __fput() in fs/file_table.c .
OTOH, propagating that value back to caller also wouldn't hurt. But this
would be a matter of taste/coding style.
I can't remember whether I left this unused int r there on purpose. I
doubt not. Eric, did you run your patch through sparse and Coccinelle?
If so,
Reviewed-by: Nicolai Stange <nicstange@gmail.com>
for the diff. (This patch lacks a description though.)
Thanks,
Nicolai
next prev parent reply other threads:[~2016-09-21 8:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 16:17 [PATCH] debugfs: remove unused variable Eric Engestrom
2016-09-21 8:01 ` Greg Kroah-Hartman
2016-09-21 8:36 ` [PATCH] debugfs: propagate release() call result Eric Engestrom
2016-09-21 9:15 ` Greg Kroah-Hartman
2016-09-21 9:27 ` [PATCH v2] " Eric Engestrom
2016-09-21 8:39 ` [PATCH] debugfs: remove unused variable Eric Engestrom
2016-09-21 8:50 ` Nicolai Stange [this message]
2016-09-21 9:23 ` Eric Engestrom
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=8737kt4owx.fsf@gmail.com \
--to=nicstange@gmail.com \
--cc=gregkh@linuxfoundation.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