CC: [email protected]
TO: Christian Brauner <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git 
loopfs_v1
head:   e3796aa0ebdf297c4a3273c64aed421530d8a1e3
commit: 36eb087fffce637de710a065ce6ccf9d7b83d08a [2/8] loopfs: implement loopfs
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <[email protected]>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/block/loopfs/loopfs.c:401:6: warning: Redundant initialization for 
>> 'ctx'. The initialized value is overwritten before it is read. 
>> [redundantInitialization]
    ctx = kzalloc(sizeof(struct loopfs_mount_opts), GFP_KERNEL);
        ^
   drivers/block/loopfs/loopfs.c:399:32: note: ctx is initialized
    struct loopfs_mount_opts *ctx = fc->fs_private;
                                  ^
   drivers/block/loopfs/loopfs.c:401:6: note: ctx is overwritten
    ctx = kzalloc(sizeof(struct loopfs_mount_opts), GFP_KERNEL);
        ^

# 
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/commit/?id=36eb087fffce637de710a065ce6ccf9d7b83d08a
git remote add brauner 
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git remote update brauner
git checkout 36eb087fffce637de710a065ce6ccf9d7b83d08a
vim +/ctx +401 drivers/block/loopfs/loopfs.c

36eb087fffce63 Christian Brauner 2020-04-02  396  
36eb087fffce63 Christian Brauner 2020-04-02  397  static int 
loopfs_init_fs_context(struct fs_context *fc)
36eb087fffce63 Christian Brauner 2020-04-02  398  {
36eb087fffce63 Christian Brauner 2020-04-02  399        struct 
loopfs_mount_opts *ctx = fc->fs_private;
36eb087fffce63 Christian Brauner 2020-04-02  400  
36eb087fffce63 Christian Brauner 2020-04-02 @401        ctx = 
kzalloc(sizeof(struct loopfs_mount_opts), GFP_KERNEL);
36eb087fffce63 Christian Brauner 2020-04-02  402        if (!ctx)
36eb087fffce63 Christian Brauner 2020-04-02  403                return -ENOMEM;
36eb087fffce63 Christian Brauner 2020-04-02  404  
36eb087fffce63 Christian Brauner 2020-04-02  405        ctx->max = max_devices;
36eb087fffce63 Christian Brauner 2020-04-02  406  
36eb087fffce63 Christian Brauner 2020-04-02  407        fc->fs_private = ctx;
36eb087fffce63 Christian Brauner 2020-04-02  408  
36eb087fffce63 Christian Brauner 2020-04-02  409        fc->ops = 
&loopfs_fs_context_ops;
36eb087fffce63 Christian Brauner 2020-04-02  410  
36eb087fffce63 Christian Brauner 2020-04-02  411        return 0;
36eb087fffce63 Christian Brauner 2020-04-02  412  }
36eb087fffce63 Christian Brauner 2020-04-02  413  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to