!282 fix: modify the review problem of osal

Merge pull request !282 from Zhang/master
This commit is contained in:
openharmony_ci
2022-03-24 06:58:33 +00:00
committed by Gitee
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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);