summaryrefslogtreecommitdiffstats
path: root/src/device/device_util.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-14 11:29:51 +0300
committerPatrick Georgi <pgeorgi@google.com>2021-07-01 09:46:09 +0000
commitb2287718ef2ab8051d917702185f91c33cb61aa3 (patch)
tree227ec2fe5d6191509ffe287a121a8f73786773a3 /src/device/device_util.c
parent3ab408c698df4246acd26a74f0e3db638d80a431 (diff)
downloadcoreboot-b2287718ef2ab8051d917702185f91c33cb61aa3.tar.gz
coreboot-b2287718ef2ab8051d917702185f91c33cb61aa3.tar.bz2
coreboot-b2287718ef2ab8051d917702185f91c33cb61aa3.zip
device: Clean up resource utility function signatures
Drop extern declarations from functions. Declare resource arguments as const. Change-Id: I7684cc7813bad805c39a762892636818279ac134 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55475 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index f05f71df8699..a5d186006479 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -450,7 +450,7 @@ static resource_t align_down(resource_t val, unsigned long gran)
* @param resource The resource whose limit is desired.
* @return The end.
*/
-resource_t resource_end(struct resource *resource)
+resource_t resource_end(const struct resource *resource)
{
resource_t base, end;
@@ -476,7 +476,7 @@ resource_t resource_end(struct resource *resource)
* @param resource The resource whose maximum is desired.
* @return The maximum.
*/
-resource_t resource_max(struct resource *resource)
+resource_t resource_max(const struct resource *resource)
{
resource_t max;
@@ -491,7 +491,7 @@ resource_t resource_max(struct resource *resource)
* @param resource The resource type to decode.
* @return TODO.
*/
-const char *resource_type(struct resource *resource)
+const char *resource_type(const struct resource *resource)
{
static char buffer[RESOURCE_TYPE_MAX];
snprintf(buffer, sizeof(buffer), "%s%s%s%s",
@@ -513,7 +513,7 @@ const char *resource_type(struct resource *resource)
* @param resource The resource that was just stored.
* @param comment TODO
*/
-void report_resource_stored(struct device *dev, struct resource *resource,
+void report_resource_stored(struct device *dev, const struct resource *resource,
const char *comment)
{
char buf[10];