Skip to content

Commit f2c3839

Browse files
Stephen Hemmingerdavem330
authored andcommitted
[NET]: skb_get/set_timestamp use const
The new timestamp get/set routines should have const attribute on parameters (helps to indicate direction). Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 513c250 commit f2c3839

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/skbuff.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ extern void skb_add_mtu(int mtu);
12511251
* This function converts the offset back to a struct timeval and stores
12521252
* it in stamp.
12531253
*/
1254-
static inline void skb_get_timestamp(struct sk_buff *skb, struct timeval *stamp)
1254+
static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp)
12551255
{
12561256
stamp->tv_sec = skb->tstamp.off_sec;
12571257
stamp->tv_usec = skb->tstamp.off_usec;
@@ -1270,7 +1270,7 @@ static inline void skb_get_timestamp(struct sk_buff *skb, struct timeval *stamp)
12701270
* This function converts a struct timeval to an offset and stores
12711271
* it in the skb.
12721272
*/
1273-
static inline void skb_set_timestamp(struct sk_buff *skb, struct timeval *stamp)
1273+
static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp)
12741274
{
12751275
skb->tstamp.off_sec = stamp->tv_sec - skb_tv_base.tv_sec;
12761276
skb->tstamp.off_usec = stamp->tv_usec - skb_tv_base.tv_usec;

0 commit comments

Comments
 (0)