All of lore.kernel.org
 help / color / mirror / Atom feed
* pcie-mediatek slot calculation correct?
@ 2024-04-29 10:22 Ilpo Järvinen
  0 siblings, 0 replies; only message in thread
From: Ilpo Järvinen @ 2024-04-29 10:22 UTC (permalink / raw)
  To: Ryder Lee, Jianjun Wang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas, linux-pci
  Cc: LKML, linux-mediatek

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.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-29 10:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 10:22 pcie-mediatek slot calculation correct? Ilpo Järvinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.