mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Haowen Bai <baihaowen@meizu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coda: remove unused variable
Date: Wed, 1 Jun 2022 10:35:38 -0400	[thread overview]
Message-ID: <20220601143538.e232rih7wndlofd7@cs.cmu.edu> (raw)
In-Reply-To: <1654070283-7216-1-git-send-email-baihaowen@meizu.com>

Sorry, but I cannot ack this patch.

Clearly there is a lack of clarity in this particular bit of code
because this suggestion seems to reappear every few years,

https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2269222.html

The insize variable is in fact used by the UPARG macro that follows, and
once this patch is applied you end up with an obvious compilation error.

Jan


On Wed, Jun 01, 2022 at 03:58:03PM +0800, Haowen Bai wrote:
> The variable insize is initialized but never used otherwise.
> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>  fs/coda/upcall.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
> index 59f6cfd06f96..c214b424426d 100644
> --- a/fs/coda/upcall.c
> +++ b/fs/coda/upcall.c
> @@ -477,10 +477,9 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
>  {
>          union inputArgs *inp;
>          union outputArgs *outp;  
> -	int insize, outsize, error;
> +	int outsize, error;
>  	int iocsize;
>  
> -	insize = VC_MAXMSGSIZE;
>  	UPARG(CODA_IOCTL);
>  
>          /* build packet for Venus */
> -- 
> 2.7.4
> 
> 

  parent reply	other threads:[~2022-06-01 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01  7:58 Haowen Bai
2022-06-01 14:08 ` kernel test robot
2022-06-01 14:08 ` kernel test robot
2022-06-01 14:35 ` Jan Harkes [this message]
2022-06-02  1:06 ` baihaowen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220601143538.e232rih7wndlofd7@cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=baihaowen@meizu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®