xiaoxiang781216 commented on code in PR #20899:
URL: https://github.com/apache/nuttx/pull/20899#discussion_r4355076086
##########
drivers/rptun/rptun.c:
##########
@@ -1211,6 +1195,27 @@ static int rptun_panic_notifier(FAR struct
notifier_block *block,
int rptun_initialize(FAR struct rptun_dev_s *dev)
{
+ static const struct remoteproc_ops g_rptun_ops =
+ {
+ .init = rptun_init,
+ .remove = rptun_remove,
+ .config = rptun_config,
+ .start = rptun_start,
+ .stop = rptun_stop,
+ .notify = rptun_notify,
+ .get_mem = rptun_get_mem,
+ };
+
+ static const struct file_operations g_rptun_fops =
+ {
+ 0, /* open */
+ 0, /* close */
+ 0, /* read */
+ 0, /* write */
+ 0, /* seek */
+ rptun_dev_ioctl, /* ioctl */
+ };
+
Review Comment:
MISRA-C require the variable become static function variable if it's only
used in one function.
--
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]