We receive the sampling period from the setup struct attached to the AUTOTUNE_RTIOC_{IRQ,KERN,USER} requests, drop the last copy from user from autotune_ioctl_nrt() which is spurious.
Signed-off-by: Philippe Gerum <r...@xenomai.org> --- kernel/drivers/autotune/autotune.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/drivers/autotune/autotune.c b/kernel/drivers/autotune/autotune.c index 46a34bf36..2629bf9d4 100644 --- a/kernel/drivers/autotune/autotune.c +++ b/kernel/drivers/autotune/autotune.c @@ -644,7 +644,7 @@ static int autotune_ioctl_nrt(struct rtdm_fd *fd, unsigned int request, void *ar struct autotune_context *context; struct autotune_setup setup; struct gravity_tuner *tuner; - int period, ret; + int ret; if (request == AUTOTUNE_RTIOC_RESET) { xnclock_reset_gravity(&nkclock); @@ -678,10 +678,6 @@ static int autotune_ioctl_nrt(struct rtdm_fd *fd, unsigned int request, void *ar return -EINVAL; } - ret = rtdm_safe_copy_from_user(fd, &period, arg, sizeof(period)); - if (ret) - return ret; - ret = tuner->init_tuner(tuner); if (ret) return ret; -- 2.17.2