coda: Remove various instances of an unused variable 'outp'
diff mbox series

Message ID 1617355775-68715-1-git-send-email-yang.lee@linux.alibaba.com
State New, archived
Headers show
Series
  • coda: Remove various instances of an unused variable 'outp'
Related show

Commit Message

Yang Li April 2, 2021, 9:29 a.m. UTC
Fixes the following W=1 kernel build warning(s):
fs/coda/upcall.c:112:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:161:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:235:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:303:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:326:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:380:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:407:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:440:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:456:20: warning: variable ‘outp’ set but not used
fs/coda/upcall.c:574:20: warning: variable ‘outp’ set but not used

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 fs/coda/upcall.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

kernel test robot April 2, 2021, 11:11 a.m. UTC | #1
Hi Yang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc5 next-20210401]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Yang-Li/coda-Remove-various-instances-of-an-unused-variable-outp/20210402-173111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1678e493d530e7977cce34e59a86bb86f3c5631e
config: arc-randconfig-r014-20210402 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/b6484bc8a589df437829010ab82b49c48d56ee46
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/coda-Remove-various-instances-of-an-unused-variable-outp/20210402-173111
        git checkout b6484bc8a589df437829010ab82b49c48d56ee46
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/coda/upcall.c: In function 'venus_setattr':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:118:2: note: in expansion of macro 'UPARG'
     118 |  UPARG(CODA_SETATTR);
         |  ^~~~~
   fs/coda/upcall.c:65:9: note: each undeclared identifier is reported only once for each function it appears in
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:118:2: note: in expansion of macro 'UPARG'
     118 |  UPARG(CODA_SETATTR);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_close':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:166:2: note: in expansion of macro 'UPARG'
     166 |  UPARG(CODA_CLOSE);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_rename':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:242:3: note: in expansion of macro 'UPARG'
     242 |   UPARG(CODA_RENAME);
         |   ^~~~~
   fs/coda/upcall.c: In function 'venus_rmdir':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:308:2: note: in expansion of macro 'UPARG'
     308 |  UPARG(CODA_RMDIR);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_remove':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:329:2: note: in expansion of macro 'UPARG'
     329 |  UPARG(CODA_REMOVE);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_link':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:383:9: note: in expansion of macro 'UPARG'
     383 |         UPARG(CODA_LINK);
         |         ^~~~~
   fs/coda/upcall.c: In function 'venus_symlink':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:409:2: note: in expansion of macro 'UPARG'
     409 |  UPARG(CODA_SYMLINK);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_fsync':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:439:2: note: in expansion of macro 'UPARG'
     439 |  UPARG(CODA_FSYNC);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_access':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:454:2: note: in expansion of macro 'UPARG'
     454 |  UPARG(CODA_ACCESS);
         |  ^~~~~
   fs/coda/upcall.c: In function 'venus_access_intent':
>> fs/coda/upcall.c:65:9: error: 'outp' undeclared (first use in this function); did you mean 'outl'?
      65 |         outp = (union outputArgs *)(inp); \
         |         ^~~~
   fs/coda/upcall.c:577:2: note: in expansion of macro 'UPARG'
     577 |  UPARG(CODA_ACCESS_INTENT);
         |  ^~~~~


vim +65 fs/coda/upcall.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  60  
^1da177e4c3f41 Linus Torvalds 2005-04-16  61  #define UPARG(op)\
^1da177e4c3f41 Linus Torvalds 2005-04-16  62  do {\
^1da177e4c3f41 Linus Torvalds 2005-04-16  63  	inp = (union inputArgs *)alloc_upcall(op, insize); \
^1da177e4c3f41 Linus Torvalds 2005-04-16  64          if (IS_ERR(inp)) { return PTR_ERR(inp); }\
^1da177e4c3f41 Linus Torvalds 2005-04-16 @65          outp = (union outputArgs *)(inp); \
^1da177e4c3f41 Linus Torvalds 2005-04-16  66          outsize = insize; \
^1da177e4c3f41 Linus Torvalds 2005-04-16  67  } while (0)
^1da177e4c3f41 Linus Torvalds 2005-04-16  68  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
kernel test robot April 2, 2021, 1:28 p.m. UTC | #2
Hi Yang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc5 next-20210401]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Yang-Li/coda-Remove-various-instances-of-an-unused-variable-outp/20210402-173111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1678e493d530e7977cce34e59a86bb86f3c5631e
config: x86_64-randconfig-a014-20210402 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b23a314146956dd29b719ab537608ced736fc036)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/b6484bc8a589df437829010ab82b49c48d56ee46
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/coda-Remove-various-instances-of-an-unused-variable-outp/20210402-173111
        git checkout b6484bc8a589df437829010ab82b49c48d56ee46
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> fs/coda/upcall.c:118:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_SETATTR);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:166:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_CLOSE);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:242:3: error: use of undeclared identifier 'outp'
           UPARG(CODA_RENAME);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:308:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_RMDIR);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:329:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_REMOVE);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:383:9: error: use of undeclared identifier 'outp'
           UPARG(CODA_LINK);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:409:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_SYMLINK);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:439:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_FSYNC);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:454:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_ACCESS);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   fs/coda/upcall.c:577:2: error: use of undeclared identifier 'outp'
           UPARG(CODA_ACCESS_INTENT);
           ^
   fs/coda/upcall.c:65:9: note: expanded from macro 'UPARG'
           outp = (union outputArgs *)(inp); \
           ^
   10 errors generated.


vim +/outp +118 fs/coda/upcall.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  110  
^1da177e4c3f41 Linus Torvalds 2005-04-16  111  int venus_setattr(struct super_block *sb, struct CodaFid *fid, 
^1da177e4c3f41 Linus Torvalds 2005-04-16  112  		  struct coda_vattr *vattr)
^1da177e4c3f41 Linus Torvalds 2005-04-16  113  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  114          union inputArgs *inp;
^1da177e4c3f41 Linus Torvalds 2005-04-16  115          int insize, outsize, error;
^1da177e4c3f41 Linus Torvalds 2005-04-16  116  	
^1da177e4c3f41 Linus Torvalds 2005-04-16  117  	insize = SIZE(setattr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @118  	UPARG(CODA_SETATTR);
^1da177e4c3f41 Linus Torvalds 2005-04-16  119  
^1da177e4c3f41 Linus Torvalds 2005-04-16  120          inp->coda_setattr.VFid = *fid;
^1da177e4c3f41 Linus Torvalds 2005-04-16  121  	inp->coda_setattr.attr = *vattr;
^1da177e4c3f41 Linus Torvalds 2005-04-16  122  
a1b0aa87647493 Jan Harkes     2007-07-19  123  	error = coda_upcall(coda_vcp(sb), insize, &outsize, inp);
^1da177e4c3f41 Linus Torvalds 2005-04-16  124  
936dae4525322f Dan Carpenter  2019-07-16  125  	kvfree(inp);
^1da177e4c3f41 Linus Torvalds 2005-04-16  126          return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16  127  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  128  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Patch
diff mbox series

diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index eb3b189..e8db310 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -112,7 +112,6 @@  int venus_setattr(struct super_block *sb, struct CodaFid *fid,
 		  struct coda_vattr *vattr)
 {
         union inputArgs *inp;
-        union outputArgs *outp;
         int insize, outsize, error;
 	
 	insize = SIZE(setattr);
@@ -161,7 +160,6 @@  int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
 		kuid_t uid)
 {
 	union inputArgs *inp;
-	union outputArgs *outp;
 	int insize, outsize, error;
 	
 	insize = SIZE(release);
@@ -235,7 +233,6 @@  int venus_rename(struct super_block *sb, struct CodaFid *old_fid,
 		 const char *new_name)
 {
 	union inputArgs *inp;
-        union outputArgs *outp;
         int insize, outsize, error; 
 	int offset, s;
 	
@@ -303,7 +300,6 @@  int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid,
 		    const char *name, int length)
 {
         union inputArgs *inp;
-        union outputArgs *outp;
         int insize, outsize, error;
         int offset;
 
@@ -326,7 +322,6 @@  int venus_remove(struct super_block *sb, struct CodaFid *dirfid,
 		    const char *name, int length)
 {
         union inputArgs *inp;
-        union outputArgs *outp;
         int error=0, insize, outsize, offset;
 
         offset = INSIZE(remove);
@@ -380,7 +375,6 @@  int venus_link(struct super_block *sb, struct CodaFid *fid,
 		  struct CodaFid *dirfid, const char *name, int len )
 {
         union inputArgs *inp;
-        union outputArgs *outp;
         int insize, outsize, error;
         int offset;
 
@@ -407,7 +401,6 @@  int venus_symlink(struct super_block *sb, struct CodaFid *fid,
 		     const char *symname, int symlen)
 {
         union inputArgs *inp;
-        union outputArgs *outp;
         int insize, outsize, error;
         int offset, s;
 
@@ -440,7 +433,6 @@  int venus_symlink(struct super_block *sb, struct CodaFid *fid,
 int venus_fsync(struct super_block *sb, struct CodaFid *fid)
 {
         union inputArgs *inp;
-        union outputArgs *outp; 
 	int insize, outsize, error;
 	
 	insize=SIZE(fsync);
@@ -456,7 +448,6 @@  int venus_fsync(struct super_block *sb, struct CodaFid *fid)
 int venus_access(struct super_block *sb, struct CodaFid *fid, int mask)
 {
         union inputArgs *inp;
-        union outputArgs *outp; 
 	int insize, outsize, error;
 
 	insize = SIZE(access);
@@ -574,7 +565,6 @@  int venus_access_intent(struct super_block *sb, struct CodaFid *fid,
 			size_t count, loff_t ppos, int type)
 {
 	union inputArgs *inp;
-	union outputArgs *outp;
 	int insize, outsize, error;
 	bool finalizer =
 		type == CODA_ACCESS_TYPE_READ_FINISH ||