On Mon, Jan 21, 2019 at 10:06:24PM -0800, Andrey Smirnov wrote: > When calling I/O functions of underlying block device driver we always > need to make sure that its size is small enough to not go past > device's boundary. Not only in get_chunk() and block_cache(), but in > writebuffer_flush() as well. Since the same code is used in three > different places, move it into a subroutine and adjust all of the > calls to ->write()/->read() accordingly. > > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> > --- > common/block.c | 22 +++++++++++++--------- > 1 file changed, 13 insertions(+), 9 deletions(-) Applied, thanks Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox