src/mainboard: Remove irrelevant conditional statement
Using a conditional statement to return 0 or 1 depending on a logic value is unnecessarily complex. Change-Id: I449ce2b71b72374de5ec4986f9cc9f91a67856ee Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/29265 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
407f512cfe
commit
07065edd5e
|
@ -102,13 +102,7 @@ int is_dev3_present(void)
|
||||||
/* read the GPIO68 input status */
|
/* read the GPIO68 input status */
|
||||||
word = pci_read_config16(sm_dev, 0x7e);
|
word = pci_read_config16(sm_dev, 0x7e);
|
||||||
|
|
||||||
if(word & (1 << 10)){
|
return !(word & (1 << 10));
|
||||||
/*not exist*/
|
|
||||||
return 0;
|
|
||||||
}else{
|
|
||||||
/*exist*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,13 +94,7 @@ int is_dev3_present(void)
|
||||||
/* read the GPIO68 input status */
|
/* read the GPIO68 input status */
|
||||||
word = pci_read_config16(sm_dev, 0x7e);
|
word = pci_read_config16(sm_dev, 0x7e);
|
||||||
|
|
||||||
if(word & (1 << 10)){
|
return !(word & (1 << 10));
|
||||||
/*not exist*/
|
|
||||||
return 0;
|
|
||||||
}else{
|
|
||||||
/*exist*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -104,13 +104,7 @@ int is_dev3_present(void)
|
||||||
/* read the GPIO68 input status */
|
/* read the GPIO68 input status */
|
||||||
word = pci_read_config16(sm_dev, 0x7e);
|
word = pci_read_config16(sm_dev, 0x7e);
|
||||||
|
|
||||||
if(word & (1 << 10)){
|
return !(word & (1 << 10));
|
||||||
/*not exist*/
|
|
||||||
return 0;
|
|
||||||
}else{
|
|
||||||
/*exist*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -102,13 +102,7 @@ int is_dev3_present(void)
|
||||||
/* read the GPIO68 input status */
|
/* read the GPIO68 input status */
|
||||||
word = pci_read_config16(sm_dev, 0x7e);
|
word = pci_read_config16(sm_dev, 0x7e);
|
||||||
|
|
||||||
if(word & (1 << 10)){
|
return !(word & (1 << 10));
|
||||||
/*not exist*/
|
|
||||||
return 0;
|
|
||||||
}else{
|
|
||||||
/*exist*/
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue