From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755413AbcIUIus (ORCPT ); Wed, 21 Sep 2016 04:50:48 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35943 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbcIUIul (ORCPT ); Wed, 21 Sep 2016 04:50:41 -0400 From: Nicolai Stange To: Greg Kroah-Hartman Cc: Nicolai Stange Cc: Eric Engestrom , linux-kernel@vger.kernel.org Subject: Re: [PATCH] debugfs: remove unused variable References: <20160920161715.16924-1-eric.engestrom@imgtec.com> <20160921080111.GB15998@kroah.com> Date: Wed, 21 Sep 2016 10:50:38 +0200 In-Reply-To: <20160921080111.GB15998@kroah.com> (Greg Kroah-Hartman's message of "Wed, 21 Sep 2016 10:01:11 +0200") Message-ID: <8737kt4owx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg Kroah-Hartman writes: > On Tue, Sep 20, 2016 at 05:17:15PM +0100, Eric Engestrom wrote: >> Signed-off-by: Eric Engestrom >> --- >> 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 for the diff. (This patch lacks a description though.) Thanks, Nicolai