Hello,

Using generic functions is always better than open coded stuff.
Also most of ltp code use ARRAY_SIZE , so make remaining code to
use the same.

Any Comments ?  :)

------- Original Message -------
Sender : Maninder Singh<maninder...@samsung.com> 
Date : Jun 26, 2015 21:04 (GMT+09:00)
Title : [PATCH 00/13] Use ARRAY_SIZE Macro where possible
Following patchset provides use of ARRAY_SIZE macro
instead of sizeof(type)/sizeof(type[0]).

Created with following coccinelle patch:- 

@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(E[0]))
+ ARRAY_SIZE(E)


Maninder Singh (13):
  kernel/pidns: use ARRAY_SIZE
  kernel/fs: use ARRAY_SIZE
  kernel/fs: use ARRAY_SIZE
  kernel/mq_timedreceive: use ARRAY_SIZE
  kernel/mq_open: use ARRAY_SIZE
  kernel/getxattr: use ARRAY_SIZE
  kernel/socketpair: use ARRAY_SIZE
  kernel/mq_timedsend: use ARRAY_SIZE
  kernel/fadvise: use ARRAY_SIZE
  kernel/dup2: use ARRAY_SIZE
  kernel/mq_unlink: use of ARRAY_SIZE
  kernel/rt_sigaction: use ARRAY_SIZE
  kernel/nft: use ARRAY_SIZE
  
Signed-off-by: Maninder Singh <maninder...@samsung.com>
Reviewed-by: Akhilesh Kumar <akhiles...@samsung.com> 
  
 testcases/kernel/containers/pidns/pidns17.c        |    4 ++--
 testcases/kernel/fs/fsstress/fsstress.c            |    7 ++++---
 testcases/kernel/fs/ftest/ftest02.c                |    2 +-
 testcases/kernel/fs/ftest/ftest06.c                |    2 +-
 testcases/kernel/syscalls/dup2/dup204.c            |    2 +-
 .../kernel/syscalls/fadvise/posix_fadvise01.c      |    2 +-
 .../kernel/syscalls/fadvise/posix_fadvise03.c      |    2 +-
 testcases/kernel/syscalls/getxattr/getxattr01.c    |    4 ++--
 testcases/kernel/syscalls/mq_open/mq_open01.c      |    2 +-
 .../syscalls/mq_timedreceive/mq_timedreceive01.c   |    2 +-
 .../kernel/syscalls/mq_timedsend/mq_timedsend01.c  |    2 +-
 testcases/kernel/syscalls/mq_unlink/mq_unlink01.c  |    2 +-
 testcases/kernel/syscalls/nftw/nftw.c              |    8 ++++----
 testcases/kernel/syscalls/nftw/nftw64.c            |    8 ++++----
 .../kernel/syscalls/rt_sigaction/rt_sigaction01.c  |    3 +--
 .../kernel/syscalls/rt_sigaction/rt_sigaction02.c  |    2 +-
 .../kernel/syscalls/rt_sigaction/rt_sigaction03.c  |    2 +-
 .../kernel/syscalls/socketpair/socketpair02.c      |    4 ++--
 18 files changed, 30 insertions(+), 30 deletions(-)

-- 
1.7.9.5
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to