Re: [PATCH2 02/22] staging: brcm80211: Remove abstraction of pci_(alloc/free)_consistent

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

 



On 03/01/2011 11:45 AM, Jiri Slaby wrote:
> On 02/25/2011 04:39 PM, Arend van Spriel wrote:
>> --- a/drivers/staging/brcm80211/util/hnddma.c
>> +++ b/drivers/staging/brcm80211/util/hnddma.c
>> @@ -32,6 +32,10 @@
>>  #include <asm/addrspace.h>
>>  #endif
>>  
>> +#ifdef BRCM_FULLMAC
>> +#error "hnddma.c shouldn't be needed for FULLMAC"
>> +#endif
>> +
>>  /* debug/trace */
>>  #ifdef BCMDBG
>>  #define	DMA_ERROR(args) \
>> @@ -527,6 +531,18 @@ static bool _dma_alloc(dma_info_t *di, uint direction)
>>  	return dma64_alloc(di, direction);
>>  }
>>  
>> +void *dma_alloc_consistent(struct osl_info *osh, uint size, u16 align_bits,
> 
> Gak. This is too global to be named that way. And if it wasn't global,
> the name will be too generic still.
> 
>> +			       uint *alloced, unsigned long *pap)
>> +{
>> +	if (align_bits) {
>> +		u16 align = (1 << align_bits);
>> +		if (!IS_ALIGNED(PAGE_SIZE, align))
>> +			size += align;
>> +		*alloced = size;
>> +	}
>> +	return pci_alloc_consistent(osh->pdev, size, (dma_addr_t *) pap);
> 
> You should use dma_alloc_consistent instead anyway.

*_coherent, I meant indeed.

regards,
-- 
js
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux