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:
Elyes HAOUAS 2018-10-25 10:37:24 +02:00 committed by Patrick Georgi
parent 407f512cfe
commit 07065edd5e
4 changed files with 4 additions and 28 deletions

View File

@ -102,13 +102,7 @@ int is_dev3_present(void)
/* read the GPIO68 input status */
word = pci_read_config16(sm_dev, 0x7e);
if(word & (1 << 10)){
/*not exist*/
return 0;
}else{
/*exist*/
return 1;
}
return !(word & (1 << 10));
}

View File

@ -94,13 +94,7 @@ int is_dev3_present(void)
/* read the GPIO68 input status */
word = pci_read_config16(sm_dev, 0x7e);
if(word & (1 << 10)){
/*not exist*/
return 0;
}else{
/*exist*/
return 1;
}
return !(word & (1 << 10));
}

View File

@ -104,13 +104,7 @@ int is_dev3_present(void)
/* read the GPIO68 input status */
word = pci_read_config16(sm_dev, 0x7e);
if(word & (1 << 10)){
/*not exist*/
return 0;
}else{
/*exist*/
return 1;
}
return !(word & (1 << 10));
}
/*

View File

@ -102,13 +102,7 @@ int is_dev3_present(void)
/* read the GPIO68 input status */
word = pci_read_config16(sm_dev, 0x7e);
if(word & (1 << 10)){
/*not exist*/
return 0;
}else{
/*exist*/
return 1;
}
return !(word & (1 << 10));
}
/*