RE: [PATCH] f2fs: add unlikely() macro for compiler more aggressively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@xxxxxxxxxxx]
> Sent: Friday, December 06, 2013 2:15 PM
> Cc: Jaegeuk Kim; linux-fsdevel@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx; Chao Yu
> Subject: [PATCH] f2fs: add unlikely() macro for compiler more aggressively
> 
> This patch adds unlikely() macro into the most of codes.
> The basic rule is to add that when:
> - checking unusual errors,
> - checking page mappings,
> - and the other unlikely conditions.

Looks nice to me!

> 
> Cc: Chao Yu <chao2.yu@xxxxxxxxxxx>
> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx>

Reviewed-by: Chao Yu <chao2.yu@xxxxxxxxxxx>

> ---
>  fs/f2fs/checkpoint.c |  22 ++++++----
>  fs/f2fs/data.c       |  63 +++++++++++++--------------
>  fs/f2fs/dir.c        |  10 ++---
>  fs/f2fs/file.c       |  23 +++++-----
>  fs/f2fs/gc.c         |  19 ++++-----
>  fs/f2fs/inode.c      |  12 +++---
>  fs/f2fs/namei.c      |  24 ++++++-----
>  fs/f2fs/node.c       | 117 +++++++++++++++++++++++++++------------------------
>  fs/f2fs/recovery.c   |  10 ++---
>  fs/f2fs/segment.c    |  42 +++++++++---------
>  fs/f2fs/super.c      |  83 ++++++++++++++++++------------------
>  fs/f2fs/xattr.c      |  28 ++++++------
>  12 files changed, 234 insertions(+), 219 deletions(-)

[snip]

> @@ -808,11 +808,11 @@ retry:
>  		brelse(*raw_super_buf);
>  		f2fs_msg(sb, KERN_ERR, "Can't find a valid F2FS filesystem "
>  				"in %dth superblock", block + 1);
> -		if(block == 0) {
> +		if(unlikely(block != 0)) {

Original code has style problem:
Space is required before the open parenthesis '('.
Thanks.


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux