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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

Tony Nguyen says:

====================
i40e: Replace one-element arrays with flexible-array members

Replace one-element arrays with flexible-array members in multiple
structures.

This results in no differences in binary output.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
i40e: Replace one-element array with flex-array member in struct i40e_profile_aq_section
i40e: Replace one-element array with flex-array member in struct i40e_section_table
i40e: Replace one-element array with flex-array member in struct i40e_profile_segment
i40e: Replace one-element array with flex-array member in struct i40e_package_header
====================

Link: https://lore.kernel.org/r/20230810175302.1964182-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+6 -6
+2 -2
drivers/net/ethernet/intel/i40e/i40e_ddp.c
··· 220 220 netdev_err(netdev, "Invalid DDP profile - size is bigger than 4G"); 221 221 return false; 222 222 } 223 - if (size < (sizeof(struct i40e_package_header) + 223 + if (size < (sizeof(struct i40e_package_header) + sizeof(u32) + 224 224 sizeof(struct i40e_metadata_segment) + sizeof(u32) * 2)) { 225 225 netdev_err(netdev, "Invalid DDP profile - size is too small."); 226 226 return false; ··· 281 281 if (!i40e_ddp_is_pkg_hdr_valid(netdev, pkg_hdr, size)) 282 282 return -EINVAL; 283 283 284 - if (size < (sizeof(struct i40e_package_header) + 284 + if (size < (sizeof(struct i40e_package_header) + sizeof(u32) + 285 285 sizeof(struct i40e_metadata_segment) + sizeof(u32) * 2)) { 286 286 netdev_err(netdev, "Invalid DDP recipe size."); 287 287 return -EINVAL;
+4 -4
drivers/net/ethernet/intel/i40e/i40e_type.h
··· 1455 1455 struct i40e_package_header { 1456 1456 struct i40e_ddp_version version; 1457 1457 u32 segment_count; 1458 - u32 segment_offset[1]; 1458 + u32 segment_offset[]; 1459 1459 }; 1460 1460 1461 1461 /* Generic segment header */ ··· 1486 1486 struct i40e_ddp_version version; 1487 1487 char name[I40E_DDP_NAME_SIZE]; 1488 1488 u32 device_table_count; 1489 - struct i40e_device_id_entry device_table[1]; 1489 + struct i40e_device_id_entry device_table[]; 1490 1490 }; 1491 1491 1492 1492 struct i40e_section_table { 1493 1493 u32 section_count; 1494 - u32 section_offset[1]; 1494 + u32 section_offset[]; 1495 1495 }; 1496 1496 1497 1497 struct i40e_profile_section_header { ··· 1523 1523 u16 flags; 1524 1524 u8 param[16]; 1525 1525 u16 datalen; 1526 - u8 data[1]; 1526 + u8 data[]; 1527 1527 }; 1528 1528 1529 1529 struct i40e_profile_info {