lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] w1: w1_therm: use swap() to make code cleaner
On Thu, Nov 04, 2021 at 09:11:23AM +0800, davidcomponentone@gmail.com wrote:
> From: Yang Guang <yang.guang5@zte.com.cn>
>
> Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
> opencoding it.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
> ---

I'm confused by the signed-off-by list. Are you Yang Guang and David is
your "English name"? If so then this is fine, but if you are different
people then everyone who handles the patch needs to add their own
signed-off-by.


> @@ -1837,7 +1837,7 @@ static ssize_t alarms_store(struct device *device,
>
> /* Reorder if required th and tl */
> if (tl > th) {
> - tt = tl; tl = th; th = tt;
> + swap(tl, th);
> }

Remove the curly {} braces as well because they are no longer required.

regards,
dan carpenter

\
 
 \ /
  Last update: 2021-11-04 12:10    [W:0.131 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site