RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-04 Thread David Laight
From: Larry Finger > Sent: 04 February 2016 15:44 > On 02/04/2016 03:48 AM, David Laight wrote: > > From: Larry Finger > >> Sent: 03 February 2016 19:45 > > ... > >> The performance will depend on where you satisfy the condition. All switch > >> cases > >> have the same execution time, but in the

Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-04 Thread Larry Finger
On 02/04/2016 03:48 AM, David Laight wrote: From: Larry Finger Sent: 03 February 2016 19:45 ... The performance will depend on where you satisfy the condition. All switch cases have the same execution time, but in the if .. else if .. else form, the earlier tests execute more quickly. I'm not

RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-04 Thread David Laight
From: Larry Finger > Sent: 03 February 2016 19:45 ... > The performance will depend on where you satisfy the condition. All switch > cases > have the same execution time, but in the if .. else if .. else form, the > earlier > tests execute more quickly. I'm not sure that one can make any blanket

Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-03 Thread Larry Finger
On 02/03/2016 11:49 AM, ByeoungWook Kim wrote: Hi David, 2016-02-03 23:41 GMT+09:00 David Laight : From: Byeoungwook Kim Sent: 03 February 2016 02:00 Conditional codes in rtl_addr_delay() were improved in readability and performance by using switch codes. ... void rtl_addr_delay(u32 addr)

Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-03 Thread ByeoungWook Kim
Hi David, 2016-02-03 23:41 GMT+09:00 David Laight : > From: Byeoungwook Kim >> Sent: 03 February 2016 02:00 >> Conditional codes in rtl_addr_delay() were improved in readability and >> performance by using switch codes. >> ... >> void rtl_addr_delay(u32 addr) >> { >> - if (addr == 0xfe) >> +

RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-03 Thread David Laight
From: Byeoungwook Kim > Sent: 03 February 2016 02:00 > Conditional codes in rtl_addr_delay() were improved in readability and > performance by using switch codes. I'd like to see the performance data :-) > diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c > b/drivers/net/wireless/realtek/

Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-02 Thread Julian Calaby
Hi Byeounwook, On Wed, Feb 3, 2016 at 12:59 PM, Byeoungwook Kim wrote: > Conditional codes in rtl_addr_delay() were improved in readability and > performance by using switch codes. > > Signed-off-by: Byeoungwook Kim > Reported-by: Julian Calaby Reviewed-by: Julian Calaby Thanks, Julian Cala

[PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

2016-02-02 Thread Byeoungwook Kim
Conditional codes in rtl_addr_delay() were improved in readability and performance by using switch codes. Signed-off-by: Byeoungwook Kim Reported-by: Julian Calaby --- drivers/net/wireless/realtek/rtlwifi/core.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff -