sys/dev/disk/dm: Fix/refactor alloc/free functions [3/6]
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 11 Nov 2015 10:02:10 +0000 (19:02 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 12 Nov 2015 14:33:49 +0000 (23:33 +0900)
commit41d37b860809ad5d2784ab444c4d392c9dd88b0b
tree2f17c2d1d5f956ff52b8b7d0618f71a13cbc9291
parent12f3b163908bb447169857cd09d6e631fcf9a78e
sys/dev/disk/dm: Fix/refactor alloc/free functions [3/6]

dm_dev_alloc()/free()
* Make them static.
* Make alloc() take name and uuid just like dm_pdev_alloc().
* Refactoring.

dm_pdev_alloc()/free()
* Fix memory leak.
* Rename dm_pdev_rem() to dm_pdev_free().
  A simple kfree function should be xxx_free() but not xxx_rem().
  xxx_rem() isn't necessarily a name used for just kfree() in
  other files, which makes naming very confusing.
* Refactoring.
sys/dev/disk/dm/dm.h
sys/dev/disk/dm/dm_dev.c
sys/dev/disk/dm/dm_pdev.c