]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
Fix misc new gcc warnings
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 28 Apr 2021 00:05:53 +0000 (17:05 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:32:24 +0000 (10:32 +0200)
commitd405d5717b972c5aeba8bc618776442d17ef17e6
treefdd82f0e949d67648859442aeb923c3ea25de2f0
parent60ddebd2a5ee8fd867ba986475eaf449ee4fd7ef
Fix misc new gcc warnings

BugLink: https://bugs.launchpad.net/bugs/1928857
commit e7c6e405e171fb33990a12ecfd14e6500d9e5cf2 upstream.

It seems like Fedora 34 ends up enabling a few new gcc warnings, notably
"-Wstringop-overread" and "-Warray-parameter".

Both of them cause what seem to be valid warnings in the kernel, where
we have array size mismatches in function arguments (that are no longer
just silently converted to a pointer to element, but actually checked).

This fixes most of the trivial ones, by making the function declaration
match the function definition, and in the case of intel_pm.c, removing
the over-specified array size from the argument declaration.

At least one 'stringop-overread' warning remains in the i915 driver, but
that one doesn't have the same obvious trivial fix, and may or may not
actually be indicative of a bug.

[ It was a mistake to upgrade one of my machines to Fedora 34 while
  being busy with the merge window, but if this is the extent of the
  compiler upgrade problems, things are better than usual    - Linus ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/i915/intel_pm.c
drivers/media/usb/dvb-usb/dvb-usb.h
include/scsi/libfcoe.h
net/bluetooth/ecdh_helper.h