From e394af1376539b3f823e1f9b613cfa4bbcf24457 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 31 Jan 2018 10:17:22 +0000 Subject: [PATCH] adjust container_of() for const use avoids -Wincompatible-pointer-types-discards-qualifiers build errors with radeon_ucode.c --- sys/dev/pci/drm/drm_linux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index f11ac61e7a7..4953842f3ac 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.82 2018/01/31 05:04:41 jsg Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.83 2018/01/31 10:17:22 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -494,7 +494,7 @@ PTR_ERR_OR_ZERO(const void *ptr) do { __typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while(0) #define container_of(ptr, type, member) ({ \ - __typeof( ((type *)0)->member ) *__mptr = (ptr); \ + const __typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) #ifndef __DECONST -- 2.20.1