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: <CAFEp6-0J8e1rQbAwEE-E=LzhLyV5x10bhQE6EDwSvL=gz5S9JA@mail.gmail.com>
Date: Wed, 27 Aug 2025 15:27:09 +0200
From: Loic Poulain <loic.poulain@....qualcomm.com>
To: Qianfeng Rong <rongqianfeng@...o.com>
Cc: Sergey Ryazanov <ryazanov.s.a@...il.com>,
        Johannes Berg <johannes@...solutions.net>,
        Andrew Lunn <andrew+netdev@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: wwan: iosm: use int type to store negative error codes

On Tue, Aug 26, 2025 at 3:50 PM Qianfeng Rong <rongqianfeng@...o.com> wrote:
>
> The 'ret' variable in ipc_pcie_resources_request() either stores '-EBUSY'
> directly or holds returns from pci_request_regions() and ipc_acquire_irq().
> Storing negative error codes in u32 causes no runtime issues but is
> stylistically inconsistent and very ugly.  Change 'ret' from u32 to int
> type - this has no runtime impact.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>

Reviewed-by: Loic Poulain <loic.poulain@....qualcomm.com>

>  drivers/net/wwan/iosm/iosm_ipc_pcie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
> index a066977af0be..08ff0d6ccfab 100644
> --- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c
> +++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
> @@ -69,7 +69,7 @@ static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie)
>  {
>         struct pci_dev *pci = ipc_pcie->pci;
>         u32 cap = 0;
> -       u32 ret;
> +       int ret;
>
>         /* Reserved PCI I/O and memory resources.
>          * Mark all PCI regions associated with PCI device pci as
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ