HomeFreeBSD

MFC r302571,r302572,r302577,r302841:

Description

MFC r302571,r302572,r302577,r302841:

Approved by: re (gjb)

r302571:

Remove redundant declaration for radeon_pm_acpi_event_handler(..) to fix
-Wredundant-decls warning

PR: 209924
Tested with: devel/amd64-gcc (5.3.0)

r302572:

Remove redundant declarations for intel_fbc_enabled(..) and
i915_gem_dump_object(..) to fix -Wredundant-decls warning

PR: 209924
Tested with: devel/amd64-gcc (5.3.0)

r302577:

Add missing default case to capable(..) function definition

By definition (enum __drm_capabilities), cases other than CAP_SYS_ADMIN
aren't possible. Add in a KASSERT safety belt and return false in
!INVARIANTS case if an invalid value is passed in, as it would be a
programmer error.

This fixes a -Wreturn-type error with gcc 5.3.0.

r302841:

Always panic if an invalid capability is passed to capable(..) instead of
just with INVARIANTS

rwatson's point was valid in the sense that if the data passed at runtime is
invalid, it should always trip the invariant, not just in the debug case.
This is a deterrent against malicious input, or input caused by hardware
errors.

Requested by: rwatson

Details

Provenance
ngieAuthored on
Parents
rS303688: cxgbe/t4_tom: Read the chip's DDP page sizes and save them in a
Branches
Unknown
Tags
Unknown