aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/dev.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-25 09:11:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-25 09:11:19 +0200
commitc2312ff575fcaed96889d5bb5392afcc604c9442 (patch)
tree475d63360ee17732fac41c7c1e4a1636ed92e7cb /drivers/net/netdevsim/dev.c
parentMerge tag 'iio-for-5.8c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic... (diff)
parentLinux 5.7-rc7 (diff)
downloadlinux-c2312ff575fcaed96889d5bb5392afcc604c9442.tar.gz
linux-c2312ff575fcaed96889d5bb5392afcc604c9442.zip
Merge 5.7-rc7 into staging-next
We need the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/netdevsim/dev.c')
-rw-r--r--drivers/net/netdevsim/dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index 68668a22b9dd..dc3ff0e20944 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -858,8 +858,7 @@ nsim_dev_devlink_trap_policer_counter_get(struct devlink *devlink,
return -EINVAL;
cnt = &nsim_dev->trap_data->trap_policers_cnt_arr[policer->id - 1];
- *p_drops = *cnt;
- *cnt += jiffies % 64;
+ *p_drops = (*cnt)++;
return 0;
}