Skip to content

Commit e7c6e40

Browse files
committed
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 <[email protected]>
1 parent e359bce commit e7c6e40

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ int ilk_wm_max_level(const struct drm_i915_private *dev_priv)
29932993

29942994
static void intel_print_wm_latency(struct drm_i915_private *dev_priv,
29952995
const char *name,
2996-
const u16 wm[8])
2996+
const u16 wm[])
29972997
{
29982998
int level, max_level = ilk_wm_max_level(dev_priv);
29992999

drivers/media/usb/dvb-usb/dvb-usb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ extern int __must_check
487487
dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);
488488

489489
/* 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 *);
491491

492492
/* commonly used firmware download types and function */
493493
struct hexline {

include/scsi/libfcoe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *, struct fc_lport *,
249249
struct fc_frame *);
250250

251251
/* 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);
253253
int fcoe_libfc_config(struct fc_lport *, struct fcoe_ctlr *,
254254
const struct libfc_function_template *, int init_fcp);
255255
u32 fcoe_fc_crc(struct fc_frame *fp);

net/bluetooth/ecdh_helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525

2626
int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 pair_public_key[64],
2727
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]);
2929
int generate_ecdh_public_key(struct crypto_kpp *tfm, u8 public_key[64]);
3030
int generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64]);

0 commit comments

Comments
 (0)