[PATCH v2 00/17] ptrlist.h cleanup (v2)

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

 



This series contains a number of cleanups of the list walking macros.
The main changes are:
* use structurally equivalent struct for all pointer lists
  to avoid needless casting to and fro struct ptrlist
* simplify PREPARE/NEXT/RESET logic by using common PTR_NEXT()

The series is available for testing & review in the Git repository at:
  git://github.com/lucvoo/sparse-dev.git ptrlist-cleanup
It is based and depends on a previous series which can be found at:
  git://github.com/lucvoo/sparse-dev.git ptrlist-notag

Change since v1:
* fix typos in commit message
* restore protection against multiple evaluations
* keep declaration of __nr next to __list & __head's
* reuse VRFY_PTR_LIST() for sanity checking
* simplify DO_THIS_ADDRESS()
* make clearer what is API and what is not

Many thanks to Ramsay Jones for his review!

----------------------------------------------------------------

Luc Van Oostenryck (17):
  ptrlist: let all pointer lists have the same parametrized structure
  ptrlist: when possible use the real type of the list
  ptrlist: remove now unneeded CHECK_TYPE()
  ptrlist: make add_ptr_list() more readable
  ptrlist: make free_ptr_list() more readable
  ptrlist: remove some unneeded arg from internal macros.
  ptrlist: remove extra ident level
  ptrlist: simplify loop nesting
  ptrlist: simplify DO_NEXT
  ptrlist: simplify PREPARE/NEXT
  ptrlist: shorter continuated lines
  ptrlist: remove ptr_list_empty()
  ptrlist: make {first,last}_ptr_list() out-of-line functions
  ptrlist: move semi-private prototypes close to their user
  ptrlist: use VRFY_PTR_LIST() for sanity check
  ptrlist: keep declaration of head-list-nr together
  ptrlist: make clear what is API and what is implementation.

 lib.c     |   2 +-
 ptrlist.c |  38 ++++++
 ptrlist.h | 398 +++++++++++++++++++++++++-----------------------------
 3 files changed, 223 insertions(+), 215 deletions(-)

-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux