Re: [PATCH v2.1 1/7] crypto: GnuPG based MPI lib - source files (part 1)
From Kernel Docbook Similar to functionEXPORT_SYMBOL()/function except that the symbols exported by functionEXPORT_SYMBOL_GPL()/function can only be seen by modules with a functionMODULE_LICENSE()/function that specifies a GPL compatible license. It implies that the function is considered an internal implementation issue, and not really an interface. not really an interface Should it really be EXPORT_SYMBOL_GPL? - Dmitry On Sat, Oct 15, 2011 at 3:28 AM, James Morris jmor...@namei.org wrote: On Fri, 14 Oct 2011, Dmitry Kasatkin wrote: +MPI mpi_alloc(unsigned nlimbs) +{ + MPI a; + + a = (MPI) kmalloc(sizeof *a, GFP_KERNEL); Generally, typedef structs are frowned upon in the kernel. I'd prefer to see this (and any others) changed to a normal type. Also, kmalloc return values do not need to be cast, they're void *. +EXPORT_SYMBOL(mpi_alloc); New interfaces should be EXPORT_SYMBOL_GPL. -- James Morris jmor...@namei.org -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2.1 1/7] crypto: GnuPG based MPI lib - source files (part 1)
On Mon, Oct 17, 2011 at 12:11 PM, Kasatkin, Dmitry dmitry.kasat...@intel.com wrote: From Kernel Docbook Similar to functionEXPORT_SYMBOL()/function except that the symbols exported by functionEXPORT_SYMBOL_GPL()/function can only be seen by modules with a functionMODULE_LICENSE()/function that specifies a GPL compatible license. It implies that the function is considered an internal implementation issue, and not really an interface. not really an interface Should it really be EXPORT_SYMBOL_GPL? - Dmitry On Sat, Oct 15, 2011 at 3:28 AM, James Morris jmor...@namei.org wrote: On Fri, 14 Oct 2011, Dmitry Kasatkin wrote: +MPI mpi_alloc(unsigned nlimbs) +{ + MPI a; + + a = (MPI) kmalloc(sizeof *a, GFP_KERNEL); Generally, typedef structs are frowned upon in the kernel. I'd prefer to see this (and any others) changed to a normal type. Also, kmalloc return values do not need to be cast, they're void *. +EXPORT_SYMBOL(mpi_alloc); New interfaces should be EXPORT_SYMBOL_GPL. -- James Morris jmor...@namei.org Hello James, Also please let me know about other things so that I could fix them as well... Thanks! - Dmitry -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2.1 1/7] crypto: GnuPG based MPI lib - source files (part 1)
James Morris jmor...@namei.org wrote: +MPI mpi_alloc(unsigned nlimbs) +{ + MPI a; + + a = (MPI) kmalloc(sizeof *a, GFP_KERNEL); Generally, typedef structs are frowned upon in the kernel. I'd prefer to see this (and any others) changed to a normal type. In this case, however, it makes it easier to compare back to the original code. David -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2.1 1/7] crypto: GnuPG based MPI lib - source files (part 1)
On Mon, Oct 17, 2011 at 12:11:37PM +0300, Kasatkin, Dmitry wrote: From Kernel Docbook Similar to functionEXPORT_SYMBOL()/function except that the symbols exported by functionEXPORT_SYMBOL_GPL()/function can only be seen by modules with a functionMODULE_LICENSE()/function that specifies a GPL compatible license. It implies that the function is considered an internal implementation issue, and not really an interface. not really an interface Should it really be EXPORT_SYMBOL_GPL? Yes. -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html