On Sun, Feb 19, 2017 at 8:00 AM, Mintz, Yuval <yuval.mi...@cavium.com> wrote: >> +static void nfp_pcie_sriov_read_nfd_limit(struct nfp_pf *pf) >> +{ >> + int err; >> + >> + pf->limit_vfs = nfp_rtsym_read_le(pf->cpp, "nfd_vf_cfg_max_vfs", >> &err); >> + if (!err) >> + return; >> + >> + pf->limit_vfs = ~0; >> + /* Allow any setting for backwards compatibility if symbol not found >> */ >> + if (err != -ENOENT) >> + nfp_warn(pf->cpp, "Warning: VF limit read failed: %d\n", err); >> +} >> + > > If you're only going to use this under CONFIG_PCI_IOV, > perhaps put this underneath the ifdef as well?
Sure, I have a slight preference to not use ifdefs unless necessary, but I guess the body of this function could be under an ifdef without making things too ugly.. Thanks :) Testing almost done, v2 coming shortly.