From 90f560a4ab34f90fc3ee86f51c5c04151dd17c59 Mon Sep 17 00:00:00 2001 From: GongHui Date: Mon, 15 Mar 2021 20:31:11 +0800 Subject: [PATCH 1/4] modify readme for framework --- README.md | 10 +++++----- README_zh.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b18541f38..10fabc614 100644 --- a/README.md +++ b/README.md @@ -152,13 +152,13 @@ For details, see [WLAN Overview](en-us_topic_0000001051643558.md). ## Repositories Involved -Driver subsystem +[Driver subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/driver-subsystem.md) -hmf/drivers/framework +drivers\_framework -hmf/drivers/adapter\_uhdf +[drivers\_adapter\_uhdf](https://gitee.com/openharmony/drivers_adapter_uhdf/blob/master/README.md) -hmf/drivers/adapter\_khdf\_linux +[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_uhdf/blob/master/README.md) -hmf/drivers/adapter\_khdf\_liteos +[drivers\_adapter\_khdf\_liteos](https://gitee.com/openharmony/drivers_adapter_uhdf/blob/master/README.md) diff --git a/README_zh.md b/README_zh.md index 901f5ecac..e9d3ef0df 100644 --- a/README_zh.md +++ b/README_zh.md @@ -152,15 +152,15 @@ HDF驱动框架详细开发请参考[驱动开发指南](zh-cn_topic_00000010516 ## 相关仓 -驱动子系统 +[驱动子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E9%A9%B1%E5%8A%A8%E5%AD%90%E7%B3%BB%E7%BB%9F.md) -hmf/drivers/framework +drivers\_framework -hmf/drivers/adapter\_uhdf +[drivers\_adapter\_uhdf](https://gitee.com/openharmony/drivers_adapter_uhdf/blob/master/README_zh.md) -hmf/drivers/adapter\_khdf\_linux +[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_khdf_linux/blob/master/README_zh.md) -hmf/drivers/adapter\_khdf\_liteos +[drivers\_adapter\_khdf\_liteos](https://gitee.com/openharmony/drivers_adapter_khdf_liteos/blob/master/README_zh.md) -- Gitee From f2abf9a48a2b7df39352159e710922e2b8e10f1b Mon Sep 17 00:00:00 2001 From: GongHui Date: Tue, 16 Mar 2021 10:55:15 +0800 Subject: [PATCH 2/4] modify readme style --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10fabc614..76110789e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This repository stores the core source code information of the OpenHarmony drive │ ├── display # Display framework module │ ├── input # Input framework module │ ├── network # WLAN framework module -│ └── sensor # Sensor driver module +│ └── sensor # Sensor driver module ├── support # Basic capabilities │ └── platform # Platform driver framework and APIs, including GPIO, I2C, and SPI ├── tools # Source code related to the tools of the HDF -- Gitee From 1860eed912c433e20bda443dbeb9c9f5e7a1c5ec Mon Sep 17 00:00:00 2001 From: GongHui Date: Thu, 18 Mar 2021 11:34:16 +0800 Subject: [PATCH 3/4] fix code style --- core/common/src/devmgr_service_start.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/common/src/devmgr_service_start.c b/core/common/src/devmgr_service_start.c index a1c782002..143e05cc5 100644 --- a/core/common/src/devmgr_service_start.c +++ b/core/common/src/devmgr_service_start.c @@ -27,7 +27,7 @@ static void GetDeviceServiceNameByClass(DeviceClass deviceClass, struct HdfSBuf struct HdfDeviceInfo *deviceInfo = NULL; struct DevHostServiceClnt *hostClnt = NULL; struct DevmgrService *devMgrSvc = (struct DevmgrService *)DevmgrServiceGetInstance(); - if (devMgrSvc == NULL) { + if (devMgrSvc == NULL || reply == NULL) { return; } @@ -53,7 +53,6 @@ static void GetDeviceServiceNameByClass(DeviceClass deviceClass, struct HdfSBuf int DeviceManagerDispatch(struct HdfObject *stub, int code, struct HdfSBuf *data, struct HdfSBuf *reply) { - (void)reply; int ret = HDF_FAILURE; int32_t deviceClass = 0; const char *svcName = NULL; -- Gitee From 3ffbe23826d5e0edc4338be3edba43da60b38ebd Mon Sep 17 00:00:00 2001 From: GongHui Date: Thu, 18 Mar 2021 16:42:24 +0800 Subject: [PATCH 4/4] delete {public} property of osal_time module --- support/posix/src/osal_time.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/support/posix/src/osal_time.c b/support/posix/src/osal_time.c index ad0429d4a..12bec4d58 100644 --- a/support/posix/src/osal_time.c +++ b/support/posix/src/osal_time.c @@ -21,13 +21,13 @@ int32_t OsalGetTime(OsalTimespec *time) struct timeval tv; if (time == NULL) { - HDF_LOGE("%{public}s invalid para", __func__); + HDF_LOGE("%s invalid para", __func__); return HDF_ERR_INVALID_PARAM; } (void)memset_s(&tv, sizeof(tv), 0, sizeof(tv)); if (gettimeofday(&tv, NULL) != 0) { - HDF_LOGE("%{public}s gettimeofday failed", __func__); + HDF_LOGE("%s gettimeofday failed", __func__); return HDF_FAILURE; } time->sec = tv.tv_sec; @@ -41,12 +41,12 @@ int32_t OsalDiffTime(const OsalTimespec *start, const OsalTimespec *end, OsalTim uint32_t usec = 0; uint32_t sec = 0; if (start == NULL || end == NULL || diff == NULL) { - HDF_LOGE("%{public}s invalid para", __func__); + HDF_LOGE("%s invalid para", __func__); return HDF_ERR_INVALID_PARAM; } if (start->sec > end->sec) { - HDF_LOGE("%{public}s start time later then end time", __func__); + HDF_LOGE("%s start time later then end time", __func__); return HDF_ERR_INVALID_PARAM; } @@ -74,7 +74,7 @@ void OsalMSleep(uint32_t ms) ts.tv_nsec = HDF_KILO_UNIT * HDF_KILO_UNIT * ((long)(ms % HDF_KILO_UNIT)); result = nanosleep(&ts, &ts); if (result != 0) { - HDF_LOGE("%{public}s OsalMSleep failed %{public}d", __func__, errno); + HDF_LOGE("%s OsalMSleep failed %d", __func__, errno); } } @@ -94,7 +94,7 @@ uint64_t OsalGetSysTimeMs() (void)memset_s(&tv, sizeof(tv), 0, sizeof(tv)); if (gettimeofday(&tv, NULL) != 0) { - HDF_LOGE("%{public}s gettimeofday failed", __func__); + HDF_LOGE("%s gettimeofday failed", __func__); return 0; } -- Gitee