From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262935AbVHEJiI (ORCPT ); Fri, 5 Aug 2005 05:38:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262936AbVHEJiI (ORCPT ); Fri, 5 Aug 2005 05:38:08 -0400 Received: from scrub.xs4all.nl ([194.109.195.176]:16029 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S262935AbVHEJhm (ORCPT ); Fri, 5 Aug 2005 05:37:42 -0400 Date: Fri, 5 Aug 2005 11:37:25 +0200 (CEST) From: Roman Zippel X-X-Sender: roman@scrub.home To: Andrew Morton cc: Pekka J Enberg , linux-kernel@vger.kernel.org, pmarques@grupopie.com Subject: Re: [PATCH] kernel: use kcalloc instead kmalloc/memset In-Reply-To: <20050804233634.1406e92a.akpm@osdl.org> Message-ID: References: <1123219747.20398.1.camel@localhost> <20050804223842.2b3abeee.akpm@osdl.org> <20050804233634.1406e92a.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, 4 Aug 2005, Andrew Morton wrote: > > +static inline void *kzalloc(size_t size, unsigned int __nocast flags) > > +{ > > + return kcalloc(1, size, flags); > > +} > > + > > That'll generate just as much code as simply using kcalloc(1, ...). This > function should be out-of-line and EXPORT_SYMBOL()ed. And kcalloc() can > call it too.. BTW we already have 420 "kcalloc(1, ...)" user and 41 without the 1 argument, most of them are in sound, which introduced it in first place. Can we please deprecate that function before it spreads any further? bye, Roman