lkml.org 
[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] acpi/nfit: Fix command-supported detection
On Mon, Jan 14, 2019 at 8:43 AM Dan Williams <dan.j.williams@intel.com> wrote:
> On Mon, Jan 14, 2019 at 7:19 AM Jeff Moyer <jmoyer@redhat.com> wrote:
[..]
> > > +
> > > + if (cmd == ND_CMD_CALL) {
> > > + int i;
> > > +
> > > + if (call_pkg && nfit_mem->family != call_pkg->nd_family)
> > > + return -ENOTTY;
> > > +
> > > + for (i = 0; i < ARRAY_SIZE(call_pkg->nd_reserved2); i++)
> > > + if (call_pkg->nd_reserved2[i])
> > > + return -EINVAL;
> > > + return call_pkg->nd_command;
> > > + }
> > > +
> > > + /* Linux ND commands == NVDIMM_FAMILY_INTEL function numbers */
> > > + if (nfit_mem->family == NVDIMM_FAMILY_INTEL)
> > > + return cmd;
> > > + return 0;
> >
> > Function zero? Is that really the right thing to return here?
>
> Yes, function zero is never set in n

...whoops fumble fingered "send"

Function zero should never be set in nfit_mem->dsm_mask, although the
NVDIMM_FAMILY_MSFT mask violates this assumption. I'll fix that up.

\
 
 \ /
  Last update: 2019-01-14 17:48    [W:0.045 / U:26.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site