linguini1 commented on code in PR #17283:
URL: https://github.com/apache/nuttx/pull/17283#discussion_r2495044072
##########
drivers/can/can.c:
##########
@@ -964,6 +965,22 @@ static int can_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
}
break;
+ /* Set read watermark */
+
+ case CANIOC_SET_IWATERMARK:
+ {
+ reader->rxwatermark = *(FAR size_t *)arg;
Review Comment:
Where does this struct member get initialized? i.e what is its initial value?
I wonder if there's a chance that drivers depend on the old behaviour you
mentioned, where a single `read()` reads multiple frames at once (I assume that
was just limited by the user buffer size). What if the old code assuming no
limit is now returned too few frames? Perhaps there should be a value that
indicates no limit, i.e. 0?
--
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]