* [PATCH] ssb: remove unreachable code
@ 2021-05-18 2:52 Tian Tao
2021-05-20 16:51 ` Michael Büsch
2021-06-15 10:11 ` Kalle Valo
0 siblings, 2 replies; 8+ messages in thread
From: Tian Tao @ 2021-05-18 2:52 UTC (permalink / raw)
To: m; +Cc: linux-wireless, Tian Tao
The return value of ssb_bus_unregister can only be 0 or 1, so this
condition if (err == -EBUSY) will not hold, so delete it.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/ssb/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 0a26984..8fcf53c 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -431,9 +431,7 @@ void ssb_bus_unregister(struct ssb_bus *bus)
int err;
err = ssb_gpio_unregister(bus);
- if (err == -EBUSY)
- pr_debug("Some GPIOs are still in use\n");
- else if (err)
+ if (err)
pr_debug("Can not unregister GPIO driver: %i\n", err);
ssb_buses_lock();
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ssb: remove unreachable code
2021-05-18 2:52 [PATCH] ssb: remove unreachable code Tian Tao
@ 2021-05-20 16:51 ` Michael Büsch
2021-05-21 0:49 ` tiantao (H)
2021-06-15 10:11 ` Kalle Valo
1 sibling, 1 reply; 8+ messages in thread
From: Michael Büsch @ 2021-05-20 16:51 UTC (permalink / raw)
To: Tian Tao; +Cc: linux-wireless, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Tue, 18 May 2021 10:52:32 +0800
Tian Tao <tiantao6@hisilicon.com> wrote:
> The return value of ssb_bus_unregister can only be 0 or 1, so this
> condition if (err == -EBUSY) will not hold, so delete it.
> @@ -431,9 +431,7 @@ void ssb_bus_unregister(struct ssb_bus *bus)
> int err;
>
> err = ssb_gpio_unregister(bus);
> - if (err == -EBUSY)
> - pr_debug("Some GPIOs are still in use\n");
> - else if (err)
> + if (err)
> pr_debug("Can not unregister GPIO driver: %i\n", err);
>
> ssb_buses_lock();
Good catch.
Minor correction: The return value can be 0 or -1.
Acked-by: Michael Büsch <m@bues.ch>
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ssb: remove unreachable code
2021-05-20 16:51 ` Michael Büsch
@ 2021-05-21 0:49 ` tiantao (H)
2021-05-21 3:36 ` Kalle Valo
0 siblings, 1 reply; 8+ messages in thread
From: tiantao (H) @ 2021-05-21 0:49 UTC (permalink / raw)
To: Michael Büsch, Tian Tao; +Cc: linux-wireless, Kalle Valo
在 2021/5/21 0:51, Michael Büsch 写道:
> On Tue, 18 May 2021 10:52:32 +0800
> Tian Tao <tiantao6@hisilicon.com> wrote:
>
>> The return value of ssb_bus_unregister can only be 0 or 1, so this
>> condition if (err == -EBUSY) will not hold, so delete it.
>> @@ -431,9 +431,7 @@ void ssb_bus_unregister(struct ssb_bus *bus)
>> int err;
>>
>> err = ssb_gpio_unregister(bus);
>> - if (err == -EBUSY)
>> - pr_debug("Some GPIOs are still in use\n");
>> - else if (err)
>> + if (err)
>> pr_debug("Can not unregister GPIO driver: %i\n", err);
>>
>> ssb_buses_lock();
> Good catch.
> Minor correction: The return value can be 0 or -1.
yes, you are right. thanks again.:-)
>
> Acked-by: Michael Büsch <m@bues.ch>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ssb: remove unreachable code
2021-05-21 0:49 ` tiantao (H)
@ 2021-05-21 3:36 ` Kalle Valo
0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2021-05-21 3:36 UTC (permalink / raw)
To: tiantao (H); +Cc: Michael Büsch, Tian Tao, linux-wireless
"tiantao (H)" <tiantao6@huawei.com> writes:
> 在 2021/5/21 0:51, Michael Büsch 写道:
>> On Tue, 18 May 2021 10:52:32 +0800
>> Tian Tao <tiantao6@hisilicon.com> wrote:
>>
>>> The return value of ssb_bus_unregister can only be 0 or 1, so this
>>> condition if (err == -EBUSY) will not hold, so delete it.
>>> @@ -431,9 +431,7 @@ void ssb_bus_unregister(struct ssb_bus *bus)
>>> int err;
>>> err = ssb_gpio_unregister(bus);
>>> - if (err == -EBUSY)
>>> - pr_debug("Some GPIOs are still in use\n");
>>> - else if (err)
>>> + if (err)
>>> pr_debug("Can not unregister GPIO driver: %i\n", err);
>>> ssb_buses_lock();
>> Good catch.
>> Minor correction: The return value can be 0 or -1.
>
> yes, you are right. thanks again.:-)
I'll fix the commit log to match that.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ssb: remove unreachable code
2021-05-18 2:52 [PATCH] ssb: remove unreachable code Tian Tao
2021-05-20 16:51 ` Michael Büsch
@ 2021-06-15 10:11 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2021-06-15 10:11 UTC (permalink / raw)
To: Tian Tao; +Cc: m, linux-wireless, Tian Tao
Tian Tao <tiantao6@hisilicon.com> wrote:
> The return value of ssb_bus_unregister can only be 0 or -1, so this
> condition if (err == -EBUSY) will not hold, so delete it.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Acked-by: Michael Büsch <m@bues.ch>
Patch applied to wireless-drivers-next.git, thanks.
233bc2837282 ssb: remove unreachable code
--
https://patchwork.kernel.org/project/linux-wireless/patch/1621306352-3632-1-git-send-email-tiantao6@hisilicon.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ssb: remove unreachable code
2022-05-06 7:58 [PATCH] " Jiapeng Chong
2022-05-06 15:29 ` Michael Büsch
@ 2022-05-11 5:29 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-05-11 5:29 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: m, linux-wireless, linux-kernel, Jiapeng Chong, Abaci Robot
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> Clean up the following smatch warning:
>
> drivers/ssb/pci.c:917 ssb_pci_sprom_get() warn: ignoring unreachable
> code.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Acked-by: Michael Büsch <m@bues.ch>
Patch applied to wireless-next.git, thanks.
84dc992e23df ssb: remove unreachable code
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220506075814.115059-1-jiapeng.chong@linux.alibaba.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ssb: remove unreachable code
2022-05-06 7:58 [PATCH] " Jiapeng Chong
@ 2022-05-06 15:29 ` Michael Büsch
2022-05-11 5:29 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Michael Büsch @ 2022-05-06 15:29 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: linux-wireless, linux-kernel, Abaci Robot
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
On Fri, 6 May 2022 15:58:14 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> Clean up the following smatch warning:
>
> drivers/ssb/pci.c:917 ssb_pci_sprom_get() warn: ignoring unreachable
> code.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/ssb/pci.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
> index 148bcb99c212..493bebbba521 100644
> --- a/drivers/ssb/pci.c
> +++ b/drivers/ssb/pci.c
> @@ -914,7 +914,6 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
> err = 0;
> goto out_free;
> }
> - pr_warn("WARNING: Invalid SPROM CRC (corrupt
> SPROM)\n"); }
> }
> err = sprom_extract(bus, sprom, buf, bus->sprom_size);
Acked-by: Michael Büsch <m@bues.ch>
--
Michael Büsch
https://bues.ch/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ssb: remove unreachable code
@ 2022-05-06 7:58 Jiapeng Chong
2022-05-06 15:29 ` Michael Büsch
2022-05-11 5:29 ` Kalle Valo
0 siblings, 2 replies; 8+ messages in thread
From: Jiapeng Chong @ 2022-05-06 7:58 UTC (permalink / raw)
To: m; +Cc: linux-wireless, linux-kernel, Jiapeng Chong, Abaci Robot
Clean up the following smatch warning:
drivers/ssb/pci.c:917 ssb_pci_sprom_get() warn: ignoring unreachable
code.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/ssb/pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 148bcb99c212..493bebbba521 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -914,7 +914,6 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
err = 0;
goto out_free;
}
- pr_warn("WARNING: Invalid SPROM CRC (corrupt SPROM)\n");
}
}
err = sprom_extract(bus, sprom, buf, bus->sprom_size);
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-11 5:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 2:52 [PATCH] ssb: remove unreachable code Tian Tao
2021-05-20 16:51 ` Michael Büsch
2021-05-21 0:49 ` tiantao (H)
2021-05-21 3:36 ` Kalle Valo
2021-06-15 10:11 ` Kalle Valo
2022-05-06 7:58 [PATCH] " Jiapeng Chong
2022-05-06 15:29 ` Michael Büsch
2022-05-11 5:29 ` 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.