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: <eb0bbfbcb963174bbb625268b0e5385deb8a2c62@intel.com>
Date: Tue, 16 Sep 2025 11:07:07 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Andi Shyti <andi.shyti@...nel.org>, Ilpo Järvinen
 <ilpo.jarvinen@...ux.intel.com>
Cc: linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
 Krzysztof Wilczyński <kw@...ux.com>, Christian
 König
 <christian.koenig@....com>, Michał Winiarski
 <michal.winiarski@...el.com>,
 Alex Deucher <alexander.deucher@....com>, amd-gfx@...ts.freedesktop.org,
 David Airlie <airlied@...il.com>, dri-devel@...ts.freedesktop.org,
 intel-gfx@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org, Joonas
 Lahtinen <joonas.lahtinen@...ux.intel.com>, Lucas De Marchi
 <lucas.demarchi@...el.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>, Simona
 Vetter <simona@...ll.ch>, Tvrtko Ursulin <tursulin@...ulin.net>,
 ?UTF-8?q?Thomas=20Hellstr=C3=B6m?= <thomas.hellstrom@...ux.intel.com>,
 "Michael J . Ruhl" <mjruhl@...ana.ai>, linux-kernel@...r.kernel.org,
 linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 05/11] PCI: Add pci_rebar_size_supported() helper

On Mon, 15 Sep 2025, Andi Shyti <andi.shyti@...nel.org> wrote:
> Hi Ilpo,
>
>> +/**
>> + * pci_rebar_size_supported - check if size is supported for BAR
>> + * @pdev: PCI device
>> + * @bar: BAR to check
>> + * @size: size as defined in the PCIe spec (0=1MB, 31=128TB)
>> + *
>> + * Return: %true if @bar is resizable and @size is a supported, otherwise
>> + *	   %false.
>> + */
>> +bool pci_rebar_size_supported(struct pci_dev *pdev, int bar, int size)
>> +{
>> +	u64 sizes = pci_rebar_get_possible_sizes(pdev, bar);
>> +
>> +	return BIT(size) & sizes;
>
> I would return here "!!(BIT(size) & sizes)", but it doesn't
> really matter.

If the patch had that, I'd ask to drop the superfluous negations and
parens...

BR,
Jani.

>
> Reviewed-by: Andi Shyti <andi.shyti@...ux.intel.com>
>
> Andi

-- 
Jani Nikula, Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ