From 200121c44ec00aca5bc83123bf6c4b18227db307 Mon Sep 17 00:00:00 2001 From: riastradh Date: Sun, 19 Dec 2021 12:37:07 +0000 Subject: drm: Make resource_size return resource_size_t like Linux. Because Linux uses resource_size_t for absolute bus addresses, it is actually bus_addr_t rather than bus_size_t. So using bus_size_t here causes trouble with the i915 range_overflows macro, which verifies that types match. --- sys/external/bsd/drm2/include/linux/ioport.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/external/bsd/drm2/include/linux/ioport.h b/sys/external/bsd/drm2/include/linux/ioport.h index 60b90eeb7a4..40c03afdc4b 100644 --- a/sys/external/bsd/drm2/include/linux/ioport.h +++ b/sys/external/bsd/drm2/include/linux/ioport.h @@ -1,4 +1,4 @@ -/* $NetBSD: ioport.h,v 1.7 2021/12/19 11:55:38 riastradh Exp $ */ +/* $NetBSD: ioport.h,v 1.8 2021/12/19 12:37:07 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,6 +35,8 @@ #include #include +#include + #define IORESOURCE_IO __BIT(0) #define IORESOURCE_MEM __BIT(1) #define IORESOURCE_IRQ __BIT(2) @@ -52,7 +54,7 @@ struct resource { #define DEFINE_RES_MEM(START, SIZE) \ { .start = (START), .end = (START) + ((SIZE) - 1) } -static inline bus_size_t +static inline resource_size_t resource_size(struct resource *resource) { return resource->end - resource->start + 1; -- cgit