Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable

2019-09-07 Thread Andrew Lunn
On Sat, Sep 07, 2019 at 11:14:00AM +0800, zhong jiang wrote: > On 2019/9/7 3:40, Andrew Lunn wrote: > > On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote: > >> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d > >> but is perhaps more readable. > > Hi Zhong > > > >

Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable

2019-09-07 Thread David Miller
From: zhong jiang Date: Thu, 5 Sep 2019 23:53:48 +0800 > The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d > but is perhaps more readable. > > Signed-off-by: zhong jiang Applied to net-next.

Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable

2019-09-06 Thread zhong jiang
On 2019/9/7 3:40, Andrew Lunn wrote: > On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote: >> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d >> but is perhaps more readable. > Hi Zhong > > Did you find this by hand, or did you use a tool. If a tool is used, > it

Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable

2019-09-06 Thread Andrew Lunn
On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote: > The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d > but is perhaps more readable. Hi Zhong Did you find this by hand, or did you use a tool. If a tool is used, it is normal to give some credit to the tool. Tha

[PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable

2019-09-05 Thread zhong jiang
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. Signed-off-by: zhong jiang --- drivers/net/ethernet/micrel/ksz884x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/et