anchao commented on PR #15959: URL: https://github.com/apache/nuttx/pull/15959#issuecomment-2712269476
> @anchao please update the log message to include: why this feature is needed and its advantages @acassis new API is not compatible with the old structure. The following is a comparison before and after the PR change: 1. feature in #15937 ``` struct wdog_period_s wdog; ret = wd_start(&wdog, ...); <-- failure, compiler warning ret = wd_start_period(&wdog, ...); ``` ``` struct wdog_s wdog; ret = wd_start(&wdog, ...); ret = wd_start_period(&wdog, ...); <-- failure, compiler warning and access out of bounds ``` 2. after this PR, we merge **struct wdog_period_s** to **struct wdog_s**, so that developers do not need to pay special attention to whether to use **wdog_period_s** or **wdog_s**, **But the cost is that all** **wdog_s** **need to add 8-16(64bits system or time64)bytes** ``` struct wdog_s wdog; ret = wd_start(&wdog, ...); <-- success ret = wd_start_period(&wdog, ...); <-- success ``` Here is a decision for yours. If prefer proposal 1, I will close this PR. otherwise please approve this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org