Re: [PATCH] w1: w1_therm: use swap() to make code cleaner

From: Dan Carpenter
Date: Sat Dec 18 2021 - 04:55:39 EST


On Sat, Dec 18, 2021 at 09:58:44AM +0800, davidcomponentone@xxxxxxxxx wrote:
> @@ -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);
> }

Delete the curly {} braces as well since they are no longer required.

regards,
dan carpenter