linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 1/1] spi: clarify what driver can do with message->status
Date: Tue, 24 Feb 2015 16:35:27 +0200	[thread overview]
Message-ID: <1424788527.14897.27.camel@linux.intel.com> (raw)
In-Reply-To: <20150224141706.GK6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>

On Tue, 2015-02-24 at 23:17 +0900, Mark Brown wrote:
> On Tue, Feb 24, 2015 at 03:33:27PM +0200, Andy Shevchenko wrote:
> > On Tue, 2015-02-24 at 22:24 +0900, Mark Brown wrote:
> 
> > > > +	/* The actual driver may set this field to indicate an error, e.g. -EIO
> > > > +	 * for failed transfer. */
> > > >  	int			status;
> 
> > > Let's take a step back here: what documentation are you looking at which
> > > says anything else about status?
> 
> > The description of this field above, namely " * @status: zero for
> > success, else negative errno".
> 
> ...which suggests that anything detecting an error should report it via
> status, no?

Unclear. I dived into spi.c to understand if I could override or not.
There are two fields status and state, the latter is dedicated for an
actual driver usage, and that is clear. Many (old) drivers are using
state as a storage for custom status. Newer drivers, that are using SPI
core, mostly don't care about error handling at all (at least I didn't
find an existing example of the message->status usage).


> > > I'd also expect this to go with the other kerneldoc for the field.
> 
> > Any place that suits better.
> 
> Well, see above...

Regarding my above comment can we extend the description of the field
then?

-- 
Andy Shevchenko <andriy.shevchenko-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-02-24 14:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 10:04 [PATCH v1 1/1] spi: clarify what driver can do with message->status Andy Shevchenko
     [not found] ` <1424772249-9676-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-24 13:24   ` Mark Brown
     [not found]     ` <20150224132411.GF6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-24 13:33       ` Andy Shevchenko
     [not found]         ` <1424784807.14897.24.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-24 14:17           ` Mark Brown
     [not found]             ` <20150224141706.GK6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-24 14:35               ` Andy Shevchenko [this message]
     [not found]                 ` <1424788527.14897.27.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-02-26  2:48                   ` Mark Brown
     [not found]                     ` <20150226024812.GK6236-bheZrs9scGb3/WHNxyQH9YN0K6Il/+VY@public.gmane.org>
2015-02-26 13:15                       ` Andy Shevchenko

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=1424788527.14897.27.camel@linux.intel.com \
    --to=andriy.shevchenko-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).