Skip to content

Commit

Permalink
net: ethernet: ti: cpsw: use true,false for bool variables
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JasonYanHw authored and davem330 committed Sep 19, 2020
1 parent 65dc8e1 commit a78766d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a78766d

Please sign in to comment.