* [PATCH] loop: remove redundant pointer inode
@ 2018-07-02 7:47 Colin King
2018-07-02 14:27 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-02 7:47 UTC (permalink / raw)
To: Jens Axboe, linux-block; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer inode is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable 'inode' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/block/loop.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index d6b6f434fd4b..6e0b870308ee 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -690,7 +690,6 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
- struct inode *inode;
int error;
error = -ENXIO;
@@ -711,7 +710,6 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
if (error)
goto out_putf;
- inode = file->f_mapping->host;
old_file = lo->lo_backing_file;
error = -EINVAL;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] loop: remove redundant pointer inode
2018-07-02 7:47 [PATCH] loop: remove redundant pointer inode Colin King
@ 2018-07-02 14:27 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-07-02 14:27 UTC (permalink / raw)
To: Colin King, linux-block; +Cc: kernel-janitors, linux-kernel
On 7/2/18 1:47 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer inode is being assigned but is never used hence it is redundant
> and can be removed.
>
> Cleans up clang warning:
> warning: variable 'inode' set but not used [-Wunused-but-set-variable]
Applied for 4.19, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-02 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 7:47 [PATCH] loop: remove redundant pointer inode Colin King
2018-07-02 14:27 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®