diff mbox

[U-Boot] gunzip.c: use block layer for writes

Message ID 1460413297-16640-1-git-send-email-eric@nelint.com
State Accepted
Commit 6a3bf3e57149dcfdb447590049ef6cad6cf7258b
Delegated to: Tom Rini
Headers show

Commit Message

Eric Nelson April 11, 2016, 10:21 p.m. UTC
Call blk_dwrite to ensure that the block cache is notified
if enabled and remove build breakage when CONFIG_BLK is enabled.

Signed-off-by: Eric Nelson <eric@nelint.com>
---
 lib/gunzip.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Stephen Warren April 12, 2016, 4:45 p.m. UTC | #1
On 04/11/2016 04:21 PM, Eric Nelson wrote:
> Call blk_dwrite to ensure that the block cache is notified
> if enabled and remove build breakage when CONFIG_BLK is enabled.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

You probably wanted to Cc whichever maintainer will apply this though. 
Hopefully they'll see it in patchwork.
Eric Nelson April 12, 2016, 5:18 p.m. UTC | #2
Thanks Stephen,

On 04/12/2016 09:45 AM, Stephen Warren wrote:
> On 04/11/2016 04:21 PM, Eric Nelson wrote:
>> Call blk_dwrite to ensure that the block cache is notified
>> if enabled and remove build breakage when CONFIG_BLK is enabled.
> 
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> 
> You probably wanted to Cc whichever maintainer will apply this though.
> Hopefully they'll see it in patchwork.

I'm not sure who that might be and I included everyone on
the output of get_maintainer.pl.

Tom's the last one to commit and comment on the gzwrite piece
of code, so perhaps it's him.
Tom Rini April 12, 2016, 5:21 p.m. UTC | #3
On Tue, Apr 12, 2016 at 10:18:39AM -0700, Eric Nelson wrote:
> Thanks Stephen,
> 
> On 04/12/2016 09:45 AM, Stephen Warren wrote:
> > On 04/11/2016 04:21 PM, Eric Nelson wrote:
> >> Call blk_dwrite to ensure that the block cache is notified
> >> if enabled and remove build breakage when CONFIG_BLK is enabled.
> > 
> > Reviewed-by: Stephen Warren <swarren@nvidia.com>
> > 
> > You probably wanted to Cc whichever maintainer will apply this though.
> > Hopefully they'll see it in patchwork.
> 
> I'm not sure who that might be and I included everyone on
> the output of get_maintainer.pl.
> 
> Tom's the last one to commit and comment on the gzwrite piece
> of code, so perhaps it's him.

Indeed, last resort is me :)  I suppose the top of my head question is,
do we have some gunzip tests that test.py will kick off?
Stephen Warren April 12, 2016, 5:32 p.m. UTC | #4
On 04/12/2016 11:21 AM, Tom Rini wrote:
> On Tue, Apr 12, 2016 at 10:18:39AM -0700, Eric Nelson wrote:
>> Thanks Stephen,
>>
>> On 04/12/2016 09:45 AM, Stephen Warren wrote:
>>> On 04/11/2016 04:21 PM, Eric Nelson wrote:
>>>> Call blk_dwrite to ensure that the block cache is notified
>>>> if enabled and remove build breakage when CONFIG_BLK is enabled.
>>>
>>> Reviewed-by: Stephen Warren <swarren@nvidia.com>
>>>
>>> You probably wanted to Cc whichever maintainer will apply this though.
>>> Hopefully they'll see it in patchwork.
>>
>> I'm not sure who that might be and I included everyone on
>> the output of get_maintainer.pl.
>>
>> Tom's the last one to commit and comment on the gzwrite piece
>> of code, so perhaps it's him.
>
> Indeed, last resort is me :)  I suppose the top of my head question is,
> do we have some gunzip tests that test.py will kick off?

I don't believe we do for the command. IIRC there's a sandbox test for 
the core gunzip routine itself, but not the gzwrite command that uses it.
Simon Glass April 20, 2016, 2:40 p.m. UTC | #5
On 11 April 2016 at 16:21, Eric Nelson <eric@nelint.com> wrote:
> Call blk_dwrite to ensure that the block cache is notified
> if enabled and remove build breakage when CONFIG_BLK is enabled.
>
> Signed-off-by: Eric Nelson <eric@nelint.com>
> ---
>  lib/gunzip.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini April 21, 2016, 11:22 a.m. UTC | #6
On Mon, Apr 11, 2016 at 03:21:37PM -0700, Eric Nelson wrote:

> Call blk_dwrite to ensure that the block cache is notified
> if enabled and remove build breakage when CONFIG_BLK is enabled.
> 
> Signed-off-by: Eric Nelson <eric@nelint.com>
> Reviewed-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/lib/gunzip.c b/lib/gunzip.c
index 6d65ccc..bc746d6 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -232,9 +232,8 @@  int gzwrite(unsigned char *src, int len,
 			gzwrite_progress(iteration++,
 					 totalfilled,
 					 szexpected);
-			blocks_written = dev->block_write(dev, outblock,
-							  writeblocks,
-							  writebuf);
+			blocks_written = blk_dwrite(dev, outblock,
+						    writeblocks, writebuf);
 			outblock += blocks_written;
 			if (ctrlc()) {
 				puts("abort\n");