From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH v3 0/3] staging: lustre: libcfs: Use swap() and do some cleanups
Date: Wed, 24 Feb 2016 03:12:54 +0530 [thread overview]
Message-ID: <cover.1456263289.git.amitoj1606@gmail.com> (raw)
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
next reply other threads:[~2016-02-23 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 21:42 Amitoj Kaur Chawla [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1456263289.git.amitoj1606@gmail.com \
--to=amitoj1606@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.