* [PATCH] ssb: driver_gige: use true and false for boolean values
@ 2018-08-05 0:04 Gustavo A. R. Silva
2018-08-05 8:14 ` Michael Büsch
2018-08-09 15:16 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05 0:04 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-wireless, linux-kernel, Gustavo A. R. Silva
Return statements in functions returning bool should use true or false
instead of an integer value.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/ssb/driver_gige.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
index e973405..ebee6b0 100644
--- a/drivers/ssb/driver_gige.c
+++ b/drivers/ssb/driver_gige.c
@@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,
bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
{
if (!pdev->resource[0].name)
- return 0;
+ return false;
return (strcmp(pdev->resource[0].name, SSB_GIGE_MEM_RES_NAME) == 0);
}
EXPORT_SYMBOL(pdev_is_ssb_gige_core);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ssb: driver_gige: use true and false for boolean values
2018-08-05 0:04 [PATCH] ssb: driver_gige: use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-05 8:14 ` Michael Büsch
2018-08-09 15:16 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Michael Büsch @ 2018-08-05 8:14 UTC (permalink / raw)
To: Gustavo A. R. Silva, Kalle Valo; +Cc: linux-wireless, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On Sat, 4 Aug 2018 19:04:53 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/ssb/driver_gige.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
> index e973405..ebee6b0 100644
> --- a/drivers/ssb/driver_gige.c
> +++ b/drivers/ssb/driver_gige.c
> @@ -242,7 +242,7 @@ static int ssb_gige_probe(struct ssb_device *sdev,
> bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
> {
> if (!pdev->resource[0].name)
> - return 0;
> + return false;
> return (strcmp(pdev->resource[0].name, SSB_GIGE_MEM_RES_NAME) == 0);
> }
> EXPORT_SYMBOL(pdev_is_ssb_gige_core);
Looks good. Thanks.
Reviewed-by: Michael Buesch <m@bues.ch>
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ssb: driver_gige: use true and false for boolean values
2018-08-05 0:04 [PATCH] ssb: driver_gige: use true and false for boolean values Gustavo A. R. Silva
2018-08-05 8:14 ` Michael Büsch
@ 2018-08-09 15:16 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-08-09 15:16 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Michael Buesch, linux-wireless, linux-kernel, Gustavo A. R. Silva
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Reviewed-by: Michael Buesch <m@bues.ch>
Patch applied to wireless-drivers-next.git, thanks.
c7743c428111 ssb: driver_gige: use true and false for boolean values
--
https://patchwork.kernel.org/patch/10555985/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-09 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-05 0:04 [PATCH] ssb: driver_gige: use true and false for boolean values Gustavo A. R. Silva
2018-08-05 8:14 ` Michael Büsch
2018-08-09 15:16 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).