lkml.org 
[lkml]   [2019]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] PCI: dwc: Add new feature to skip core initialization
On Wed, Nov 13, 2019 at 02:38:48PM +0530, Vidya Sagar wrote:
> + if (ep->ops->get_features) {
> + epc_features = ep->ops->get_features(ep);
> + if (epc_features->skip_core_init)
> + return 0;
> }
>
> + return dw_pcie_ep_init_complete(ep);

This calling convention is strange. Just split the early part of
dw_pcie_ep_init into an dw_pcie_ep_early and either add a tiny
wrapper like:

int dw_pcie_ep_init(struct dw_pcie_ep *ep)
{
int error;

error = dw_pcie_ep_init_early(ep);
if (error)
return error;
return dw_pcie_ep_init_late(ep);
}

or just open code that in the few callers. That keeps the calling
conventions much simpler and avoids relying on a callback and flag.

\
 
 \ /
  Last update: 2019-11-27 10:49    [W:0.180 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site