x86/mm/pat, drivers/media/ivtv: Move the PAT warning and replace WARN() with pr_warn()
authorLuis R. Rodriguez <mcgrof@suse.com>
Fri, 17 Jul 2015 21:07:25 +0000 (14:07 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 21 Jul 2015 07:42:54 +0000 (09:42 +0200)
commitf5530d5af835ffa82a0607f5f1977d63ac02551f
tree0101c0d147484d6310ad2a3d19ef9374ac2152b1
parentfd0a1b8607ef311a2c800dd54c9a4a3583756ea6
x86/mm/pat, drivers/media/ivtv: Move the PAT warning and replace WARN() with pr_warn()

On built-in kernels this warning will always splat, even if no ivtvfb
hardware is present, as this is part of the module init:

if (WARN(pat_enabled(),
 "ivtvfb needs PAT disabled, boot with nopat kernel parameter\n")) {

Fix that by shifting the PAT requirement check out under the code
that does the "quasi-probe" for the device.

This device driver relies on an existing driver to find its own devices,
it looks for that device driver and its own found devices, then uses
driver_for_each_device() to try to see if it can probe each of those
devices as a frambuffer device with ivtvfb_init_card().

We tuck the PAT requiremenet check then on the ivtvfb_init_card() call
making the check at least require an ivtv device present before
complaining.

Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot]
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: andy@silverblocksystems.net
Cc: benh@kernel.crashing.org
Cc: bp@suse.de
Cc: dan.j.williams@intel.com
Cc: dledford@redhat.com
Cc: jkosina@suse.cz
Cc: julia.lawall@lip6.fr
Cc: luto@amacapital.net
Cc: mchehab@osg.samsung.com
Link: http://lkml.kernel.org/r/1437167245-28273-3-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/media/pci/ivtv/ivtvfb.c