Skip to content

Commit ab785cf

Browse files
committed
iommu/sun50i: Fix compile warnings
A few compile warnings show up when building this driver: CC drivers/iommu/sun50i-iommu.o drivers/iommu/sun50i-iommu.c: In function ‘sun50i_dte_get_page_table’: drivers/iommu/sun50i-iommu.c:486:16: warning: unused variable ‘flags’ [-Wunused-variable] 486 | unsigned long flags; | ^~~~~ drivers/iommu/sun50i-iommu.c: In function ‘sun50i_iommu_unmap’: drivers/iommu/sun50i-iommu.c:559:23: warning: unused variable ‘iommu’ [-Wunused-variable] 559 | struct sun50i_iommu *iommu = sun50i_domain->iommu; | ^~~~~ drivers/iommu/sun50i-iommu.c: In function ‘sun50i_iommu_probe_device’: drivers/iommu/sun50i-iommu.c:749:22: warning: unused variable ‘group’ [-Wunused-variable] 749 | struct iommu_group *group; | ^~~~~ Remove the unused variables. Signed-off-by: Joerg Roedel <[email protected]> Cc: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4100b8c commit ab785cf

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/iommu/sun50i-iommu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain *sun50i_domain,
483483
dma_addr_t iova, gfp_t gfp)
484484
{
485485
struct sun50i_iommu *iommu = sun50i_domain->iommu;
486-
unsigned long flags;
487486
u32 *page_table;
488487
u32 *dte_addr;
489488
u32 old_dte;
@@ -556,7 +555,6 @@ static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova
556555
size_t size, struct iommu_iotlb_gather *gather)
557556
{
558557
struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);
559-
struct sun50i_iommu *iommu = sun50i_domain->iommu;
560558
phys_addr_t pt_phys;
561559
dma_addr_t pte_dma;
562560
u32 *pte_addr;
@@ -746,7 +744,6 @@ static int sun50i_iommu_attach_device(struct iommu_domain *domain,
746744
static struct iommu_device *sun50i_iommu_probe_device(struct device *dev)
747745
{
748746
struct sun50i_iommu *iommu;
749-
struct iommu_group *group;
750747

751748
iommu = sun50i_iommu_from_dev(dev);
752749
if (!iommu)

0 commit comments

Comments
 (0)