From: "Kristian Høgsberg" <krh@redhat.com>
To: Dave Airlie <airlied@linux.ie>
Cc: Christoph Hellwig <hch@infradead.org>,
m.kozlowski@tuxland.pl, akpm@linux-foundation.org,
dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/23] drm: introduce drm_zalloc
Date: Thu, 30 Aug 2007 12:20:32 -0400 [thread overview]
Message-ID: <1188490832.7269.6.camel@hinata.boston.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0708282149180.15296@skynet.skynet.ie>
On Tue, 2007-08-28 at 21:50 +0100, Dave Airlie wrote:
> On Tue, 28 Aug 2007, Christoph Hellwig wrote:
>
> > On Mon, Aug 27, 2007 at 10:57:50PM +0200, m.kozlowski@tuxland.pl wrote:
> >> Hello,
> >>
> >> As there are many places in drm code where drm_alloc + memset is used
> >> this patch series introduces drm_zalloc and also makes use of drm_calloc where
> >> needed. Most of these patches save some bytes so the benefit is a few kB saved
> >> (gcc 4.1.2) with patch applied. Also some small (style, etc.) things are fixed.
> >> This patch series does the conversion drm tree-wide. All patches were compile
> >> tested.
> >
> > Please just convert it to plain kzalloc/kcalloc and kill these utterly useless
> > wrappers instead.
> >
> >
>
> The wrappers aren't useless the drm alloc/free passes in a memory space
> for debugging purposes so we can track memory abuse when developing,
Do we ever use that, though? Having to pass in the pointer, the size
and the area just to free memory, sure is a bitch.
> but drm_zalloc shouldjust alias to drm_calloc really..
drm_calloc calls kcalloc which performs an integer overflow check on the
'n' and 'size' arguments, which isn't needed for drm_zalloc. Small
detail, of course, but I don't see the problem with aliasing to kzalloc.
Kristian
next prev parent reply other threads:[~2007-08-30 16:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 20:57 m.kozlowski
2007-08-27 20:57 ` [PATCH 01/23] introduce drm_zalloc as a drm_alloc + memset replacement m.kozlowski
2007-08-27 21:36 ` Mariusz Kozlowski
2007-08-28 19:58 ` Ian Romanick
2007-08-27 20:57 ` [PATCH 02/23] drm_agpsupport.c: drm_alloc + memset to drm_zalloc m.kozlowski
2007-08-27 20:57 ` [PATCH 03/23] drm_auth.c: " m.kozlowski
2007-08-27 20:57 ` [PATCH 04/23] drm_bufs.c: drm_alloc + memset to drm_alloc m.kozlowski
2007-08-27 20:57 ` [PATCH 05/23] drm_dma.c: drm_alloc + memset to drm_zalloc m.kozlowski
2007-08-27 20:57 ` [PATCH 06/23] drm_drawable.c: drm_calloc " m.kozlowski
2007-08-27 20:57 ` [PATCH 07/23] drm_fops.c: drm_alloc + memset " m.kozlowski
2007-08-27 20:57 ` [PATCH 08/23] drm_irq.c: " m.kozlowski
2007-08-27 20:57 ` [PATCH 09/23] drm_scatter.c: drm_alloc + memset to drm_alloc m.kozlowski
2007-08-27 20:58 ` [PATCH 10/23] drm_sman.c: drm_calloc to drm_zalloc m.kozlowski
2007-08-27 20:58 ` [PATCH 11/23] drm_stub.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 12/23] i810_dma.c: drm_alloc + memset " m.kozlowski
2007-08-27 20:58 ` [PATCH 13/23] i830_dma.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 14/23] i915_dma.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 15/23] i915_irq.c: drm_calloc to drm_zalloc and bugfix m.kozlowski
2007-08-27 20:58 ` [PATCH 16/23] i915_mem.c: drm_alloc + memset to drm_zalloc m.kozlowski
2007-08-27 20:58 ` [PATCH 17/23] mga_dma.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 18/23] r128_cce.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 19/23] radeon_cp.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 20/23] radeon_mem.c: " m.kozlowski
2007-08-27 20:58 ` [PATCH 21/23] savage_bci.c: drm_alloc + memset to drm_zalloc and cleanup m.kozlowski
2007-08-27 20:58 ` [PATCH 22/23] sis_drv.c: drm_calloc to drm_zalloc m.kozlowski
2007-08-27 20:58 ` [PATCH 23/23] via_map.c: " m.kozlowski
2007-08-28 20:08 ` [PATCH 00/23] drm: introduce drm_zalloc Christoph Hellwig
2007-08-28 20:50 ` Dave Airlie
2007-08-30 16:20 ` Kristian Høgsberg [this message]
2007-08-30 16:24 ` Christoph Hellwig
2007-08-30 23:20 ` Dave Airlie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1188490832.7269.6.camel@hinata.boston.redhat.com \
--to=krh@redhat.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.sourceforge.net \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.kozlowski@tuxland.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome