linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: stillcompiling@gmail.com (Joshua Clayton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file
Date: Tue, 17 Nov 2015 11:28:29 -0800	[thread overview]
Message-ID: <5345438.ORMdKP6N7u@jclayton-pc> (raw)
In-Reply-To: <564B716E.5020605@gmail.com>

On Tuesday, November 17, 2015 07:26:54 PM Anton Bondarenko wrote:
> On 17.11.2015 16:24, Joshua Clayton wrote:
> > +	if (sb.st_size > 4096)
> > +		pabort("input file exceeds spidev's 4k limit");
> This is not a true. IIRC PAGE_SIZE is the default buffer size for 
> spidev, but can be changed using bufsiz module parameter.
> Just 'insmod spidev bufsiz=X', where X is number of bytes.

You are right. I will drop this. As Mark suggests.
The ioctl gives a nice error code if the buffer is too big.

...
> > +	tx = malloc(sb.st_size);
> It would be good to check new allocations for fail.

I will add a check for this. 

-- 
~Joshua Clayton

  parent reply	other threads:[~2015-11-17 19:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1447773299.git.stillcompiling@gmail.com>
     [not found] ` <20151117153746.GS31303@sirena.org.uk>
2015-11-17 16:15   ` [PATCH 0/8] spi: Add file i/o to spidev_test Joshua Clayton
2015-11-17 16:53     ` Mark Brown
     [not found] ` <2f17ae29e75967b4522b080c275b907622e1d353.1447773299.git.stillcompiling@gmail.com>
     [not found]   ` <20151117174156.GX31303@sirena.org.uk>
2015-11-17 18:58     ` [PATCH 1/8] Documentation/spi/spidev_test.c: use one rx buffer Joshua Clayton
     [not found] ` <7f2139b27013d77993c6bc2b0a6c94fab01add98.1447773299.git.stillcompiling@gmail.com>
     [not found]   ` <20151117174333.GY31303@sirena.org.uk>
2015-11-17 19:21     ` [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Joshua Clayton
2015-11-17 22:52       ` Mark Brown
     [not found] ` <d90d749776cf562bc9922aff5e97cb911a77b22b.1447773299.git.stillcompiling@gmail.com>
     [not found]   ` <564B716E.5020605@gmail.com>
2015-11-17 19:28     ` Joshua Clayton [this message]
     [not found] ` <155366ac799345f42c8c342609ffa11b2df529b0.1447773299.git.stillcompiling@gmail.com>
     [not found]   ` <20151117180924.GZ31303@sirena.org.uk>
2015-11-17 19:41     ` [PATCH 7/8] tools/Makefile: minor whitespace cleanup Joshua Clayton

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=5345438.ORMdKP6N7u@jclayton-pc \
    --to=stillcompiling@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).