Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324918 > unrolled thread
| Started by | Byeoungwook Kim <quddnr145@gmail.com> |
|---|---|
| First post | 2016-02-03 06:30 +0100 |
| Last post | 2016-02-03 10:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c Byeoungwook Kim <quddnr145@gmail.com> - 2016-02-03 06:30 +0100
Re: [PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-03 10:00 +0100
Re: [PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c ByeoungWook Kim <quddnr145@gmail.com> - 2016-02-03 10:20 +0100
| From | Byeoungwook Kim <quddnr145@gmail.com> |
|---|---|
| Date | 2016-02-03 06:30 +0100 |
| Subject | [PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c |
| Message-ID | <qXYaR-63Z-1@gated-at.bofh.it> |
Conditional codes in rtl_addr_delay() were improved in readability and
performance by using switch codes.
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
V3 remove unneeded semicolon.
V2 split in separate patchs.
drivers/net/wireless/realtek/rtlwifi/core.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 4ae421e..63cda78 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -37,18 +37,26 @@
void rtl_addr_delay(u32 addr)
{
- if (addr == 0xfe)
+ switch (addr) {
+ case 0xfe:
mdelay(50);
- else if (addr == 0xfd)
+ break;
+ case 0xfd:
mdelay(5);
- else if (addr == 0xfc)
+ break;
+ case 0xfc:
mdelay(1);
- else if (addr == 0xfb)
+ break;
+ case 0xfb:
udelay(50);
- else if (addr == 0xfa)
+ break;
+ case 0xfa:
udelay(5);
- else if (addr == 0xf9)
+ break;
+ case 0xf9:
udelay(1);
+ break;
+ }
}
EXPORT_SYMBOL(rtl_addr_delay);
--
2.5.0
[toc] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-02-03 10:00 +0100 |
| Subject | Re: [PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c |
| Message-ID | <qY1s6-83z-13@gated-at.bofh.it> |
| In reply to | #1324918 |
On Wed, Feb 03, 2016 at 02:21:46PM +0900, Byeoungwook Kim wrote: > Conditional codes in rtl_addr_delay() were improved in readability and > performance by using switch codes. > > Reviewed-by: Julian Calaby <julian.calaby@gmail.com> > Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> How you are using Signed-off-by: of Fengguang Wu? did i missed seeing any mail from Fengguang in your previous versions? regards sudip
[toc] | [prev] | [next] | [standalone]
| From | ByeoungWook Kim <quddnr145@gmail.com> |
|---|---|
| Date | 2016-02-03 10:20 +0100 |
| Message-ID | <qY1Ls-8sb-19@gated-at.bofh.it> |
| In reply to | #1325066 |
Hi Sudip, This patch is exsisted depencency like next. http://marc.info/?l=linux-wireless&m=145447963305712&w=2 I wrote review and the followup patch. but i seem to that don't write a Cc document. Sorry for your confused. Regards, Byeoungwook. 2016-02-03 17:56 GMT+09:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>: > On Wed, Feb 03, 2016 at 02:21:46PM +0900, Byeoungwook Kim wrote: >> Conditional codes in rtl_addr_delay() were improved in readability and >> performance by using switch codes. >> >> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> >> Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com> >> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> > > How you are using Signed-off-by: of Fengguang Wu? > > did i missed seeing any mail from Fengguang in your previous versions? > > regards > sudip
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web