Re: [PATCH v2] zonefs: delete useless complex macro definitions

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

 



On Thu, 2021-05-13 at 11:50 +0800, Jinchao Wang wrote:
> Fixes checkpatch.pl error: Macros with complex values should be enclosed
> in parentheses. By deleting the macro definition
> 
> Signed-off-by: Jinchao Wang <wjc@xxxxxxxxxx>
> ---
>  fs/zonefs/trace.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/zonefs/trace.h b/fs/zonefs/trace.h
> index 5b0c87d331a1..03f12bc0c641 100644
> --- a/fs/zonefs/trace.h
> +++ b/fs/zonefs/trace.h
> @@ -17,7 +17,6 @@
>  
>  #include "zonefs.h"
>  
> -#define show_dev(dev) (MAJOR(dev), MINOR(dev))

The current code does not have the parenthesizes, so this patch does not apply.
Please send a correct patch.

>  
>  TRACE_EVENT(zonefs_zone_mgmt,
>  	    TP_PROTO(struct inode *inode, enum req_opf op),
> @@ -38,7 +37,8 @@ TRACE_EVENT(zonefs_zone_mgmt,
>  				   ZONEFS_I(inode)->i_zone_size >> SECTOR_SHIFT;
>  	    ),
>  	    TP_printk("bdev=(%d,%d), ino=%lu op=%s, sector=%llu, nr_sectors=%llu",
> -		      show_dev(__entry->dev), (unsigned long)__entry->ino,
> +		      MAJOR(__entry->dev), MINOR(__entry->dev),
> +		      (unsigned long)__entry->ino,
>  		      blk_op_str(__entry->op), __entry->sector,
>  		      __entry->nr_sectors
>  	    )
> @@ -64,7 +64,8 @@ TRACE_EVENT(zonefs_file_dio_append,
>  			   __entry->ret = ret;
>  	    ),
>  	    TP_printk("bdev=(%d, %d), ino=%lu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu",
> -		      show_dev(__entry->dev), (unsigned long)__entry->ino,
> +		      MAJOR(__entry->dev), MINOR(__entry->dev),
> +		      (unsigned long)__entry->ino,
>  		      __entry->sector, __entry->size, __entry->wpoffset,
>  		      __entry->ret
>  	    )
> @@ -88,7 +89,8 @@ TRACE_EVENT(zonefs_iomap_begin,
>  			   __entry->length = iomap->length;
>  	    ),
>  	    TP_printk("bdev=(%d,%d), ino=%lu, addr=%llu, offset=%llu, length=%llu",
> -		      show_dev(__entry->dev), (unsigned long)__entry->ino,
> +		      MAJOR(__entry->dev), MINOR(__entry->dev),
> +		      (unsigned long)__entry->ino,
>  		      __entry->addr, __entry->offset, __entry->length
>  	    )
>  );

-- 
Damien Le Moal
Western Digital Research





[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