JianyuWang0623 commented on code in PR #18261:
URL: https://github.com/apache/nuttx/pull/18261#discussion_r2741433369
##########
drivers/sensors/gnss_uorb.c:
##########
@@ -264,6 +266,7 @@ static int gnss_open(FAR struct file *filep)
if (upper->crefs == 0)
{
ret = upper->lower->ops->activate(upper->lower, filep, true);
+ sminfo(filep->f_inode->i_name, "open ret %d", ret);
Review Comment:
> [@JianyuWang0623](https://github.com/JianyuWang0623) I think it is better
to move it to inside "if (ret < 0)" and use smwarn(). Normally you don't need
to know the return, only if it failed
@acassis The sminfo log level is adopted because the device open status
needs to be detected in certain scenarios. For example, uORB topic subscription
and /dev/ttyGNSSx device opening are independent of each other at the file
level, and the GNSS driver follows this logic: initialize the driver when there
is a subscription or tty device opening operation, and release it only after
all subscriptions are cancelled and the tty device is closed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]