staging: dgap: adds missing iounmap for re_map_port in dgap_release_remap()
PATCH 2/3 staging: dgap: adds missing iounmap for re_map_port in dgap_release_remap()
--- drivers/staging/dgap/dgap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/dgap/dgap.c +1 -0
@@ -1026,6 +1026,7 @@ static void dgap_release_remap(struct board_t *brd)release_mem_region (brd->membase,0x200000 );release_mem_region (brd->membase +PCI_IO_OFFSET ,0x200000 );iounmap (brd->re_map_membase); +iounmap (brd->re_map_port); }/***************************************************************************** *
Signature · 1 line
1.7.1
Quoted 10 lines · Daeseok Youn
Signed-off-by Daeseok Youn <[email protected]>--- drivers/staging/dgap/dgap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/staging/dgap/dgap.c +0
-0
drivers/staging/dgap/dgap.c static void dgap_release_remap(struct board_t *brd) · line 1029
Quoted 4 lines
drivers/staging/dgap/dgap.c +1
-0@@ -1026,6 +1026,7 @@ static void dgap_release_remap(struct board_t *brd)release_mem_region (brd->membase,0x200000 );release_mem_region (brd->membase +PCI_IO_OFFSET ,0x200000 );iounmap (brd->re_map_membase); +iounmap (brd->re_map_port);
I don't think it matters, but at least aesthetically it would be better to unmap first and then release the regions. (You can do this in a different patch).
regards,
dan carpenter
Quoted 6 lines · Dan Carpenter
Quoted 5 lines · Daeseok Youn
Signed-off-by Daeseok Youn <[email protected]>--- drivers/staging/dgap/dgap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 15 lines
drivers/staging/dgap/dgap.c static void dgap_release_remap(struct board_t *brd) · line 1029
Quoted 9 lines
drivers/staging/dgap/dgap.c +1
-0@@ -1026,6 +1026,7 @@ static void dgap_release_remap(struct board_t *brd)release_mem_region (brd->membase,0x200000 );release_mem_region (brd->membase +PCI_IO_OFFSET ,0x200000 );iounmap (brd->re_map_membase); +iounmap (brd->re_map_port);I don't think it matters, but at least aesthetically it would be better to unmap first and then release the regions. (You can do this in a different patch).
Also dgap_do_remap() unwinds in the wrong order and is sucky. It should use gotos.
Also the name dgap_do_remap() isn't great. Remap is a verb not a noun so the "_do" isn't needed. Just dgap_remap() and dgap_release_remap() could be changed to dgap_unmap().
regards,
dan carpenter
Hi,
2014-09-24 18:42 GMT+09:00 Dan Carpenter <[email protected]>:
Quoted 7 lines · Dan Carpenter
Quoted 6 lines · Daeseok Youn
Quoted 5 lines
Signed-off-by Daeseok Youn <[email protected]>--- drivers/staging/dgap/dgap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/staging/dgap/dgap.c +0
-0@@ -1026,6 +1026,7 @@ static void dgap_release_remap(struct board_t *brd)release_mem_region (brd->membase,0x200000 );Quoted 8 lines
drivers/staging/dgap/dgap.c static void dgap_release_remap(struct board_t *brd) · line 1029
Quoted 3 lines
drivers/staging/dgap/dgap.c +1
-0release_mem_region (brd->membase +PCI_IO_OFFSET ,0x200000 );iounmap (brd->re_map_membase); +iounmap (brd->re_map_port);I don't think it matters, but at least aesthetically it would be better to unmap first and then release the regions. (You can do this in a different patch).
Ok. I will make another patch as your comment.
Quoted 8 lines
Quoted 1 line
Also
dgap_do_remap()unwinds in the wrong order and is sucky. It should use gotos.Also the name
dgap_do_remap()isn't great. Remap is a verb not a noun so the "_do" isn't needed. Justdgap_remap()anddgap_release_remap()could be changed todgap_unmap().
OK. rename those functions.
Thanks.
regards,
Daeseok Youn.
Quoted 4 lines
regards,
dan carpenter