Re: [PATCH v3 2/3] x86/quirks: Improve line wrap on quirk conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 07, 2022 at 01:05:15PM -0800, Lucas De Marchi wrote:
> Remove extra parenthesis and wrap lines so it's easier to read what are
> the conditions being checked. The call to the hook also had an extra
> indentation: remove here to conform to coding style.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

> ---
>  arch/x86/kernel/early-quirks.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 8b689c2b8cc7..df34963e23bf 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -767,14 +767,12 @@ static int __init check_dev_quirk(int num, int slot, int func)
>  	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
>  
>  	for (i = 0; early_qrk[i].f != NULL; i++) {
> -		if (((early_qrk[i].vendor == PCI_ANY_ID) ||
> -			(early_qrk[i].vendor == vendor)) &&
> -			((early_qrk[i].device == PCI_ANY_ID) ||
> -			(early_qrk[i].device == device)) &&
> -			(!((early_qrk[i].class ^ class) &
> -			    early_qrk[i].class_mask)))
> -				early_qrk[i].f(num, slot, func);
> -
> +		if ((early_qrk[i].vendor == PCI_ANY_ID ||
> +		     early_qrk[i].vendor == vendor) &&
> +		    (early_qrk[i].device == PCI_ANY_ID ||
> +		     early_qrk[i].device == device) &&
> +		    !((early_qrk[i].class ^ class) & early_qrk[i].class_mask))
> +			early_qrk[i].f(num, slot, func);
>  	}
>  
>  	type = read_pci_config_byte(num, slot, func,
> -- 
> 2.34.1
> 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux