From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755220Ab1JOA21 (ORCPT ); Fri, 14 Oct 2011 20:28:27 -0400 Received: from tundra.namei.org ([65.99.196.166]:51730 "EHLO tundra.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504Ab1JOA20 (ORCPT ); Fri, 14 Oct 2011 20:28:26 -0400 Date: Sat, 15 Oct 2011 11:28:15 +1100 (EST) From: James Morris To: Dmitry Kasatkin cc: linux-security-module@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.vnet.ibm.com, dhowells@redhat.com, herbert@gondor.hengli.com.au Subject: Re: [PATCH v2.1 1/7] crypto: GnuPG based MPI lib - source files (part 1) In-Reply-To: <92d93a9fe52e048a21d19732c31d80c9ec44de77.1318598705.git.dmitry.kasatkin@intel.com> Message-ID: References: <92d93a9fe52e048a21d19732c31d80c9ec44de77.1318598705.git.dmitry.kasatkin@intel.com> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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