[-next] fs: coda: Remove unused variable 'outp' in venus_rmdir

Message ID 20240124010322.94782-1-yang.lee@linux.alibaba.com
State New
Headers
Series [-next] fs: coda: Remove unused variable 'outp' in venus_rmdir |

Commit Message

Yang Li Jan. 24, 2024, 1:03 a.m. UTC
  The variable 'outp' is declared but not used in the venus_rmdir
function within the Coda filesystem module. This causes a compiler
warning about the variable being set but not used.

To clean up the code and address the compiler warning, this patch
removes the declaration of the unused 'outp' variable.

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

Comments

Jan Harkes Jan. 24, 2024, 1:18 a.m. UTC | #1
Thank you, but you sent the same patch in April 2021 and it resulted in
compile errors in the expansion of UPARG.

I assume this one will result in the same errors.

Jan


    [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); \
             |         ^~~~


On Wed, Jan 24, 2024 at 09:03:22AM +0800, Yang Li wrote:
> The variable 'outp' is declared but not used in the venus_rmdir
> function within the Coda filesystem module. This causes a compiler
> warning about the variable being set but not used.
> 
> To clean up the code and address the compiler warning, this patch
> removes the declaration of the unused 'outp' variable.
> 
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  fs/coda/upcall.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
> index cd6a3721f6f6..d97e0e4374f9 100644
> --- a/fs/coda/upcall.c
> +++ b/fs/coda/upcall.c
> @@ -303,7 +303,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;
>  
> -- 
> 2.20.1.7.g153144c
> 
>
  

Patch

diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index cd6a3721f6f6..d97e0e4374f9 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -303,7 +303,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;