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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to