mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00:00
ice: remove unnecessary NULL checks before ptp_read_system_*
The ptp_read_system_prets and ptp_read_system_postts functions already check for the NULL value of the ptp_system_timestamp structure pointer. There is no need to check this manually in the ice driver code. Remove the checks. Reported-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
b13ad3e08d
commit
1e00113413
1 changed files with 4 additions and 8 deletions
|
@ -219,13 +219,11 @@ ice_ptp_read_src_clk_reg(struct ice_pf *pf, struct ptp_system_timestamp *sts)
|
||||||
|
|
||||||
tmr_idx = ice_get_ptp_src_clock_index(hw);
|
tmr_idx = ice_get_ptp_src_clock_index(hw);
|
||||||
/* Read the system timestamp pre PHC read */
|
/* Read the system timestamp pre PHC read */
|
||||||
if (sts)
|
|
||||||
ptp_read_system_prets(sts);
|
ptp_read_system_prets(sts);
|
||||||
|
|
||||||
lo = rd32(hw, GLTSYN_TIME_L(tmr_idx));
|
lo = rd32(hw, GLTSYN_TIME_L(tmr_idx));
|
||||||
|
|
||||||
/* Read the system timestamp post PHC read */
|
/* Read the system timestamp post PHC read */
|
||||||
if (sts)
|
|
||||||
ptp_read_system_postts(sts);
|
ptp_read_system_postts(sts);
|
||||||
|
|
||||||
hi = rd32(hw, GLTSYN_TIME_H(tmr_idx));
|
hi = rd32(hw, GLTSYN_TIME_H(tmr_idx));
|
||||||
|
@ -235,10 +233,8 @@ ice_ptp_read_src_clk_reg(struct ice_pf *pf, struct ptp_system_timestamp *sts)
|
||||||
/* if TIME_L rolled over read TIME_L again and update
|
/* if TIME_L rolled over read TIME_L again and update
|
||||||
* system timestamps
|
* system timestamps
|
||||||
*/
|
*/
|
||||||
if (sts)
|
|
||||||
ptp_read_system_prets(sts);
|
ptp_read_system_prets(sts);
|
||||||
lo = rd32(hw, GLTSYN_TIME_L(tmr_idx));
|
lo = rd32(hw, GLTSYN_TIME_L(tmr_idx));
|
||||||
if (sts)
|
|
||||||
ptp_read_system_postts(sts);
|
ptp_read_system_postts(sts);
|
||||||
hi = rd32(hw, GLTSYN_TIME_H(tmr_idx));
|
hi = rd32(hw, GLTSYN_TIME_H(tmr_idx));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue