mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
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 <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250908154426.3062861-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
492d816b17
commit
fd2b2429fb
@@ -42,12 +42,13 @@ static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Caller must hold the lock */
|
||||
static void _rcar_gen4_ptp_gettime(struct ptp_clock_info *ptp,
|
||||
struct timespec64 *ts)
|
||||
{
|
||||
struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
|
||||
|
||||
lockdep_assert_held(&ptp_priv->lock);
|
||||
|
||||
ts->tv_nsec = ioread32(ptp_priv->addr + PTPGPTPTM00_REG);
|
||||
ts->tv_sec = ioread32(ptp_priv->addr + PTPGPTPTM10_REG) |
|
||||
((s64)ioread32(ptp_priv->addr + PTPGPTPTM20_REG) << 32);
|
||||
|
||||
Reference in New Issue
Block a user