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]
Date:   Tue, 1 Feb 2022 20:14:18 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     netdev@...r.kernel.org, Sunil Goutham <sgoutham@...vell.com>,
        Iyappan Subramanian <iyappan@...amperecomputing.com>,
        Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Keyur Chudgar <keyur@...amperecomputing.com>,
        Quan Nguyen <quan@...amperecomputing.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v2] drivers: net: Replace acpi_bus_get_device()

On Tue, 01 Feb 2022 20:58:36 +0100 Rafael J. Wysocki wrote:
> -	struct bgx *bgx = context;
> +	struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
>  	struct device *dev = &bgx->pdev->dev;
> -	struct acpi_device *adev;
> +	struct bgx *bgx = context;

Compiler says you can't move bgx before dev.

Venturing deeper into the bikesheeding territory but I'd leave the
variable declarations be and move init of adev before the check.
Matter of preference but calling something that needs to be error 
checked in variable init breaks the usual
	
	ret = func(some, arguments);
	if (ret)
		goto explosions;

flow.

> -	if (acpi_bus_get_device(handle, &adev))
> +	if (!adev)
>  		goto out;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ