Re: [PATCH 3/4] dspbridge: use linux memory allocator directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nice cleanups of the cra^H^Hode now one cared about!

:-)

On 09/04/2009 12:19 PM, Andy Shevchenko wrote:
  #define LST_ELEM            list_head
@@ -85,9 +85,9 @@ struct LST_LIST {
  static inline struct LST_LIST *LST_Create(void)
  {
  	struct LST_LIST *pList;
+	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;

-	pList = (struct LST_LIST *) MEM_Calloc(sizeof(struct LST_LIST),
-		MEM_NONPAGED);
+	pList = kzalloc(sizeof(*pList), flags);
  	if (pList != NULL)
  		INIT_LIST_HEAD(&pList->head);

Would be nice to kill this whole function as well.
@@ -116,8 +116,7 @@ static inline struct LST_LIST *LST_Create(void)
   */
  static inline void LST_Delete(struct LST_LIST *pList)
  {
-	if (pList != NULL)
-		MEM_Free(pList);
+	kfree(pList);
  }

I guess whole 'LST_Delete()' could go away as well?

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux