On Thu,  2 Jul 2015 18:12:13 +0800
Dex Chen <dex.chen at ruckuswireless.com> wrote:

> +static __net_exit void kni_exit_net(struct net *net)
> +{
> +     /*
> +      * Nothing to do here.
> +      * Assuming all cleanup jobs were done in kni_release().
> +      */
> +}

I don't think you need an exit stub. Looks like kernel does
the right thing if it is just NULL.

Since this is kernel code, it should pass the kernel checkpatch.

$ checkpatch.pl /tmp/kni-netns.patch WARNING: Use of volatile is usually wrong: 
see Documentation/volatile-considered-harmful.txt
#84: FILE: lib/librte_eal/linuxapp/kni/kni_misc.c:99:
+       volatile unsigned long device_in_use; /* device in use flag */

WARNING: line over 80 characters
#166: FILE: lib/librte_eal/linuxapp/kni/kni_misc.c:196:
+       /* kni device can be opened by one user only per netns, test and set 
bit */

WARNING: line over 80 characters
#256: FILE: lib/librte_eal/linuxapp/kni/kni_misc.c:353:
+kni_ioctl_create(struct net *net, unsigned int ioctl_num, unsigned long 
ioctl_param)

WARNING: line over 80 characters
#319: FILE: lib/librte_eal/linuxapp/kni/kni_misc.c:544:
+kni_ioctl_release(struct net *net, unsigned int ioctl_num, unsigned long 
ioctl_param)

total: 0 errors, 4 warnings, 285 lines checked

/tmp/kni-netns.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Reply via email to