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>] [day] [month] [year] [list]
Message-ID: <9ea20705-8536-738b-4f1f-60feb2c092fa@linux.intel.com>
Date: Mon, 29 Apr 2024 13:22:50 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Ryder Lee <ryder.lee@...iatek.com>, 
    Jianjun Wang <jianjun.wang@...iatek.com>, 
    Lorenzo Pieralisi <lpieralisi@...nel.org>, 
    Krzysztof Wilczyński <kw@...ux.com>, 
    Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, 
    linux-pci@...r.kernel.org
cc: LKML <linux-kernel@...r.kernel.org>, linux-mediatek@...ts.infradead.org
Subject: pcie-mediatek slot calculation correct?

Hi all,

I was doing Conf Type 0/1 helper generalization when I ran into this code 
in drivers/pci/controller/pcie-mediatek.c:

	u32 func = PCI_FUNC(port->slot);
	u32 slot = PCI_SLOT(port->slot << 3);

With that code, function is effectively duplicated into slot, is this 
correct behavior?

..Adjustments made in the history of this code fragment didn't exactly 
inspire confidence on the correctness of this code. :-/


-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ