[U-Boot] [PATCH v1 3/9] dwc_ahsata: Make sata_write() comply with <part.h>

stefano babic sbabic at denx.de
Sun Sep 30 11:01:50 CEST 2012


Am 29/09/2012 22:51, schrieb Tom Rini:
> sata_write() takes a const void as the last argument.  Fixing this means
> we also need to make ata_low_level_rw_lba{28,48} also take a const void.
> 
> Signed-off-by: Tom Rini <trini at ti.com>
> ---
>  drivers/block/dwc_ahsata.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c
> index 2703d3d..70752d2 100644
> --- a/drivers/block/dwc_ahsata.c
> +++ b/drivers/block/dwc_ahsata.c
> @@ -794,7 +794,7 @@ static void dwc_ahsata_init_wcache(int dev, u16 *id)
>  }
>  
>  u32 ata_low_level_rw_lba48(int dev, u32 blknr, lbaint_t blkcnt,
> -				void *buffer, int is_write)
> +				const void *buffer, int is_write)
>  {
>  	u32 start, blks;
>  	u8 *addr;
> @@ -828,7 +828,7 @@ u32 ata_low_level_rw_lba48(int dev, u32 blknr, lbaint_t blkcnt,
>  }
>  
>  u32 ata_low_level_rw_lba28(int dev, u32 blknr, lbaint_t blkcnt,
> -				void *buffer, int is_write)
> +				const void *buffer, int is_write)
>  {
>  	u32 start, blks;
>  	u8 *addr;
> @@ -863,7 +863,7 @@ u32 ata_low_level_rw_lba28(int dev, u32 blknr, lbaint_t blkcnt,
>  /*
>   * SATA interface between low level driver and command layer
>   */
> -ulong sata_read(int dev, unsigned long blknr, lbaint_t blkcnt, void *buffer)
> +ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer)
>  {
>  	u32 rc;
>  
> @@ -876,7 +876,7 @@ ulong sata_read(int dev, unsigned long blknr, lbaint_t blkcnt, void *buffer)
>  	return rc;
>  }
>  
> -ulong sata_write(int dev, unsigned long blknr, lbaint_t blkcnt, void *buffer)
> +ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer)
>  {
>  	u32 rc;
>  	struct ahci_probe_ent *probe_ent =
> 

Acked-by: Stefano Babic <sbabic at denx.de>

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list