From: David van Moolenbroek Date: Tue, 2 Sep 2014 15:51:16 +0000 (+0000) Subject: AHCI: remove obsolete free_contig calls X-Git-Tag: v3.3.0~24 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F2807%2F1;p=minix.git AHCI: remove obsolete free_contig calls 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 --- diff --git a/minix/drivers/storage/ahci/ahci.c b/minix/drivers/storage/ahci/ahci.c index d3acb5aa6..e169ef429 100644 --- a/minix/drivers/storage/ahci/ahci.c +++ b/minix/drivers/storage/ahci/ahci.c @@ -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); }