CV-Bowen commented on code in PR #20899:
URL: https://github.com/apache/nuttx/pull/20899#discussion_r4355369983
##########
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:
Thanks, agreed. Moving the tables into the function did not buy anything, so
I dropped that commit; g_rptun_ops, g_rptun_fops and g_rptun_mmops stay
file-scope statics as on master. The designated initializers in g_rptun_ops and
g_rptun_mmops predate this PR, so I left them alone to keep it to the cleanups
it describes; I can convert them in a follow-up if you prefer.
--
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]