[PATCH] iommu/arm-smmu-v3: Convert comma to semicolon

Chen Ni posted 1 patch 2 months, 1 week ago
There is a newer version of this series
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] iommu/arm-smmu-v3: Convert comma to semicolon
Posted by Chen Ni 2 months, 1 week ago
Replace comma between expressions with semicolons.

Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.

Found by inspection.
No functional change intended.
Compile tested only.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 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 737c5b882355..4815c5198642 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -1420,7 +1420,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_smmu_master *master)
 		cd_table->s1fmt = STRTAB_STE_0_S1FMT_LINEAR;
 		cd_table->linear.num_ents = max_contexts;
 
-		l1size = max_contexts * sizeof(struct arm_smmu_cd),
+		l1size = max_contexts * sizeof(struct arm_smmu_cd);
 		cd_table->linear.table = dma_alloc_coherent(smmu->dev, l1size,
 							    &cd_table->cdtab_dma,
 							    GFP_KERNEL);
-- 
2.25.1
Re: [PATCH] iommu/arm-smmu-v3: Convert comma to semicolon
Posted by Baolu Lu 2 months, 1 week ago
On 9/19/24 11:53 AM, Chen Ni wrote:
> Replace comma between expressions with semicolons.
> 
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
> 
> Found by inspection.
> No functional change intended.
> Compile tested only.
> 
> Signed-off-by: Chen Ni<nichen@iscas.ac.cn>
> ---
>   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

A typo in commit e3b1be2e73dbe ("iommu/arm-smmu-v3: Reorganize struct
arm_smmu_ctx_desc_cfg").

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Thanks,
baolu
Re: [PATCH] iommu/arm-smmu-v3: Convert comma to semicolon
Posted by Jason Gunthorpe 2 months, 1 week ago
On Thu, Sep 19, 2024 at 12:45:18PM +0800, Baolu Lu wrote:
> On 9/19/24 11:53 AM, Chen Ni wrote:
> > Replace comma between expressions with semicolons.
> > 
> > Using a ',' in place of a ';' can have unintended side effects.
> > Although that is not the case here, it is seems best to use ';'
> > unless ',' is intended.
> > 
> > Found by inspection.
> > No functional change intended.
> > Compile tested only.
> > 
> > Signed-off-by: Chen Ni<nichen@iscas.ac.cn>
> > ---
> >   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> A typo in commit e3b1be2e73dbe ("iommu/arm-smmu-v3: Reorganize struct
> arm_smmu_ctx_desc_cfg").
> 
> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Yes should have a fixes line, plese include and resend it..

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason