Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Fix misc new gcc warnings

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>

+4 -4
+1 -1
drivers/gpu/drm/i915/intel_pm.c
··· 2993 2993 2994 2994 static void intel_print_wm_latency(struct drm_i915_private *dev_priv, 2995 2995 const char *name, 2996 - const u16 wm[8]) 2996 + const u16 wm[]) 2997 2997 { 2998 2998 int level, max_level = ilk_wm_max_level(dev_priv); 2999 2999
+1 -1
drivers/media/usb/dvb-usb/dvb-usb.h
··· 487 487 dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16); 488 488 489 489 /* commonly used remote control parsing */ 490 - extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *); 490 + extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[5], u32 *, int *); 491 491 492 492 /* commonly used firmware download types and function */ 493 493 struct hexline {
+1 -1
include/scsi/libfcoe.h
··· 249 249 struct fc_frame *); 250 250 251 251 /* libfcoe funcs */ 252 - u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); 252 + u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], unsigned int, unsigned int); 253 253 int fcoe_libfc_config(struct fc_lport *, struct fcoe_ctlr *, 254 254 const struct libfc_function_template *, int init_fcp); 255 255 u32 fcoe_fc_crc(struct fc_frame *fp);
+1 -1
net/bluetooth/ecdh_helper.h
··· 25 25 26 26 int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 pair_public_key[64], 27 27 u8 secret[32]); 28 - int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 *private_key); 28 + int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 private_key[32]); 29 29 int generate_ecdh_public_key(struct crypto_kpp *tfm, u8 public_key[64]); 30 30 int generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64]);