/* * Copyright (C) 2015 Tobias Klauser * * This file is part of llmnrd. * * llmnrd is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. * * llmnrd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with llmnrd. If not, see . */ #ifndef COMPILER_H #define COMPILER_H #ifdef __GNUC__ # define __noreturn __attribute__((noreturn)) # define __warn_unused_result __attribute__((warn_unused_result)) # define __packed __attribute__((packed)) # define __unused __attribute__((unused)) # ifndef offsetof # define offsetof(a, b) __builtin_offsetof(a, b) # endif #else # define __noreturn # define __packed # define __unused #endif #ifndef offsetof # define offsetof(type, member) ((size_t) &((type *)0)->member) #endif #ifndef container_of # define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) *__mptr = (ptr); \ (type *)((char *)__mptr - offsetof(type, member));}) #endif #endif /* COMPILER_H */ > net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2016-10-03 00:06:46 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-10-06 12:39:03 -0400
commit2f9ba199daf32dded4ef0237cd12efac451ebf47 (patch)
treea050ecd0a9ec5dbf8de6df415b91a3dbb7040f73
parent140c94da3c3338c0ff4cc127cf9bec87905ca83c (diff)
drm/amdgpu: warn if dp aux is still attached on free
If this happens (and it recently did), we free a structure while part of it is still in use, which results in non-obvious crashes. The way it's detached is not trivial (DRM core has to call the connector .destroy callback and things must be torn down in the right order), so better detect it and warn early. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>