* [PATCH -next 0/3] iommu/arm-smmu-v3: clean up some code style issues
@ 2021-05-20 8:42 Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 1/3] iommu/arm-smmu-v3: fix missing a blank line after declarations Bixuan Cui
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-20 8:42 UTC (permalink / raw)
To: will, robin.murphy
Cc: joro, jean-philippe, Jonathan.Cameron, cuibixuan,
linux-arm-kernel, iommu, linux-kernel
Clean up some code style issues.
Bixuan Cui (3):
iommu/arm-smmu-v3: fix missing a blank line after declarations
iommu/arm-smmu-v3: Change *array into *const array
iommu/arm-smmu-v3: Prefer unsigned int to bare use of unsigned
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH -next 1/3] iommu/arm-smmu-v3: fix missing a blank line after declarations
2021-05-20 8:42 [PATCH -next 0/3] iommu/arm-smmu-v3: clean up some code style issues Bixuan Cui
@ 2021-05-20 8:42 ` Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 2/3] iommu/arm-smmu-v3: Change *array into *const array Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 3/3] iommu/arm-smmu-v3: Prefer unsigned int to bare use of unsigned Bixuan Cui
2 siblings, 0 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-20 8:42 UTC (permalink / raw)
To: will, robin.murphy
Cc: joro, jean-philippe, Jonathan.Cameron, cuibixuan,
linux-arm-kernel, iommu, linux-kernel
Fixes checkpatch warnings in arm-smmu-v3.c:
WARNING: Missing a blank line after declarations
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 54b2f27b81d4..4f184119c26d 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -151,6 +151,7 @@ static void queue_sync_cons_out(struct arm_smmu_queue *q)
static void queue_inc_cons(struct arm_smmu_ll_queue *q)
{
u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1;
+
q->cons = Q_OVF(q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons);
}
@@ -176,6 +177,7 @@ static int queue_sync_prod_in(struct arm_smmu_queue *q)
static u32 queue_inc_prod_n(struct arm_smmu_ll_queue *q, int n)
{
u32 prod = (Q_WRP(q, q->prod) | Q_IDX(q, q->prod)) + n;
+
return Q_OVF(q->prod) | Q_WRP(q, prod) | Q_IDX(q, prod);
}
@@ -1895,6 +1897,7 @@ static void arm_smmu_domain_free(struct iommu_domain *domain)
mutex_unlock(&arm_smmu_asid_lock);
} else {
struct arm_smmu_s2_cfg *cfg = &smmu_domain->s2_cfg;
+
if (cfg->vmid)
arm_smmu_bitmap_free(smmu->vmid_map, cfg->vmid);
}
@@ -2724,6 +2727,7 @@ static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
static void arm_smmu_cmdq_free_bitmap(void *data)
{
unsigned long *bitmap = data;
+
bitmap_free(bitmap);
}
@@ -2939,6 +2943,7 @@ static int arm_smmu_update_gbpa(struct arm_smmu_device *smmu, u32 set, u32 clr)
static void arm_smmu_free_msis(void *data)
{
struct device *dev = data;
+
platform_msi_domain_free_irqs(dev);
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next 2/3] iommu/arm-smmu-v3: Change *array into *const array
2021-05-20 8:42 [PATCH -next 0/3] iommu/arm-smmu-v3: clean up some code style issues Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 1/3] iommu/arm-smmu-v3: fix missing a blank line after declarations Bixuan Cui
@ 2021-05-20 8:42 ` Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 3/3] iommu/arm-smmu-v3: Prefer unsigned int to bare use of unsigned Bixuan Cui
2 siblings, 0 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-20 8:42 UTC (permalink / raw)
To: will, robin.murphy
Cc: joro, jean-philippe, Jonathan.Cameron, cuibixuan,
linux-arm-kernel, iommu, linux-kernel
Fix checkpatch warning in arm-smmu-v3.c:
static const char * array should probably be static const char * const
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 4f184119c26d..51ce44fe550c 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -354,7 +354,7 @@ static void arm_smmu_cmdq_build_sync_cmd(u64 *cmd, struct arm_smmu_device *smmu,
static void arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu)
{
- static const char *cerror_str[] = {
+ static const char * const cerror_str[] = {
[CMDQ_ERR_CERROR_NONE_IDX] = "No error",
[CMDQ_ERR_CERROR_ILL_IDX] = "Illegal command",
[CMDQ_ERR_CERROR_ABT_IDX] = "Abort on command fetch",
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next 3/3] iommu/arm-smmu-v3: Prefer unsigned int to bare use of unsigned
2021-05-20 8:42 [PATCH -next 0/3] iommu/arm-smmu-v3: clean up some code style issues Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 1/3] iommu/arm-smmu-v3: fix missing a blank line after declarations Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 2/3] iommu/arm-smmu-v3: Change *array into *const array Bixuan Cui
@ 2021-05-20 8:42 ` Bixuan Cui
2 siblings, 0 replies; 4+ messages in thread
From: Bixuan Cui @ 2021-05-20 8:42 UTC (permalink / raw)
To: will, robin.murphy
Cc: joro, jean-philippe, Jonathan.Cameron, cuibixuan,
linux-arm-kernel, iommu, linux-kernel
Fix checkpatch warning in arm-smmu-v3.c:
Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 51ce44fe550c..725b099d0652 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -1827,7 +1827,7 @@ static bool arm_smmu_capable(enum iommu_cap cap)
}
}
-static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)
+static struct iommu_domain *arm_smmu_domain_alloc(unsigned int type)
{
struct arm_smmu_domain *smmu_domain;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-20 7:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 8:42 [PATCH -next 0/3] iommu/arm-smmu-v3: clean up some code style issues Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 1/3] iommu/arm-smmu-v3: fix missing a blank line after declarations Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 2/3] iommu/arm-smmu-v3: Change *array into *const array Bixuan Cui
2021-05-20 8:42 ` [PATCH -next 3/3] iommu/arm-smmu-v3: Prefer unsigned int to bare use of unsigned Bixuan Cui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).