[PATCH v2 06/10] soc: aspeed: lpc-snoop: Rearrange channel paths
Jean Delvare
jdelvare at suse.de
Fri Jul 4 08:34:43 PDT 2025
On Mon, 16 Jun 2025 22:43:43 +0930, Andrew Jeffery wrote:
> Order assignments such that tests for conditions not involving resource
> acquisition are ordered before those testing acquired resources, and
> order managed resource acquisition before unmanaged where possible. This
> way we minimise the amount of manual cleanup required.
>
> In the process, improve readability of the code by introducing a channel
> pointer that takes the place of the repeated object lookups.
>
> Acked-by: Jean Delvare <jdelvare at suse.de>
> Signed-off-by: Andrew Jeffery <andrew at codeconstruct.com.au>
> ---
> drivers/soc/aspeed/aspeed-lpc-snoop.c | 51 ++++++++++++++++++++---------------
> 1 file changed, 29 insertions(+), 22 deletions(-)
> (...)
> @@ -238,6 +240,7 @@ static int aspeed_lpc_enable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
> goto err_misc_deregister;
> }
>
> + /* Enable LPC snoop channel at requested port */
> regmap_update_bits(lpc_snoop->regmap, HICR5, hicr5_en, hicr5_en);
> regmap_update_bits(lpc_snoop->regmap, SNPWADR, snpwadr_mask,
> lpc_port << snpwadr_shift);
This duplicates a comment which is already present in the driver a few
lines before.
This duplicated comment gets cleaned up later in patch 10/10 (soc:
aspeed: lpc-snoop: Lift channel config to const structs).
--
Jean Delvare
SUSE L3 Support
More information about the linux-arm-kernel
mailing list