src/include: Remove braces for single statements
Fix the following warning detected by checkpatch.pl:
WARNING: braces {} are not necessary for single statement blocks
TEST=Build and run on Galileo Gen2
Change-Id: I00b59f6a27c3acb393deaa763596363b7e958efd
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18654
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
			
			
This commit is contained in:
		| @@ -74,9 +74,8 @@ static inline int is_e0_later_in_bsp(int nodeid) | |||||||
| 		return 1; | 		return 1; | ||||||
|  |  | ||||||
| 	// we don't need to do that for node 0 in core0/node0 | 	// we don't need to do that for node 0 in core0/node0 | ||||||
| 	if (nodeid == 0) { | 	if (nodeid == 0) | ||||||
| 		return !is_cpu_pre_e0(); | 		return !is_cpu_pre_e0(); | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	// d0 will be treated as e0 with this methods, but the d0 nb_cfg_54 always 0 | 	// d0 will be treated as e0 with this methods, but the d0 nb_cfg_54 always 0 | ||||||
| 	pci_devfn_t dev; | 	pci_devfn_t dev; | ||||||
| @@ -89,9 +88,8 @@ static inline int is_e0_later_in_bsp(int nodeid) | |||||||
| 	e0_later = !!(val & (1<<3)); | 	e0_later = !!(val & (1<<3)); | ||||||
|  |  | ||||||
| 	// pre_e0 bit 3 always be 0 and can not be changed | 	// pre_e0 bit 3 always be 0 and can not be changed | ||||||
| 	if (e0_later) { | 	if (e0_later) | ||||||
| 		pci_write_config32(dev, 0x80, val_old); // restore it | 		pci_write_config32(dev, 0x80, val_old); // restore it | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	return e0_later; | 	return e0_later; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -103,9 +103,8 @@ static inline const struct pci_operations *ops_pci(device_t dev) | |||||||
| { | { | ||||||
| 	const struct pci_operations *pops; | 	const struct pci_operations *pops; | ||||||
| 	pops = 0; | 	pops = 0; | ||||||
| 	if (dev && dev->ops) { | 	if (dev && dev->ops) | ||||||
| 		pops = dev->ops->ops_pci; | 		pops = dev->ops->ops_pci; | ||||||
| 	} |  | ||||||
| 	return pops; | 	return pops; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -140,14 +140,12 @@ static inline void cmos_write(unsigned char val, unsigned char addr) | |||||||
| 	 * eg. the Century / AltCentury byte. So to be safe, disable | 	 * eg. the Century / AltCentury byte. So to be safe, disable | ||||||
| 	 * RTC before changing any value. | 	 * RTC before changing any value. | ||||||
| 	 */ | 	 */ | ||||||
| 	if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) { | 	if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) | ||||||
| 		cmos_write_inner(control_state | RTC_SET, RTC_CONTROL); | 		cmos_write_inner(control_state | RTC_SET, RTC_CONTROL); | ||||||
| 	} |  | ||||||
| 	cmos_write_inner(val, addr); | 	cmos_write_inner(val, addr); | ||||||
| 	/* reset to prior configuration */ | 	/* reset to prior configuration */ | ||||||
| 	if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) { | 	if ((addr != RTC_CONTROL) && !(control_state & RTC_SET)) | ||||||
| 		cmos_write_inner(control_state, RTC_CONTROL); | 		cmos_write_inner(control_state, RTC_CONTROL); | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static inline void cmos_disable_rtc(void) | static inline void cmos_disable_rtc(void) | ||||||
|   | |||||||
| @@ -24,18 +24,16 @@ int snprintf(char * buf, size_t size, const char *fmt, ...); | |||||||
| static inline size_t strnlen(const char *src, size_t max) | static inline size_t strnlen(const char *src, size_t max) | ||||||
| { | { | ||||||
| 	size_t i = 0; | 	size_t i = 0; | ||||||
| 	while ((*src++) && (i < max)) { | 	while ((*src++) && (i < max)) | ||||||
| 		i++; | 		i++; | ||||||
| 	} |  | ||||||
| 	return i; | 	return i; | ||||||
| } | } | ||||||
|  |  | ||||||
| static inline size_t strlen(const char *src) | static inline size_t strlen(const char *src) | ||||||
| { | { | ||||||
| 	size_t i = 0; | 	size_t i = 0; | ||||||
| 	while (*src++) { | 	while (*src++) | ||||||
| 		i++; | 		i++; | ||||||
| 	} |  | ||||||
| 	return i; | 	return i; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user