Replace mesa's slightly different container_of() with one more aligned to the linux kernel's version which takes a type as the 2nd param. This avoids warnings like: freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized] At the same time, we can add additional build-time type-checking asserts Signed-off-by: Rob Clark <robdclark@chromium.org> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941>