mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ata: disk_ata_drive: remove obsolete check for ID validity
@ 2015-10-30 10:00 Peter Mamonov
  2015-11-02  6:58 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Mamonov @ 2015-10-30 10:00 UTC (permalink / raw)
  To: barebox; +Cc: jbe, Peter Mamonov

Acked-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
---
 drivers/ata/disk_ata_drive.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c
index ee1709e..d30d0ad 100644
--- a/drivers/ata/disk_ata_drive.c
+++ b/drivers/ata/disk_ata_drive.c
@@ -26,16 +26,6 @@
 #include <disks.h>
 #include <dma.h>
 
-static int ata_id_is_valid(const uint16_t *id)
-{
-	if ((id[ATA_ID_FIELD_VALID] & 1) == 0) {
-		pr_debug("Drive's ID seems invalid\n");
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 static uint64_t ata_id_n_sectors(uint16_t *id)
 {
 	if (ata_id_has_lba(id)) {
@@ -244,13 +234,6 @@ static int ata_port_init(struct ata_port *port)
 
 	ata_fix_endianess(port->id, SECTOR_SIZE / sizeof(uint16_t));
 
-	rc = ata_id_is_valid(port->id);
-	if (rc) {
-		dev_err(dev, "ata id invalid\n");
-		free(port->id);
-		return rc;
-	}
-
 #ifdef DEBUG
 	ata_dump_id(port->id);
 #endif
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: disk_ata_drive: remove obsolete check for ID validity
  2015-10-30 10:00 [PATCH] ata: disk_ata_drive: remove obsolete check for ID validity Peter Mamonov
@ 2015-11-02  6:58 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-11-02  6:58 UTC (permalink / raw)
  To: Peter Mamonov; +Cc: barebox, jbe

On Fri, Oct 30, 2015 at 01:00:45PM +0300, Peter Mamonov wrote:
> Acked-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
> ---
>  drivers/ata/disk_ata_drive.c | 17 -----------------
>  1 file changed, 17 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c
> index ee1709e..d30d0ad 100644
> --- a/drivers/ata/disk_ata_drive.c
> +++ b/drivers/ata/disk_ata_drive.c
> @@ -26,16 +26,6 @@
>  #include <disks.h>
>  #include <dma.h>
>  
> -static int ata_id_is_valid(const uint16_t *id)
> -{
> -	if ((id[ATA_ID_FIELD_VALID] & 1) == 0) {
> -		pr_debug("Drive's ID seems invalid\n");
> -		return -EINVAL;
> -	}
> -
> -	return 0;
> -}
> -
>  static uint64_t ata_id_n_sectors(uint16_t *id)
>  {
>  	if (ata_id_has_lba(id)) {
> @@ -244,13 +234,6 @@ static int ata_port_init(struct ata_port *port)
>  
>  	ata_fix_endianess(port->id, SECTOR_SIZE / sizeof(uint16_t));
>  
> -	rc = ata_id_is_valid(port->id);
> -	if (rc) {
> -		dev_err(dev, "ata id invalid\n");
> -		free(port->id);
> -		return rc;
> -	}
> -
>  #ifdef DEBUG
>  	ata_dump_id(port->id);
>  #endif
> -- 
> 2.1.4
> 
> 

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-02  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-30 10:00 [PATCH] ata: disk_ata_drive: remove obsolete check for ID validity Peter Mamonov
2015-11-02  6:58 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox