lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220901222218.ytusdn7xvgiru7qw@Rockosov-MBP>
Date:   Fri, 2 Sep 2022 01:22:18 +0300
From:   Dmitry Rokosov <ddrokosov@...rdevices.ru>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     <linux-kernel@...r.kernel.org>, Mark Brown <broonie@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 2/3] regmap: trace: Remove explicit castings

On Thu, Sep 01, 2022 at 04:23:35PM +0300, Andy Shevchenko wrote:
> There is no need to have explicit castings to the same type the
> variables are of. Remove the explicit castings.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/base/regmap/trace.h | 17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/base/regmap/trace.h b/drivers/base/regmap/trace.h
> index e92edc4f4ca5..a0f83e44a9d1 100644
> --- a/drivers/base/regmap/trace.h
> +++ b/drivers/base/regmap/trace.h
> @@ -32,9 +32,7 @@ DECLARE_EVENT_CLASS(regmap_reg,
>  		__entry->val = val;
>  	),
>  
> -	TP_printk("%s reg=%x val=%x", __get_str(name),
> -		  (unsigned int)__entry->reg,
> -		  (unsigned int)__entry->val)
> +	TP_printk("%s reg=%x val=%x", __get_str(name), __entry->reg, __entry->val)
>  );
>  
>  DEFINE_EVENT(regmap_reg, regmap_reg_write,
> @@ -85,8 +83,7 @@ DECLARE_EVENT_CLASS(regmap_bulk,
>  		memcpy(__get_dynamic_array(buf), val, val_len);
>  	),
>  
> -	TP_printk("%s reg=%x val=%s", __get_str(name),
> -		  (unsigned int)__entry->reg,
> +	TP_printk("%s reg=%x val=%s", __get_str(name), __entry->reg,
>  		  __print_hex(__get_dynamic_array(buf), __entry->val_len))
>  );
>  
> @@ -124,9 +121,7 @@ DECLARE_EVENT_CLASS(regmap_block,
>  		__entry->count = count;
>  	),
>  
> -	TP_printk("%s reg=%x count=%d", __get_str(name),
> -		  (unsigned int)__entry->reg,
> -		  (int)__entry->count)
> +	TP_printk("%s reg=%x count=%d", __get_str(name), __entry->reg, __entry->count)
>  );
>  
>  DEFINE_EVENT(regmap_block, regmap_hw_read_start,
> @@ -196,8 +191,7 @@ DECLARE_EVENT_CLASS(regmap_bool,
>  		__entry->flag = flag;
>  	),
>  
> -	TP_printk("%s flag=%d", __get_str(name),
> -		  (int)__entry->flag)
> +	TP_printk("%s flag=%d", __get_str(name), __entry->flag)
>  );
>  
>  DEFINE_EVENT(regmap_bool, regmap_cache_only,
> @@ -283,8 +277,7 @@ TRACE_EVENT(regcache_drop_region,
>  		__entry->to = to;
>  	),
>  
> -	TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
> -		  (unsigned int)__entry->to)
> +	TP_printk("%s %u-%u", __get_str(name), __entry->from, __entry->to)
>  );
>  
>  #endif /* _TRACE_REGMAP_H */
> -- 
> 2.35.1
> 

Reviewed-by: Dmitry Rokosov <ddrokosov@...rdevices.ru>

-- 
Thank you,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ