Re: [PATCH 1/1] aacraid: pci_alloc_consistent() failures on ARM64

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

 



On Tue, Apr 04, 2017 at 12:23:19PM +0530, Mahesh Rajashekhara wrote:
> +#if defined(CONFIG_ARM64)
> +static inline void *
> +aac_pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
> +		     dma_addr_t *dma_handle) {
> +	return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev,
> +				  size,
> +				  dma_handle,
> +				  GFP_KERNEL);
> +}
> +#else
> +static inline void *
> +aac_pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
> +		     dma_addr_t *dma_handle) {
> +	return pci_alloc_consistent(hwdev, size, dma_handle);
> +}
> +#endif

Please just call the dma_*_coherent routines directly all the time.
hwdev should never be NULL, so that workaround can be dropped as well.

And while you're at it please remove all the casts to and from
void * in the arguments and return values.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux