public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Vitaly Wool <vwool@ru.mvista.com>
Cc: linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH] SPI: turn transfers from arrays to linked lists
Date: Tue, 27 Dec 2005 09:27:55 -0800	[thread overview]
Message-ID: <200512270927.55331.david-b@pacbell.net> (raw)
In-Reply-To: <20051223170619.55ef439d.vwool@ru.mvista.com>

On Friday 23 December 2005 6:06 am, Vitaly Wool wrote:
> Hi,
> 
> the patch inlined is changing the SPI core and its users to have
> transfers in the SPI message structure as linked list not as an array,

It basically looks OK.  I've updated it a bit, and will include an
updated version in any future updates of mine.  (Right now I have
to merge your second version with my updated one ... )

So we'll be well on the way to agreeing on a single SPI framework
to evolve and integrate against.  


> -	req->msg.transfers = req->xfer;
> -	req->msg.n_transfer = 6;
> +	for (i = 0; i < 6; i++)
> +		list_add_tail(&req->xfer[i].link, &req->msg.transfers);

More expensive, but not in a way that will often matter much.  That
one's part of one-time init, for example.  And the attached code
uses the spi_message_add_tail(transfer, message) you had mentioned.


> +	DECLARE_SPI_MESSAGE(m);

The updated code has only an spi_message_init() function.


>  
> -		for (;;t++) {
> +		list_for_each_entry (t, &m->transfers, link) {...}

...

> -		tmp = m->n_transfer - 1;
> -		tmp = m->transfers[tmp].cs_change;
> +		if (t)
> +			tmp = t->cs_change;

Bug:  "t" is non-null but invalid there.  (Fixed.)


  reply	other threads:[~2005-12-27 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-23 14:06 [PATCH] SPI: turn transfers from arrays to linked lists Vitaly Wool
2005-12-27 17:27 ` David Brownell [this message]
2006-01-04  4:14 ` David Brownell

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=200512270927.55331.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=vwool@ru.mvista.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