All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: lustre: libcfs: Use swap() and do
@ 2016-02-23 14:22 Amitoj Kaur Chawla
  0 siblings, 0 replies; only message in thread
From: Amitoj Kaur Chawla @ 2016-02-23 14:22 UTC (permalink / raw)
  To: outreachy-kernel

some cleanups
Message-ID: <cover.1456236436.git.amitoj1606@gmail.com>
Reply-To: 

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 v2:
        -Divide 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] only message in thread

only message in thread, other threads:[~2016-02-23 14:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 14:22 [PATCH v2 0/3] staging: lustre: libcfs: Use swap() and do 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.