lkml.org 
[lkml]   [2023]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/7] iommu/arm-smmu-v3: Move ctx_desc out of s1_cfg
On Fri, Jul 28, 2023 at 02:26:17AM +0800, Michael Shavit wrote:
> @@ -715,25 +714,28 @@ enum arm_smmu_domain_stage {
> };
>
> struct arm_smmu_domain {
> - struct arm_smmu_device *smmu;
> - struct mutex init_mutex; /* Protects smmu pointer */
> + struct arm_smmu_device *smmu;
> + struct mutex init_mutex; /* Protects smmu pointer */
>
> - struct io_pgtable_ops *pgtbl_ops;
> - bool stall_enabled;
> - atomic_t nr_ats_masters;
> + struct io_pgtable_ops *pgtbl_ops;
> + bool stall_enabled;
> + atomic_t nr_ats_masters;
>
> - enum arm_smmu_domain_stage stage;
> + enum arm_smmu_domain_stage stage;
> union {
> - struct arm_smmu_s1_cfg s1_cfg;
> - struct arm_smmu_s2_cfg s2_cfg;
> + struct {
> + struct arm_smmu_ctx_desc cd;
> + struct arm_smmu_s1_cfg s1_cfg;
> + };
> + struct arm_smmu_s2_cfg s2_cfg;
> };
>
> - struct iommu_domain domain;
> + struct iommu_domain domain;
>
> - struct list_head devices;
> - spinlock_t devices_lock;
> + struct list_head devices;
> + spinlock_t devices_lock;
>
> - struct list_head mmu_notifiers;
> + struct list_head mmu_notifiers;
> };

Don't re-indent a whole struct just to get column alignment. Do
a few lines around where you are touching.

This is also why I quite dislike column alignment, aside from being
unreadable, it harms readability of diffs and increases maintenance
costs.

Jason

\
 
 \ /
  Last update: 2023-07-27 20:46    [W:0.200 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site