sata_mv: Clean up hard coded array size calculation.
authorThiago Farina <tfransosi@gmail.com>
Sun, 8 Nov 2009 19:30:57 +0000 (14:30 -0500)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 3 Dec 2009 07:46:34 +0000 (02:46 -0500)
Use ARRAY_SIZE macro of kernel api instead.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/sata_mv.c

index 6f5093b7c8c597ad63078d98763a222adf0d0a09..a8a7be0d06ffcf895f39b96fc966f68ae18b6bf6 100644 (file)
@@ -2217,7 +2217,7 @@ static unsigned int mv_qc_issue_fis(struct ata_queued_cmd *qc)
        int err = 0;
 
        ata_tf_to_fis(&qc->tf, link->pmp, 1, (void *)fis);
-       err = mv_send_fis(ap, fis, sizeof(fis) / sizeof(fis[0]));
+       err = mv_send_fis(ap, fis, ARRAY_SIZE(fis));
        if (err)
                return err;