Re: [PATCH v2 3/3] iommu: dart: Add DART iommu driver

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

 



Hi,


On Sun, Mar 28, 2021, at 11:34, kernel test robot wrote:
> 
> All error/warnings (new ones prefixed by >>):
> 
>    drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_finalize_domain':
> >> drivers/iommu/apple-dart-iommu.c:427:34: error: implicit declaration of function 'DMA_BIT_MASK'; did you mean 'BIT_MASK'? [-Werror=implicit-function-declaration]
>      427 |  domain->geometry.aperture_end = DMA_BIT_MASK(32);
>          |                                  ^~~~~~~~~~~~
>          |                                  BIT_MASK


Fixed by adding the missing <linux/dma-mapping.h> include for DMA_BIT_MASK.

>    drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_attach_stream':
> >> drivers/iommu/apple-dart-iommu.c:456:11: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
>      456 |  stream = kzalloc(sizeof(*stream), GFP_KERNEL);
>          |           ^~~~~~~
>          |           kvzalloc
> >> drivers/iommu/apple-dart-iommu.c:456:9: warning: assignment to 'struct apple_dart_stream *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>      456 |  stream = kzalloc(sizeof(*stream), GFP_KERNEL);
>          |         ^
>    drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_detach_stream':
> >> drivers/iommu/apple-dart-iommu.c:523:5: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
>      523 |     kfree(stream);
>          |     ^~~~~
>          |     kvfree
>    drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_domain_alloc':
> >> drivers/iommu/apple-dart-iommu.c:627:14: warning: assignment to 'struct apple_dart_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>      627 |  dart_domain = kzalloc(sizeof(*dart_domain), GFP_KERNEL);
>          |              ^
>    drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_of_xlate':
> >> drivers/iommu/apple-dart-iommu.c:659:7: warning: assignment to 'struct apple_dart_master_cfg *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>      659 |   cfg = kzalloc(struct_size(cfg, streams, 1), GFP_KERNEL);
>          |       ^
> >> drivers/iommu/apple-dart-iommu.c:663:13: error: implicit declaration 
> of function 'krealloc'; did you mean 'kvcalloc'? 
> [-Werror=implicit-function-declaration]
>      663 |   cfg_new = krealloc(
>          |             ^~~~~~~~
>          |             kvcalloc
>    drivers/iommu/apple-dart-iommu.c:663:11: warning: assignment to 
> 'struct apple_dart_master_cfg *' from 'int' makes pointer from integer 
> without a cast [-Wint-conversion]
>      663 |   cfg_new = krealloc(
>          |           ^
>    cc1: some warnings being treated as errors
> 
> 

Fixed by adding the missing <linux/slab.h> include for krealloc, kfree and kzalloc.


Thanks,

Sven



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux