linux-brain/drivers/gpu/drm/nouveau
Guenter Roeck 3825263486 drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
commit e8f71f89236ef82d449991bfbc237e3cb6ea584f upstream.

nvkm test builds fail with the following error.

  drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c: In function 'nvkm_control_mthd_pstate_info':
  drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c:60:35: error: overflow in conversion from 'int' to '__s8' {aka 'signed char'} changes value from '-251' to '5'

The code builds on most architectures, but fails on parisc where ENOSYS
is defined as 251.

Replace the error code with -ENODEV (-19).  The actual error code does
not really matter and is not passed to userspace - it just has to be
negative.

Fixes: 7238eca4cf ("drm/nouveau: expose pstate selection per-power source in sysfs")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-26 14:07:14 +02:00
..
dispnv04 drm/nouveau/dispnv04: Remove runtime PM 2019-08-23 12:55:34 +10:00
dispnv50 drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0 2021-01-27 11:47:46 +01:00
include drm/nouveau/kms: handle mDP connectors 2021-03-04 10:26:43 +01:00
nvif drm/nouveau/mmu: use struct_size() helper 2019-08-23 12:55:31 +10:00
nvkm drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV 2021-09-26 14:07:14 +02:00
Kbuild drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:51 +10:00
Kconfig mm: remove CONFIG_MIGRATE_VMA_HELPER 2019-08-20 09:35:03 -03:00
nouveau_abi16.c drm/nouveau: remove open-coded drm_invalid_op() 2019-08-07 11:52:08 -04:00
nouveau_abi16.h drm/nouveau: remove open-coded drm_invalid_op() 2019-08-07 11:52:08 -04:00
nouveau_acpi.c drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_acpi.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_backlight.c
nouveau_bios.c drm/nouveau/bios: downgrade absence of tmds table to info from an error 2019-08-23 12:55:31 +10:00
nouveau_bios.h
nouveau_bo.c drm/nouveau: fix dma_address check for CPU/GPU sync 2021-07-07 08:22:58 -04:00
nouveau_bo.h drm/nouveau: Fix fallout from reservation object rework 2019-09-17 14:50:15 +10:00
nouveau_chan.c drm/nouveau: bail out of nouveau_channel_new if channel init fails 2021-03-04 10:26:23 +01:00
nouveau_chan.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_connector.c drm/nouveau/kms: handle mDP connectors 2021-03-04 10:26:43 +01:00
nouveau_connector.h drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware 2020-01-09 10:19:47 +01:00
nouveau_crtc.h drm/nouveau: drop drmP.h from all header files 2019-08-23 12:55:30 +10:00
nouveau_debugfs.c drm/nouveau/debugfs: fix runtime pm imbalance on error 2020-10-01 13:18:03 +02:00
nouveau_debugfs.h drm/nouveau: drop drmP.h from all header files 2019-08-23 12:55:30 +10:00
nouveau_display.c drm/nouveau: drop use of drmp.h 2019-08-23 12:55:31 +10:00
nouveau_display.h drm/nouveau: drop drmP.h from nouveau_drv.h 2019-08-23 12:55:30 +10:00
nouveau_dma.c drm/nouveau: drop use of DRM_UDELAY 2019-08-23 12:55:30 +10:00
nouveau_dma.h
nouveau_dmem.c drm/nouveau/nouveau: fix incorrect sizeof on args.src an args.dst 2020-02-24 08:36:28 +01:00
nouveau_dmem.h nouveau: remove a few function stubs 2019-08-20 09:35:03 -03:00
nouveau_dp.c drm/nouveau: drop use of drmp.h 2019-08-23 12:55:31 +10:00
nouveau_drm.c drm/nouveau: fix multiple instances of reference count leaks 2020-08-19 08:16:01 +02:00
nouveau_drv.h drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges 2020-04-23 10:36:37 +02:00
nouveau_encoder.h
nouveau_fbcon.c drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open 2020-09-03 11:26:46 +02:00
nouveau_fbcon.h drm/nouveau: Use drm_fb_helper_fill_info 2019-03-27 10:03:16 +01:00
nouveau_fence.c drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler 2020-02-24 08:36:48 +01:00
nouveau_fence.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_gem.c drm/nouveau/gem: fix "refcount_t: underflow; use-after-free" 2020-11-10 12:37:31 +01:00
nouveau_gem.h drm/nouveau: drop drmP.h from all header files 2019-08-23 12:55:30 +10:00
nouveau_hwmon.c drm/nouveau: drop use of drmp.h 2019-08-23 12:55:31 +10:00
nouveau_hwmon.h
nouveau_ioc32.c drm/nouveau: drop use of drmp.h 2019-08-23 12:55:31 +10:00
nouveau_ioctl.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_led.c
nouveau_led.h
nouveau_mem.c drm/nouveau/mem: guard against NULL pointer access in mem_del 2020-10-14 10:32:57 +02:00
nouveau_mem.h
nouveau_nvif.c
nouveau_platform.c
nouveau_platform.h
nouveau_prime.c drm/nouveau: wait for moving fence after pinning v2 2021-06-30 08:47:43 -04:00
nouveau_reg.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_sgdma.c drm/ttm/nouveau: don't call tt destroy callback on alloc failure. 2020-08-19 08:16:24 +02:00
nouveau_svm.c drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices 2021-02-03 23:25:58 +01:00
nouveau_svm.h drm/nouveau/svm: new ioctl to migrate process memory to GPU memory 2019-02-20 09:00:03 +10:00
nouveau_ttm.c drm/nouveau/drm/ttm: Remove set but not used variable 'mem' 2020-02-24 08:36:48 +01:00
nouveau_ttm.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_usif.c
nouveau_usif.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_vga.c drm/nouveau: drop use of drmp.h 2019-08-23 12:55:31 +10:00
nouveau_vga.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nouveau_vmm.c drm/nouveau/svm: initial support for shared virtual memory 2019-02-20 09:00:02 +10:00
nouveau_vmm.h drm/nouveau/svm: initial support for shared virtual memory 2019-02-20 09:00:02 +10:00
nv04_fbcon.c
nv04_fence.c
nv10_fence.c
nv10_fence.h drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:50 +10:00
nv17_fence.c
nv50_display.h
nv50_fbcon.c
nv50_fence.c
nv84_fence.c drm/nouveau: prepare for enabling svm with existing userspace interfaces 2019-02-20 09:00:01 +10:00
nvc0_fbcon.c
nvc0_fence.c