Re: [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

> > Change num_inbound_wins from u8 to int in brcm_pcie_setup() function to correctly
> > handle potential negative error codes returned by brcm_pcie_get_inbound_wins().
> > The u8 type was inappropriate for capturing the function's return value,
> > which can include error codes.
[...]
> This looks fine, however it seems like we could either:
> 
> - update brcm_pcie_get_inbound_wins() to take a reference to an u8 and
> assign num_inbound_wins directly plus return a negative error code
> 
> or
> 
> - update brcm_pcie_get_inbound_wins() to return 0 when encountering an error
> 
> We should have at least 1 inbound window to operate this PCIe controller, so
> if we get 0, nothing useful is going to happen.
> 
> Deferring to Jim as to whether he prefers to take your patch or fix it in a
> different way. Thanks!

The former would be my preference.

As such, I can make the change on the branch directly, if needed.  To avoid
reposting or sending a new patch.

	Krzysztof




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux