[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] xen netback: add fault injection facility
On Fri, Apr 20, 2018 at 10:47:31AM +0000, Stanislav Kinsburskii wrote: > > #include <linux/kthread.h> > #include <linux/if_vlan.h> > @@ -1649,6 +1650,7 @@ static int __init netback_init(void) > PTR_ERR(xen_netback_dbg_root)); > #endif /* CONFIG_DEBUG_FS */ > > + (void) xen_netbk_fi_init(); If you care about the return value, please propagate it to netback_init's caller. Otherwise you can just make the function return void. > + > +int xenvif_fi_init(struct xenvif *vif) > +{ > + struct dentry *parent; > + struct xenvif_fi *vfi; > + int fi, err = -ENOMEM; > + > + parent = vif_fi_dir; > + if (!parent) > + return -ENOMEM; > + > + vfi = kmalloc(sizeof(*vfi), GFP_KERNEL); > + if (!vfi) > + return -ENOMEM; > + > + vfi->dir = debugfs_create_dir(vif->dev->name, parent); > + if (!vfi->dir) > + goto err_dir; > + > + for (fi = 0; fi < XENVIF_FI_MAX; fi++) { > + vfi->faults[fi] = xen_fi_dir_add(vfi->dir, > + xenvif_fi_names[fi]); > + if (!vfi->faults[fi]) > + goto err_fault; > + } > + > + vif->fi_info = vfi; > + return 0; > + > +err_fault: > + for (; fi > 0; fi--) fi >= 0 Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |