Re: [PATCH 2.6.12-rc6] char: Add Dell Systems Management Base driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Doug Warzecha <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux