All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] staging: lustre: libcfs: Use swap() and do some cleanups
@ 2016-02-23 21:42 Amitoj Kaur Chawla
  2016-02-23 21:42 ` [PATCH v3 1/3] staging: lustre: libcfs: Use swap() in cfs_hash_bd_order() Amitoj Kaur Chawla
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amitoj Kaur Chawla @ 2016-02-23 21:42 UTC (permalink / raw)
  To: outreachy-kernel

Use swap() function instead of using a temporary variable for swapping
two variables.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
type T;
T a,b,c;
@@
- a = b;
- b = c;
- c = a;
+ swap(b, c);
//<smpl>

Additionally, cleanup if-else statement block.

Amitoj Kaur Chawla (3):
  staging: lustre: libcfs: Use swap() in cfs_hash_bd_order()
  staging: lustre: libcfs: Remove unnecessary braces
  staging: lustre: libcfs: Remove comparison with zero

Changes in v3:
        -In Patch 1/3 corrected spelling in a comment.
Changes in v2:
        -Divided one patch into a series.

 drivers/staging/lustre/lustre/libcfs/hash.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-23 21:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 21:42 [PATCH v3 0/3] staging: lustre: libcfs: Use swap() and do some cleanups Amitoj Kaur Chawla
2016-02-23 21:42 ` [PATCH v3 1/3] staging: lustre: libcfs: Use swap() in cfs_hash_bd_order() Amitoj Kaur Chawla
2016-02-23 21:43 ` [PATCH v3 3/3] staging: lustre: libcfs: Remove comparison with zero Amitoj Kaur Chawla
2016-02-23 21:43 ` [PATCH v3 2/3] staging: lustre: libcfs: Remove unnecessary braces Amitoj Kaur Chawla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.