Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 12:37:07 UTC 2021

Modified Files:
        src/sys/external/bsd/drm2/include/linux: ioport.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/include/linux/ioport.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/ioport.h
diff -u src/sys/external/bsd/drm2/include/linux/ioport.h:1.7 src/sys/external/bsd/drm2/include/linux/ioport.h:1.8
--- src/sys/external/bsd/drm2/include/linux/ioport.h:1.7	Sun Dec 19 11:55:38 2021
+++ src/sys/external/bsd/drm2/include/linux/ioport.h	Sun Dec 19 12:37:07 2021
@@ -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 <sys/types.h>
 #include <sys/bus.h>
 
+#include <linux/types.h>
+
 #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;

Reply via email to