[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5345438.ORMdKP6N7u@jclayton-pc>
Date: Tue, 17 Nov 2015 11:28:29 -0800
From: Joshua Clayton <stillcompiling@...il.com>
To: linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org
Cc: Anton Bondarenko <anton.bondarenko.sama@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
linux-spi@...r.kernel.org
Subject: Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists