* [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
@ 2020-05-14 18:13 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2020-05-14 18:13 UTC (permalink / raw)
To: Yan-Hsuan Chuang, Kalle Valo, David S . Miller, Ping-Ke Shih,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently ldo_pwr has the LDO25 voltage bits set to zero and then
it is overwritten with the new voltage setting. The assignment
looks incorrect, it should be bit-wise or'ing in the new voltage
setting rather than a direct assignment.
Addresses-Coverity: ("Unused value")
Fixes: 1afb5eb7a00d ("rtw88: 8723d: Add cfg_ldo25 to control LDO25")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
index b517af417e0e..2c6e417c5bca 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
@@ -561,7 +561,7 @@ static void rtw8723d_cfg_ldo25(struct rtw_dev *rtwdev, bool enable)
ldo_pwr = rtw_read8(rtwdev, REG_LDO_EFUSE_CTRL + 3);
if (enable) {
ldo_pwr &= ~BIT_MASK_LDO25_VOLTAGE;
- ldo_pwr = (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
+ ldo_pwr |= (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
} else {
ldo_pwr &= ~BIT_LDO25_EN;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
@ 2020-05-14 18:13 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2020-05-14 18:13 UTC (permalink / raw)
To: Yan-Hsuan Chuang, Kalle Valo, David S . Miller, Ping-Ke Shih,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently ldo_pwr has the LDO25 voltage bits set to zero and then
it is overwritten with the new voltage setting. The assignment
looks incorrect, it should be bit-wise or'ing in the new voltage
setting rather than a direct assignment.
Addresses-Coverity: ("Unused value")
Fixes: 1afb5eb7a00d ("rtw88: 8723d: Add cfg_ldo25 to control LDO25")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
index b517af417e0e..2c6e417c5bca 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
@@ -561,7 +561,7 @@ static void rtw8723d_cfg_ldo25(struct rtw_dev *rtwdev, bool enable)
ldo_pwr = rtw_read8(rtwdev, REG_LDO_EFUSE_CTRL + 3);
if (enable) {
ldo_pwr &= ~BIT_MASK_LDO25_VOLTAGE;
- ldo_pwr = (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
+ ldo_pwr |= (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
} else {
ldo_pwr &= ~BIT_LDO25_EN;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
2020-05-14 18:13 ` Colin King
@ 2020-05-15 0:26 ` Pkshih
-1 siblings, 0 replies; 6+ messages in thread
From: Pkshih @ 2020-05-15 0:26 UTC (permalink / raw)
To: Tony Chuang, colin.king, kvalo, linux-wireless, davem, netdev
Cc: linux-kernel, kernel-janitors
On Thu, 2020-05-14 at 18:13 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently ldo_pwr has the LDO25 voltage bits set to zero and then
> it is overwritten with the new voltage setting. The assignment
> looks incorrect, it should be bit-wise or'ing in the new voltage
> setting rather than a direct assignment.
>
> Addresses-Coverity: ("Unused value")
> Fixes: 1afb5eb7a00d ("rtw88: 8723d: Add cfg_ldo25 to control LDO25")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thank you for your fix.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> drivers/net/wireless/realtek/rtw88/rtw8723d.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> index b517af417e0e..2c6e417c5bca 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
> @@ -561,7 +561,7 @@ static void rtw8723d_cfg_ldo25(struct rtw_dev *rtwdev,
> bool enable)
> ldo_pwr = rtw_read8(rtwdev, REG_LDO_EFUSE_CTRL + 3);
> if (enable) {
> ldo_pwr &= ~BIT_MASK_LDO25_VOLTAGE;
> - ldo_pwr = (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
> + ldo_pwr |= (BIT_LDO25_VOLTAGE_V25 << 4) | BIT_LDO25_EN;
> } else {
> ldo_pwr &= ~BIT_LDO25_EN;
> }
> --
> 2.25.1
>
>
> ------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
@ 2020-05-15 0:26 ` Pkshih
0 siblings, 0 replies; 6+ messages in thread
From: Pkshih @ 2020-05-15 0:26 UTC (permalink / raw)
To: Tony Chuang, colin.king, kvalo, linux-wireless, davem, netdev
Cc: linux-kernel, kernel-janitors
T24gVGh1LCAyMDIwLTA1LTE0IGF0IDE4OjEzICswMDAwLCBDb2xpbiBLaW5nIHdyb3RlOg0KP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3MjNkLmMNCj4gaW5kZXggYjUxN2Fm
NDE3ZTBlLi4yYzZlNDE3YzViY2EgMTAwNjQ0DQo+IC0tLSBhL2RyaXZlcnMvbmV0L3dpcmVsZXNz
L3JlYWx0ZWsvcnR3ODgvcnR3ODcyM2QuYw0KPiArKysgYi9kcml2ZXJzL25ldC93aXJlbGVzcy9y
ZWFsdGVrL3J0dzg4L3J0dzg3MjNkLmMNCj4gQEAgLTU2MSw3ICs1NjEsNyBAQCBzdGF0aWMgdm9p
ZCBydHc4NzIzZF9jZmdfbGRvMjUoc3RydWN0IHJ0d19kZXYgKnJ0d2RldiwNCj4gYm9vbCBlbmFi
bGUpDQo+IMKgCWxkb19wd3IgPSBydHdfcmVhZDgocnR3ZGV2LCBSRUdfTERPX0VGVVNFX0NUUkwg
KyAzKTsNCj4gwqAJaWYgKGVuYWJsZSkgew0KPiDCoAkJbGRvX3B3ciAmPSB+QklUX01BU0tfTERP
MjVfVk9MVEFHRTsNCj4gLQkJbGRvX3B3ciA9IChCSVRfTERPMjVfVk9MVEFHRV9WMjUgPDwgNCkg
fCBCSVRfTERPMjVfRU47DQo+ICsJCWxkb19wd3IgfD0gKEJJVF9MRE8yNV9WT0xUQUdFX1YyNSA8
PCA0KSB8IEJJVF9MRE8yNV9FTjsNCj4gwqAJfSBlbHNlIHsNCj4gwqAJCWxkb19wd3IgJj0gfkJJ
VF9MRE8yNV9FTjsNCj4gwqAJfQ0KPiAtLcKgDQo+IDIuMjUuMQ0KPiANCj4gDQo+IC0tLS0tLVBs
ZWFzZSBjb25zaWRlciB0aGUgZW52aXJvbm1lbnQgYmVmb3JlIHByaW50aW5nIHRoaXMgZS1tYWls
Lg0KDQoNCg=
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
2020-05-14 18:13 ` Colin King
@ 2020-05-18 12:17 ` Kalle Valo
-1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-18 12:17 UTC (permalink / raw)
To: Colin King
Cc: Yan-Hsuan Chuang, David S . Miller, Ping-Ke Shih, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently ldo_pwr has the LDO25 voltage bits set to zero and then
> it is overwritten with the new voltage setting. The assignment
> looks incorrect, it should be bit-wise or'ing in the new voltage
> setting rather than a direct assignment.
>
> Addresses-Coverity: ("Unused value")
> Fixes: 1afb5eb7a00d ("rtw88: 8723d: Add cfg_ldo25 to control LDO25")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
c5457559b626 rtw88: 8723d: fix incorrect setting of ldo_pwr
--
https://patchwork.kernel.org/patch/11549469/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr
@ 2020-05-18 12:17 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-18 12:17 UTC (permalink / raw)
To: Colin King
Cc: Yan-Hsuan Chuang, David S . Miller, Ping-Ke Shih, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently ldo_pwr has the LDO25 voltage bits set to zero and then
> it is overwritten with the new voltage setting. The assignment
> looks incorrect, it should be bit-wise or'ing in the new voltage
> setting rather than a direct assignment.
>
> Addresses-Coverity: ("Unused value")
> Fixes: 1afb5eb7a00d ("rtw88: 8723d: Add cfg_ldo25 to control LDO25")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
c5457559b626 rtw88: 8723d: fix incorrect setting of ldo_pwr
--
https://patchwork.kernel.org/patch/11549469/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-18 12:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 18:13 [PATCH][next] rtw88: 8723d: fix incorrect setting of ldo_pwr Colin King
2020-05-14 18:13 ` Colin King
2020-05-15 0:26 ` Pkshih
2020-05-15 0:26 ` Pkshih
2020-05-18 12:17 ` Kalle Valo
2020-05-18 12:17 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.