public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Salah Triki <salah.triki@gmail.com>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, hannes@cmpxchg.org,
	vdavydov@virtuozzo.com
Subject: Re: [PATCH 2/3] befs: remove constant variable
Date: Thu, 28 Jul 2016 01:11:27 +0100	[thread overview]
Message-ID: <20160728001127.GD3942@pc> (raw)
In-Reply-To: <1467331652-850-2-git-send-email-luisbg@osg.samsung.com>

On Fri, Jul 01, 2016 at 01:07:31AM +0100, Luis de Bethencourt wrote:
> Use macro directly instead of via assigning it to an unchanging variable.
> 
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
>  fs/befs/linuxvfs.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
> index 6740b0d..a16421a 100644
> --- a/fs/befs/linuxvfs.c
> +++ b/fs/befs/linuxvfs.c
> @@ -211,7 +211,6 @@ befs_readdir(struct file *file, struct dir_context *ctx)
>  	befs_off_t value;
>  	int result;
>  	size_t keysize;
> -	unsigned char d_type;
>  	char keybuf[BEFS_NAME_LEN + 1];
>  
>  	befs_debug(sb, "---> %s name %pD, inode %ld, ctx->pos %lld",
> @@ -236,8 +235,6 @@ more:
>  		return 0;
>  	}
>  
> -	d_type = DT_UNKNOWN;
> -
>  	/* Convert to NLS */
>  	if (BEFS_SB(sb)->nls) {
>  		char *nlsname;
> @@ -249,14 +246,14 @@ more:
>  			return result;
>  		}
>  		if (!dir_emit(ctx, nlsname, nlsnamelen,
> -				 (ino_t) value, d_type)) {
> +				 (ino_t) value, DT_UNKNOWN)) {
>  			kfree(nlsname);
>  			return 0;
>  		}
>  		kfree(nlsname);
>  	} else {
>  		if (!dir_emit(ctx, keybuf, keysize,
> -				 (ino_t) value, d_type))
> +				 (ino_t) value, DT_UNKNOWN))
>  			return 0;
>  	}
>  	ctx->pos++;
> -- 
> 2.5.1
> 

Acked-by: Salah Triki <salah.triki@gmail.com>

Thanx :)
salah

  reply	other threads:[~2016-07-28  0:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  0:07 [PATCH 1/3] befs: avoid dereferencing dentry twice Luis de Bethencourt
2016-07-01  0:07 ` [PATCH 2/3] befs: remove constant variable Luis de Bethencourt
2016-07-28  0:11   ` Salah Triki [this message]
2016-07-01  0:07 ` [PATCH 3/3] befs: use simpler while loop Luis de Bethencourt

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=20160728001127.GD3942@pc \
    --to=salah.triki@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@osg.samsung.com \
    --cc=vdavydov@virtuozzo.com \
    --cc=viro@zeniv.linux.org.uk \
    /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