stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>,
	Sujith Pandel <sujith_pandel@dell.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] acpi/nfit: Fix command-supported detection
Date: Mon, 14 Jan 2019 15:51:49 -0500	[thread overview]
Message-ID: <x498sznaroa.fsf@redhat.com> (raw)
In-Reply-To: <CAPcyv4hANufJYNnu+tc5yaun3xG8Ht6MirobG4Fj_CaafXE+7g@mail.gmail.com> (Dan Williams's message of "Mon, 14 Jan 2019 08:47:49 -0800")

Dan Williams <dan.j.williams@intel.com> writes:

> 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.

OK, I think I see how it all fits together now, thanks.  It would be
nice if you documented this magical 0 return somehow.

Cheers,
Jeff

      reply	other threads:[~2019-01-14 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 23:59 [PATCH] acpi/nfit: Fix command-supported detection Dan Williams
2019-01-14  7:21 ` Pandel, Sujith
2019-01-14 15:19 ` Jeff Moyer
2019-01-14 16:43   ` Dan Williams
2019-01-14 16:47     ` Dan Williams
2019-01-14 20:51       ` Jeff Moyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x498sznaroa.fsf@redhat.com \
    --to=jmoyer@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=stable@vger.kernel.org \
    --cc=sujith_pandel@dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).