From 911e736dab9ff17d740ddde2b091c7d5b1534e56 Mon Sep 17 00:00:00 2001 From: xiacong Date: Fri, 30 Dec 2022 12:02:50 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2007091c5=20from=20https://gitee.com/xia-?= =?UTF-8?q?bubai/kernel=5Fliteos=5Fm/pulls/983=20fix:=E4=BF=AE=E5=A4=8Dcod?= =?UTF-8?q?echeck=E5=91=8A=E8=AD=A6=201=E3=80=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E3=80=81=E7=A9=BA=E8=A1=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=91=8A=E8=AD=A6=EF=BC=9B=202=E3=80=81?= =?UTF-8?q?=E5=B0=86=E8=B6=85=E8=BF=8710=E8=A1=8C=E7=9A=84inline=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=8E=BB=E9=99=A4=E5=86=85=E8=81=94=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #I685E3 Signed-off-by: xiacong --- components/cpup/los_cpup.c | 2 +- components/fs/littlefs/lfs_adapter.c | 1 - components/fs/vfs/vfs_fs.c | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/cpup/los_cpup.c b/components/cpup/los_cpup.c index 4640bea2..0c3e2cf7 100644 --- a/components/cpup/los_cpup.c +++ b/components/cpup/los_cpup.c @@ -170,7 +170,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCpupInit() return LOS_OK; } -/* The calculation time unit is changed to us to decouple the influence of +/* The calculation time unit is changed to us to decouple the influence of * system frequency modulation on CPUP */ STATIC UINT64 CpupTimeUsGet(VOID) diff --git a/components/fs/littlefs/lfs_adapter.c b/components/fs/littlefs/lfs_adapter.c index f0d3a706..9f877e59 100644 --- a/components/fs/littlefs/lfs_adapter.c +++ b/components/fs/littlefs/lfs_adapter.c @@ -564,7 +564,6 @@ int LfsClose(struct File *file) } ret = lfs_file_close((lfs_t *)mp->mData, lfsHandle); - if (ret != 0) { errno = LittlefsErrno(ret); ret = (int)LOS_NOK; diff --git a/components/fs/vfs/vfs_fs.c b/components/fs/vfs/vfs_fs.c index 44c7fc9e..a94c18b4 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -211,7 +211,7 @@ static size_t GetCanonicalPath(const char *cwd, const char *path, char *buf, siz } #endif -static inline int VfsPathCheck(const char *path, bool isFile) +static int VfsPathCheck(const char *path, bool isFile) { size_t len; if ((path == NULL) || (path[0] == '\0')) { @@ -560,7 +560,7 @@ int open(const char *path, int flags, ...) #endif int ret = VfsOpen(path, flags); - return MapToPosixRet(ret); + return MapToPosixRet(ret); } FUNC_ALIAS(open, _open, (const char *path, int flags, ...), int); @@ -629,7 +629,7 @@ ssize_t read(int fd, void *buff, size_t bytes) ret = VfsRead(fd, buff, bytes); } - return MapToPosixRet(ret); + return MapToPosixRet(ret); } FUNC_ALIAS(read, _read, (int fd, void *buff, size_t bytes), ssize_t); @@ -1092,7 +1092,7 @@ int fcntl(int fd, int cmd, ...) va_start(ap, cmd); if (fd < CONFIG_NFILE_DESCRIPTORS) { filep = VfsAttachFileReady(fd); - ret = VfsVfcntl(filep, cmd, ap); + ret = VfsVfcntl(filep, cmd, ap); VfsDetachFile(filep); } else { #ifndef LOSCFG_NET_LWIP_SACK