This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d0b79ced50029bcf59d7ef36c9a87bde88958962 Author: yangsong8 <[email protected]> AuthorDate: Fri Nov 13 20:37:43 2026 +0800 drivers/timers/ocu: fix the nxstyle errors Add the missing blank lines after the declarations in ocu_ioctl() and drop the unused EXTERN macro from ocu.h, which nxstyle rejects. Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: yangsong8 <[email protected]> --- drivers/timers/ocu.c | 7 +++++++ include/nuttx/timers/ocu.h | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/timers/ocu.c b/drivers/timers/ocu.c index fbaa88f0178..7672984386e 100644 --- a/drivers/timers/ocu.c +++ b/drivers/timers/ocu.c @@ -323,6 +323,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct ocu_status_s *status = (FAR struct ocu_status_s *)((uintptr_t)arg); + DEBUGASSERT(status != NULL); /* Let the lower-half fill in the hardware/config-specific fields @@ -357,6 +358,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case OCUIOC_GETCOUNTER: { FAR uint32_t *counter = (FAR uint32_t *)((uintptr_t)arg); + DEBUGASSERT(counter != NULL); ret = OCU_GETCOUNTER(lower, counter); } @@ -368,6 +370,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct ocu_abs_threshold_s *threshold = (FAR struct ocu_abs_threshold_s *)((uintptr_t)arg); + DEBUGASSERT(threshold != NULL); ret = OCU_SETABSTHRESHOLD(lower, threshold); } @@ -379,6 +382,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct ocu_rel_threshold_s *threshold = (FAR struct ocu_rel_threshold_s *)((uintptr_t)arg); + DEBUGASSERT(threshold != NULL); ret = OCU_SETRELTHRESHOLD(lower, threshold); } @@ -406,6 +410,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case OCUIOC_SETPINACTION: { enum ocu_pinaction_e action = (enum ocu_pinaction_e)arg; + ret = OCU_SETPINACTION(lower, action); } break; @@ -416,6 +421,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct ocu_advance_threshold_s *threshold = (FAR struct ocu_advance_threshold_s *)((uintptr_t)arg); + DEBUGASSERT(threshold != NULL); ret = OCU_SETADVANCETHRESHOLD(lower, threshold); } @@ -436,6 +442,7 @@ static int ocu_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct ocu_notify_s *notify = (FAR struct ocu_notify_s *)((uintptr_t)arg); + DEBUGASSERT(notify != NULL); if (notify->enable) diff --git a/include/nuttx/timers/ocu.h b/include/nuttx/timers/ocu.h index 04f99ee7abf..ca1af4a5be1 100644 --- a/include/nuttx/timers/ocu.h +++ b/include/nuttx/timers/ocu.h @@ -350,11 +350,8 @@ struct ocu_lowerhalf_s ****************************************************************************/ #ifdef __cplusplus -#define EXTERN extern "C" extern "C" { -#else -#define EXTERN extern #endif /**************************************************************************** @@ -385,7 +382,6 @@ extern "C" int ocu_register(FAR const char *devpath, FAR struct ocu_lowerhalf_s *lower); -#undef EXTERN #ifdef __cplusplus } #endif
