ALSA: Replace snd_malloc_pages() and snd_free_pages() with standard helpers, take#2
snd_malloc_pages() and snd_free_pages() are merely thin wrappers of the standard page allocator / free functions. Even the arguments are compatible with some standard helpers, so there is little merit of keeping these wrappers. This patch replaces the all existing callers of snd_malloc_pages() and snd_free_pages() with the direct calls of the standard helper functions. In this version, we use a recently introduced one, alloc_pages_exact(), which suits better than the old snd_malloc_pages() implementation for our purposes. Then we can avoid the waste of pages by alignment to power-of-two. Since alloc_pages_exact() does split pages, we need no longer __GFP_COMP flag; or better to say, we must not pass __GFP_COMP to alloc_pages_exact(). So the former unconditional addition of __GFP_COMP flag in snd_malloc_pages() is dropped, as well as in most other places. Reviewed-by:Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by:
Michal Hocko <mhocko@suse.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
Showing
- include/sound/memalloc.h 0 additions, 4 deletionsinclude/sound/memalloc.h
- sound/core/memalloc.c 3 additions, 50 deletionssound/core/memalloc.c
- sound/core/pcm.c 7 additions, 7 deletionssound/core/pcm.c
- sound/usb/usx2y/usX2Yhwdep.c 2 additions, 1 deletionsound/usb/usx2y/usX2Yhwdep.c
- sound/usb/usx2y/usbusx2y.c 2 additions, 1 deletionsound/usb/usx2y/usbusx2y.c
- sound/usb/usx2y/usx2yhwdeppcm.c 4 additions, 2 deletionssound/usb/usx2y/usx2yhwdeppcm.c
Loading
Please register or sign in to comment