]> Zhao Yanbai Git Server - minix.git/commitdiff
AHCI: remove obsolete free_contig calls 07/2807/1
authorDavid van Moolenbroek <david@minix3.org>
Tue, 2 Sep 2014 15:51:16 +0000 (15:51 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 2 Sep 2014 15:51:16 +0000 (15:51 +0000)
The memory used to be in its own memory region, but is now a part of
a larger memory region which is already being freed anyway.

Change-Id: Ice3174cec76e07112a1997b969dc3f47f573514c

minix/drivers/storage/ahci/ahci.c

index d3acb5aa6add93334b72058eea5199110f76e148..e169ef4294dc1664383150521cd52a66e5d7379d 100644 (file)
@@ -1950,7 +1950,6 @@ static void port_free(struct port_state *ps)
         * allocated memory.
         */
        u32_t cmd;
-       int i;
 
        /* Disable FIS receive. */
        cmd = port_read(ps, AHCI_PORT_CMD);
@@ -1965,11 +1964,6 @@ static void port_free(struct port_state *ps)
        if (ps->pad_base != NULL)
                free_contig(ps->pad_base, ps->pad_size);
 
-       /* The first command table is part of the primary memory page. */
-       for (i = 1; i < hba_state.nr_cmds; i++)
-               if (ps->ct_base[i] != NULL)
-                       free_contig(ps->ct_base[i], AHCI_CT_SIZE);
-
        free_contig(ps->mem_base, ps->mem_size);
 }