linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/4] Introduce several opposite string choice helpers
@ 2024-08-31  9:58 Hongbo Li
  2024-08-31  9:58 ` [PATCH -next 1/4] lib/string_choices: " Hongbo Li
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Hongbo Li @ 2024-08-31  9:58 UTC (permalink / raw)
  To: kees, andy, willemdebruijn.kernel, jasowang, davem, edumazet,
	kuba, pabeni, akpm
  Cc: linux-hardening, netdev, linux-mm, lihongbo22

Similar to the exists helper: str_enable_disable/
str_enabled_disabled/str_on_off/str_yes_no helpers, we can
add the opposite helpers. That's str_disable_enable,
str_disabled_enabled, str_off_on and str_no_yes.

There are more than 10 cases currently (expect
str_disable_enable now has 3 use cases) exist in the code
can be replaced with these helper.

Patch 1: Introduce the string choice helpers
Patch 2~4: Give the relative use cases to use these helpers.

Hongbo Li (4):
  lib/string_choices: Introduce several opposite string choice helpers
  tun: Make use of str_disabled_enabled helper
  mm: page_alloc: Make use of str_off_on helper
  net: sock: Make use of str_no_yes() helper

 drivers/net/tun.c              | 2 +-
 include/linux/string_choices.h | 4 ++++
 mm/page_alloc.c                | 3 +--
 net/core/sock.c                | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2024-09-04 14:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-31  9:58 [PATCH -next 0/4] Introduce several opposite string choice helpers Hongbo Li
2024-08-31  9:58 ` [PATCH -next 1/4] lib/string_choices: " Hongbo Li
2024-08-31  9:58 ` [PATCH -next 2/4] tun: Make use of str_disabled_enabled helper Hongbo Li
2024-08-31 20:07   ` Jakub Kicinski
2024-09-02  1:27     ` Hongbo Li
2024-09-02  6:10     ` Gal Pressman
2024-09-02 16:11       ` Jakub Kicinski
2024-09-02 10:49     ` Andy Shevchenko
2024-09-02 14:30       ` Willem de Bruijn
2024-09-03  6:25         ` Hongbo Li
2024-09-03 15:09           ` Andy Shevchenko
2024-09-04  2:27             ` Hongbo Li
2024-09-04 14:33               ` Jakub Kicinski
2024-08-31  9:58 ` [PATCH -next 3/4] mm: page_alloc: Make use of str_off_on helper Hongbo Li
2024-08-31  9:58 ` [PATCH net-next 4/4] net: sock: Make use of str_no_yes() helper Hongbo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox