lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMK7TMA3BvInUx+l@nvidia.com>
Date:   Thu, 27 Jul 2023 15:45:32 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Michael Shavit <mshavit@...gle.com>
Cc:     Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
        Joerg Roedel <joro@...tes.org>, jean-philippe@...aro.org,
        nicolinc@...dia.com, baolu.lu@...ux.intel.com,
        linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ