All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Staging: Replace ternary operators with macros min/max
@ 2016-02-23 15:47 Bhumika Goyal
  2016-02-23 15:47 ` [PATCH v2 1/5] Staging: rtl8723au: Use min macro instead of ternary operator Bhumika Goyal
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-23 15:47 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

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



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

end of thread, other threads:[~2016-02-26 10:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 15:47 [PATCH v2 0/5] Staging: Replace ternary operators with macros min/max Bhumika Goyal
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

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.