Skip to content

Commit fd2b242

Browse files
Niklas Söderlundkuba-moo
authored andcommitted
net: ethernet: renesas: rcar_gen4_ptp: Use lockdep to verify internal usage
Instead of a having a comment that the lock must be held when calling the internal helper add a lockdep check to enforce it. Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 492d816 commit fd2b242

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/renesas/rcar_gen4_ptp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
4242
return 0;
4343
}
4444

45-
/* Caller must hold the lock */
4645
static void _rcar_gen4_ptp_gettime(struct ptp_clock_info *ptp,
4746
struct timespec64 *ts)
4847
{
4948
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
5049

50+
lockdep_assert_held(&ptp_priv->lock);
51+
5152
ts->tv_nsec = ioread32(ptp_priv->addr + PTPGPTPTM00_REG);
5253
ts->tv_sec = ioread32(ptp_priv->addr + PTPGPTPTM10_REG) |
5354
((s64)ioread32(ptp_priv->addr + PTPGPTPTM20_REG) << 32);

0 commit comments

Comments
 (0)