device: correct code style

Revise the following aspects to follow coreboot's coding style:
 - Drop braces for single-statement condition and loop bodies.
 - Use `__func__` to print the current function's name.
 - Reflow pointer dereferences to fit in a single line.
 - Adjust the `*` position in pointer variable declarations.
 - Drop unnecessary `else` statements.

BUG = N/A
TEST = Build Compulab Intense-PC with secure oprom enabled

Change-Id: I780251d946d5bea97658476d61d25555ec768dfc
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49963
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Frans Hendriks
2021-02-01 11:44:37 +01:00
committed by Patrick Georgi
parent 3d6d1075b2
commit a9caa50e8a
5 changed files with 41 additions and 46 deletions

View File

@ -9,7 +9,7 @@
#include <device/resource.h>
/** Linked list of ALL devices */
DEVTREE_CONST struct device * DEVTREE_CONST all_devices = &dev_root;
DEVTREE_CONST struct device *DEVTREE_CONST all_devices = &dev_root;
/**
* Given a PCI bus and a devfn number, find the device structure.