From e573f83993e09918046dd4c05a05021eff4daa5e Mon Sep 17 00:00:00 2001 From: zhang Date: Wed, 23 Mar 2022 15:37:53 +0800 Subject: [PATCH] fix: modify the review problem of osal Signed-off-by: zhang --- osal/include/osal_uaccess.h | 4 ++-- osal/src/osal_timer.c | 2 +- osal/src/osal_workqueue.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osal/include/osal_uaccess.h b/osal/include/osal_uaccess.h index 4789295..01023c2 100644 --- a/osal/include/osal_uaccess.h +++ b/osal/include/osal_uaccess.h @@ -26,12 +26,12 @@ extern "C" { #endif /* __cplusplus */ -static inline size_t CopyToUser (void __user *to, const void *from, size_t len) +static inline size_t CopyToUser(void __user *to, const void *from, size_t len) { return (size_t)copy_to_user(to, from, (unsigned long)len); } -static inline size_t CopyFromUser (void *to, const void __user *from, size_t len) +static inline size_t CopyFromUser(void *to, const void __user *from, size_t len) { return (size_t)copy_from_user(to, from, (unsigned long)len); } diff --git a/osal/src/osal_timer.c b/osal/src/osal_timer.c index 5d76bbb..1b926f3 100644 --- a/osal/src/osal_timer.c +++ b/osal/src/osal_timer.c @@ -33,7 +33,7 @@ typedef enum { } OsalTimerMode; struct osal_ktimer { - unsigned long arg; + uintptr_t arg; struct timer_list timer; OsalTimerFunc func; uint32_t msec; diff --git a/osal/src/osal_workqueue.c b/osal/src/osal_workqueue.c index c663b0c..102fdf2 100644 --- a/osal/src/osal_workqueue.c +++ b/osal/src/osal_workqueue.c @@ -166,7 +166,7 @@ bool HdfAddWork(HdfWorkQueue *queue, HdfWork *work) } EXPORT_SYMBOL(HdfAddWork); -bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, unsigned long ms) +bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, uint32_t ms) { if (queue == NULL || queue->realWorkQueue == NULL || work == NULL || work->realWork == NULL) { HDF_LOGE("%s invalid para", __func__); @@ -174,7 +174,7 @@ bool HdfAddDelayedWork(HdfWorkQueue *queue, HdfWork *work, unsigned long ms) } return queue_delayed_work(queue->realWorkQueue, &((struct WorkWrapper *)work->realWork)->work, - msecs_to_jiffies(ms)); + msecs_to_jiffies((unsigned long)ms)); } EXPORT_SYMBOL(HdfAddDelayedWork); -- Gitee