[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <91c6b611-ad3f-f0ce-b228-529e5b48873e@gmail.com>
Date: Sun, 1 May 2022 18:50:45 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Juhee Kang <claudiajkang@...il.com>, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [net-next PATCH] amt: Use BIT macros instead of open codes
On 4/30/22 22:56, Juhee Kang wrote:
Hi Juhee,
Thanks a lot for this work!
> Replace open code related to bit operation with BIT macros, which kernel
> provided. This patch provides no functional change.
>
Reviewed-by: Taehee Yoo <ap420073@...il.com>
Tested-by: Taehee Yoo <ap420073@...il.com>
Thanks,
Taehee Yoo
> Signed-off-by: Juhee Kang <claudiajkang@...il.com>
> ---
> drivers/net/amt.c | 2 +-
> include/net/amt.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 10455c9b9da0..76c1969a03f5 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
> @@ -959,7 +959,7 @@ static void amt_req_work(struct work_struct *work)
> amt_update_gw_status(amt, AMT_STATUS_SENT_REQUEST, true);
> spin_lock_bh(&amt->lock);
> out:
> - exp = min_t(u32, (1 * (1 << amt->req_cnt)), AMT_MAX_REQ_TIMEOUT);
> + exp = min_t(u32, (1 * BIT(amt->req_cnt)), AMT_MAX_REQ_TIMEOUT);
> mod_delayed_work(amt_wq, &amt->req_wq, msecs_to_jiffies(exp * 1000));
> spin_unlock_bh(&amt->lock);
> }
> diff --git a/include/net/amt.h b/include/net/amt.h
> index 7a4db8b903ee..d2fd76b0a424 100644
> --- a/include/net/amt.h
> +++ b/include/net/amt.h
> @@ -354,7 +354,7 @@ struct amt_dev {
> #define AMT_MAX_GROUP 32
> #define AMT_MAX_SOURCE 128
> #define AMT_HSIZE_SHIFT 8
> -#define AMT_HSIZE (1 << AMT_HSIZE_SHIFT)
> +#define AMT_HSIZE BIT(AMT_HSIZE_SHIFT)
>
> #define AMT_DISCOVERY_TIMEOUT 5000
> #define AMT_INIT_REQ_TIMEOUT 1
Powered by blists - more mailing lists