Skip to content

Commit 1103969

Browse files
committed
i40e: Deadcode profile code
JIRA: https://issues.redhat.com/browse/RHEL-83569 commit 81d6bb2 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:12 2025 +0000 i40e: Deadcode profile code i40e_add_pinfo_to_list() was added in 2017 by commit 1d5c960 ("i40e: new AQ commands") i40e_find_section_in_profile() was added in 2019 by commit cdc594e ("i40e: Implement DDP support in i40e driver") Neither have been used. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-5-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Dennis Chen <dechen@redhat.com>
1 parent 4f9a41b commit 1103969

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4882,39 +4882,6 @@ i40e_find_segment_in_package(u32 segment_type,
48824882
#define I40E_SECTION_HEADER(profile, offset) \
48834883
(struct i40e_profile_section_header *)((u8 *)(profile) + (offset))
48844884

4885-
/**
4886-
* i40e_find_section_in_profile
4887-
* @section_type: the section type to search for (i.e., SECTION_TYPE_NOTE)
4888-
* @profile: pointer to the i40e segment header to be searched
4889-
*
4890-
* This function searches i40e segment for a particular section type. On
4891-
* success it returns a pointer to the section header, otherwise it will
4892-
* return NULL.
4893-
**/
4894-
struct i40e_profile_section_header *
4895-
i40e_find_section_in_profile(u32 section_type,
4896-
struct i40e_profile_segment *profile)
4897-
{
4898-
struct i40e_profile_section_header *sec;
4899-
struct i40e_section_table *sec_tbl;
4900-
u32 sec_off;
4901-
u32 i;
4902-
4903-
if (profile->header.type != SEGMENT_TYPE_I40E)
4904-
return NULL;
4905-
4906-
I40E_SECTION_TABLE(profile, sec_tbl);
4907-
4908-
for (i = 0; i < sec_tbl->section_count; i++) {
4909-
sec_off = sec_tbl->section_offset[i];
4910-
sec = I40E_SECTION_HEADER(profile, sec_off);
4911-
if (sec->section.type == section_type)
4912-
return sec;
4913-
}
4914-
4915-
return NULL;
4916-
}
4917-
49184885
/**
49194886
* i40e_ddp_exec_aq_section - Execute generic AQ for DDP
49204887
* @hw: pointer to the hw struct
@@ -5137,45 +5104,6 @@ i40e_rollback_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
51375104
return status;
51385105
}
51395106

5140-
/**
5141-
* i40e_add_pinfo_to_list
5142-
* @hw: pointer to the hardware structure
5143-
* @profile: pointer to the profile segment of the package
5144-
* @profile_info_sec: buffer for information section
5145-
* @track_id: package tracking id
5146-
*
5147-
* Register a profile to the list of loaded profiles.
5148-
*/
5149-
int
5150-
i40e_add_pinfo_to_list(struct i40e_hw *hw,
5151-
struct i40e_profile_segment *profile,
5152-
u8 *profile_info_sec, u32 track_id)
5153-
{
5154-
struct i40e_profile_section_header *sec = NULL;
5155-
struct i40e_profile_info *pinfo;
5156-
u32 offset = 0, info = 0;
5157-
int status = 0;
5158-
5159-
sec = (struct i40e_profile_section_header *)profile_info_sec;
5160-
sec->tbl_size = 1;
5161-
sec->data_end = sizeof(struct i40e_profile_section_header) +
5162-
sizeof(struct i40e_profile_info);
5163-
sec->section.type = SECTION_TYPE_INFO;
5164-
sec->section.offset = sizeof(struct i40e_profile_section_header);
5165-
sec->section.size = sizeof(struct i40e_profile_info);
5166-
pinfo = (struct i40e_profile_info *)(profile_info_sec +
5167-
sec->section.offset);
5168-
pinfo->track_id = track_id;
5169-
pinfo->version = profile->version;
5170-
pinfo->op = I40E_DDP_ADD_TRACKID;
5171-
memcpy(pinfo->name, profile->name, I40E_DDP_NAME_SIZE);
5172-
5173-
status = i40e_aq_write_ddp(hw, (void *)sec, sec->data_end,
5174-
track_id, &offset, &info, NULL);
5175-
5176-
return status;
5177-
}
5178-
51795107
/**
51805108
* i40e_aq_add_cloud_filters
51815109
* @hw: pointer to the hardware structure

drivers/net/ethernet/intel/i40e/i40e_prototype.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,20 +452,12 @@ int i40e_aq_get_ddp_list(struct i40e_hw *hw, void *buff,
452452
struct i40e_generic_seg_header *
453453
i40e_find_segment_in_package(u32 segment_type,
454454
struct i40e_package_header *pkg_header);
455-
struct i40e_profile_section_header *
456-
i40e_find_section_in_profile(u32 section_type,
457-
struct i40e_profile_segment *profile);
458455
int
459456
i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *i40e_seg,
460457
u32 track_id);
461458
int
462459
i40e_rollback_profile(struct i40e_hw *hw, struct i40e_profile_segment *i40e_seg,
463460
u32 track_id);
464-
int
465-
i40e_add_pinfo_to_list(struct i40e_hw *hw,
466-
struct i40e_profile_segment *profile,
467-
u8 *profile_info_sec, u32 track_id);
468-
469461
/* i40e_ddp */
470462
int i40e_ddp_flash(struct net_device *netdev, struct ethtool_flash *flash);
471463

0 commit comments

Comments
 (0)