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

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

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


Bhumika Goyal (5):
  Staging: rtl8723au: Use macro min_t instead of ternary operator
  Staging: rdma: Use macro min_t instead of ternary operator
  Staging: gdm724x: Use min_t instead of ternary operator
  Staging: lustre: Use min_t and max_t instead of ternary operator
  Staging: rts5208: Use min_t 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] 11+ messages in thread

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 10:45 [PATCH 0/5] Staging: Replace ternary operators with min_t/max_t Bhumika Goyal
2016-02-22 10:45 ` [PATCH 1/5] Staging: rtl8723au: Use macro min_t instead of ternary operator Bhumika Goyal
2016-02-22 10:45 ` [PATCH 2/5] Staging: rdma: " Bhumika Goyal
2016-02-22 10:45 ` [PATCH 3/5] Staging: gdm724x: Use " Bhumika Goyal
2016-02-22 10:45 ` [PATCH 4/5] Staging: lustre: Use min_t or max_t " Bhumika Goyal
2016-02-22 12:40   ` [Outreachy kernel] " Julia Lawall
2016-02-22 13:33     ` Bhumika Goyal
2016-02-22 21:10   ` Greg KH
2016-02-23  3:43     ` Bhumika Goyal
2016-02-22 10:45 ` [PATCH 5/5] Staging: rts5208: Use min_t " Bhumika Goyal
2016-02-22 21:11 ` [Outreachy kernel] [PATCH 0/5] Staging: Replace ternary operators with min_t/max_t Greg KH

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.