All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhumika Goyal <bhumirks@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH v2 0/5] Staging: Replace ternary operators with macros min/max
Date: Tue, 23 Feb 2016 21:17:15 +0530	[thread overview]
Message-ID: <cover.1456241358.git.bhumirks@gmail.com> (raw)

This patchset replaces ternary operators with macros min/max as
they are shorter and thus increases code readability. Macro min returns
the minimum and macro max returns maximum  of the two compared values.
Made a semantic patch for changes:

@@
type T;
T x;
T y;
@@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Changes in v2:
* Use min()/max() instead of min_t()/max_t() as the values passed in the 
  macros are of same type.

Bhumika Goyal (5):
  Staging: rtl8723au: Use min macro instead of ternary operator
  Staging: rdma: Use min macro instead of ternary operator
  Staging: gdm724x: Use min instead of ternary operator
  Staging: lustre: Use min or max instead of ternary operator
  Staging: rts5208: Use min instead of ternary operator

 drivers/staging/gdm724x/gdm_mux.c                   |  2 +-
 drivers/staging/lustre/lustre/include/lustre_disk.h |  6 ++----
 drivers/staging/lustre/lustre/osc/osc_request.c     |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/events.c       |  2 +-
 drivers/staging/rdma/hfi1/pio_copy.c                |  6 +++---
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c   | 14 +++++++-------
 drivers/staging/rts5208/sd.c                        |  4 ++--
 7 files changed, 17 insertions(+), 19 deletions(-)

-- 
1.9.1



             reply	other threads:[~2016-02-23 15:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 15:47 Bhumika Goyal [this message]
2016-02-23 15:47 ` [PATCH v2 1/5] Staging: rtl8723au: Use min macro instead of ternary operator Bhumika Goyal
2016-02-23 15:47 ` [PATCH v2 2/5] Staging: rdma: " Bhumika Goyal
2016-02-23 15:47 ` [PATCH v2 3/5] Staging: gdm724x: Use min " Bhumika Goyal
2016-02-23 15:47 ` [PATCH v2 4/5] Staging: lustre: Use min or max " Bhumika Goyal
2016-02-26  6:18   ` [Outreachy kernel] " Greg KH
2016-02-23 15:47 ` [PATCH v2 5/5] Staging: rts5208: Use min " Bhumika Goyal
2016-02-26 10:04 ` [PATCH v3 0/5] Staging: Replace ternary operators with macros min/max Bhumika Goyal
2016-02-26 10:04   ` [PATCH v3 1/5] Staging: rtl8723au: Use min macro instead of ternary operator Bhumika Goyal
2016-02-26 10:04   ` [PATCH v3 2/5] Staging: rdma: " Bhumika Goyal
2016-02-26 10:04   ` [PATCH v3 3/5] Staging: gdm724x: Use min " Bhumika Goyal
2016-02-26 10:04   ` [PATCH v3 4/5] Staging: lustre: Use min or max " Bhumika Goyal
2016-02-26 10:04   ` [PATCH v3 5/5] Staging: rts5208: Use min " Bhumika Goyal

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.1456241358.git.bhumirks@gmail.com \
    --to=bhumirks@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.