Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: ti: cpsw: use true,false for bool variables
@ 2020-09-19 7:46 Jason Yan
2020-09-19 21:25 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-09-19 7:46 UTC (permalink / raw)
To: grygorii.strashko, davem, kuba, ast, daniel, hawk,
john.fastabend, kafai, songliubraving, yhs, andriin, kpsingh,
linux-omap, netdev, bpf
Cc: Jason Yan, Hulk Robot
This addresses the following coccinelle warning:
drivers/net/ethernet/ti/cpsw.c:1599:2-17: WARNING: Assignment of 0/1 to
bool variable
drivers/net/ethernet/ti/cpsw.c:1300:2-17: WARNING: Assignment of 0/1 to
bool variable
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/net/ethernet/ti/cpsw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 9b425f184f3c..9fd1f77190ad 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1291,7 +1291,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
data->mac_control = prop;
if (of_property_read_bool(node, "dual_emac"))
- data->dual_emac = 1;
+ data->dual_emac = true;
/*
* Populate all the child nodes here...
@@ -1590,7 +1590,7 @@ static int cpsw_probe(struct platform_device *pdev)
soc = soc_device_match(cpsw_soc_devices);
if (soc)
- cpsw->quirk_irq = 1;
+ cpsw->quirk_irq = true;
data = &cpsw->data;
cpsw->slaves = devm_kcalloc(dev,
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ethernet: ti: cpsw: use true,false for bool variables
2020-09-19 7:46 [PATCH net-next] net: ethernet: ti: cpsw: use true,false for bool variables Jason Yan
@ 2020-09-19 21:25 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-19 21:25 UTC (permalink / raw)
To: yanaijie
Cc: grygorii.strashko, kuba, ast, daniel, hawk, john.fastabend,
kafai, songliubraving, yhs, andriin, kpsingh, linux-omap, netdev,
bpf, hulkci
From: Jason Yan <yanaijie@huawei.com>
Date: Sat, 19 Sep 2020 15:46:17 +0800
> This addresses the following coccinelle warning:
>
> drivers/net/ethernet/ti/cpsw.c:1599:2-17: WARNING: Assignment of 0/1 to
> bool variable
> drivers/net/ethernet/ti/cpsw.c:1300:2-17: WARNING: Assignment of 0/1 to
> bool variable
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-19 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 7:46 [PATCH net-next] net: ethernet: ti: cpsw: use true,false for bool variables Jason Yan
2020-09-19 21:25 ` David Miller
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).