lkml.org 
[lkml]   [2005]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.12-rc6] char: Add Dell Systems Management Base driver
From
Date
Doug Warzecha <Douglas_Warzecha@dell.com> writes:

> +static void *tvm_alloc_suitable(unsigned long size, unsigned long phys_max)
> +{
> + void *ptr;
> + unsigned int flags = GFP_KERNEL;
> +
> + while ((ptr = kmalloc(size, flags)) != NULL) {
> + if ((virt_to_phys(ptr) + size - 1) <= phys_max)
> + break;
> +
> + kfree(ptr);
> + ptr = NULL;
> +
> + if (flags & GFP_DMA)
> + break;
> + flags |= GFP_DMA;
> + }
> + return ptr;

Umm - what's that?

Please drop that immediately. 2.6.13 will hopefully have GFP_DMA32
on x86-64 that will make it fully obsolete.

And even before that you can use pci_alloc_consistent() - that
will do the right now and later.

... haven't read on.

But there seems to be a use of register_ioctl32_conversion. That
needs to be replaced with ->compat_ioctl, since the former
will soon go.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-16 20:06    [W:0.125 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site