Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467661 > unrolled thread
| Started by | David Binderman <linuxdev.baldrick@gmail.com> |
|---|---|
| First post | 2016-08-22 16:10 +0200 |
| Last post | 2016-08-23 22:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533: pointless test ? David Binderman <linuxdev.baldrick@gmail.com> - 2016-08-22 16:10 +0200
Re: linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533: pointless test ? Greg KH <gregkh@linuxfoundation.org> - 2016-08-22 16:40 +0200
[PATCH] drivers: staging: rtl8723au: hal: Remove pointless test Matthias Beyer <mail@beyermatthias.de> - 2016-08-23 22:00 +0200
[PATCH] drivers: staging: rtl823au: hal: Remove pointless test Matthias Beyer <mail@beyermatthias.de> - 2016-08-23 22:00 +0200
| From | David Binderman <linuxdev.baldrick@gmail.com> |
|---|---|
| Date | 2016-08-22 16:10 +0200 |
| Subject | linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533: pointless test ? |
| Message-ID | <s8Y5k-7jf-25@gated-at.bofh.it> |
Hello there,
linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533]:
(style) Condition 'pBtMgnt.ExtConfig.HCIExtensionVer>=1' is always
true
Source code is
if (pBtMgnt->ExtConfig.HCIExtensionVer < 1) {
....
} else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
Suggest remove second test.
Regards
David Binderman
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-08-22 16:40 +0200 |
| Message-ID | <s8Yyl-7uQ-7@gated-at.bofh.it> |
| In reply to | #1467661 |
On Mon, Aug 22, 2016 at 03:07:44PM +0100, David Binderman wrote:
> Hello there,
>
> linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533]:
> (style) Condition 'pBtMgnt.ExtConfig.HCIExtensionVer>=1' is always
> true
>
> Source code is
>
> if (pBtMgnt->ExtConfig.HCIExtensionVer < 1) {
> ....
> } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
>
> Suggest remove second test.
patches are always welcome :)
[toc] | [prev] | [next] | [standalone]
| From | Matthias Beyer <mail@beyermatthias.de> |
|---|---|
| Date | 2016-08-23 22:00 +0200 |
| Subject | [PATCH] drivers: staging: rtl8723au: hal: Remove pointless test |
| Message-ID | <s9q1A-8u4-15@gated-at.bofh.it> |
| In reply to | #1467661 |
This patch removes the pointless `else if` test.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
---
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index bfcbd7a..7f11521 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -3530,7 +3530,7 @@ bthci_CmdLinkStatusNotify(
pBtMgnt->ExtConfig.linkInfo[i].BTProfile,
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec));
pTriple += 4;
- } else if (pBtMgnt->ExtConfig.HCIExtensionVer >= 1) {
+ } else {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = *((u16 *)&pTriple[0]);
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = pTriple[2];
pBtMgnt->ExtConfig.linkInfo[i].BTCoreSpec = pTriple[3];
--
2.9.2
[toc] | [prev] | [next] | [standalone]
| From | Matthias Beyer <mail@beyermatthias.de> |
|---|---|
| Date | 2016-08-23 22:00 +0200 |
| Subject | [PATCH] drivers: staging: rtl823au: hal: Remove pointless test |
| Message-ID | <s9q1A-8u4-17@gated-at.bofh.it> |
| In reply to | #1467661 |
As reported by David Binderman, this test is useless as of
if (a < 3) {
/* ... */
} else if (a >= 3) {
/* ... */
}
so this patch removes the second check.
Matthias Beyer (1):
drivers: staging: rtl8723au: hal: Remove pointless test
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.9.2
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web