android_kernel_oneplus_msm8998/drivers/gpu/drm/nouveau
Arnd Bergmann c19bb06726 drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
commit b74c0a9969f25217a5e5bbcac56a11bee16718d3 upstream.

gcc-4.9 notices that the validate_init() function returns unintialized
data when called with a zero 'nr_buffers' argument, when called with the
-Wmaybe-uninitialized flag:

drivers/gpu/drm/nouveau/nouveau_gem.c: In function ‘validate_init.isra.6’:
drivers/gpu/drm/nouveau/nouveau_gem.c:457:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

However, the only caller of this function always passes a nonzero
argument, and gcc-6 is clever enough to take this into account and
not warn about it any more.

Adding an explicit initialization to -EINVAL here is correct even if
the caller changed, and it avoids the warning on gcc-4.9 as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-By: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:48 +01:00
..
dispnv04 drm/nouveau/nv1a,nv1f/disp: fix memory clock rate retrieval 2017-02-09 08:02:44 +01:00
include drm/nouveau/tmr: fully separate alarm execution/pending lists 2017-06-14 13:16:25 +02:00
nvif
nvkm drm/nouveau/mmu: flush tlbs before deleting page tables 2017-10-27 10:23:16 +02:00
Kbuild
Kconfig
nouveau_abi16.c
nouveau_abi16.h
nouveau_acpi.c
nouveau_acpi.h
nouveau_backlight.c
nouveau_bios.c drm/nouveau/kms: lvds panel strap moved again on maxwell 2017-01-09 08:07:45 +01:00
nouveau_bios.h
nouveau_bo.c
nouveau_bo.h
nouveau_chan.c
nouveau_chan.h
nouveau_connector.c
nouveau_connector.h
nouveau_crtc.h
nouveau_debugfs.c
nouveau_debugfs.h
nouveau_display.c drm/nouveau: Don't enabling polling twice on runtime resume 2017-06-17 06:39:37 +02:00
nouveau_display.h
nouveau_dma.c
nouveau_dma.h
nouveau_dp.c
nouveau_drm.c drm/nouveau: Don't enabling polling twice on runtime resume 2017-06-17 06:39:37 +02:00
nouveau_drm.h
nouveau_encoder.h
nouveau_fbcon.c drm/nouveau: fix for disabled fbdev emulation 2016-07-27 09:47:34 -07:00
nouveau_fbcon.h
nouveau_fence.c
nouveau_fence.h drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers 2017-06-17 06:39:37 +02:00
nouveau_gem.c drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized 2018-02-25 11:03:48 +01:00
nouveau_gem.h
nouveau_hwmon.c
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_nvif.c
nouveau_platform.c
nouveau_platform.h
nouveau_prime.c
nouveau_reg.h
nouveau_sgdma.c
nouveau_sysfs.c
nouveau_sysfs.h
nouveau_ttm.c
nouveau_ttm.h
nouveau_usif.c drm/nouveau: prevent userspace from deleting client object 2017-06-17 06:39:37 +02:00
nouveau_usif.h
nouveau_vga.c
nouveau_vga.h
nv04_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-08-20 18:09:23 +02:00
nv04_fence.c
nv10_fence.c
nv10_fence.h
nv17_fence.c
nv50_display.c
nv50_display.h
nv50_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-08-20 18:09:23 +02:00
nv50_fence.c
nv84_fence.c drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers 2017-06-17 06:39:37 +02:00
nvc0_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-08-20 18:09:23 +02:00
nvc0_fence.c