All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nfc: Use str_yes_no() and str_low_high() helper
@ 2025-06-19  9:34 Qianfeng Rong
  2025-06-19  9:34 ` [PATCH 1/2] nfc: fdp: Use str_yes_no() helper Qianfeng Rong
  2025-06-19  9:34 ` [PATCH 2/2] nfc: pn544: Use str_low_high() helper Qianfeng Rong
  0 siblings, 2 replies; 5+ messages in thread
From: Qianfeng Rong @ 2025-06-19  9:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Qianfeng Rong, Uwe Kleine-König,
	Jakub Kicinski, Al Viro, netdev, linux-kernel
  Cc: opensource.kernel

Remove hard-coded strings by using the str_yes_no() and str_low_high()
helper functions.

Qianfeng Rong (2):
  nfc: fdp: Use str_yes_no() helper
  nfc: pn544: Use str_low_high() helper

 drivers/nfc/fdp/i2c.c   | 3 ++-
 drivers/nfc/pn544/i2c.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.34.1


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

* [PATCH 1/2] nfc: fdp: Use str_yes_no() helper
  2025-06-19  9:34 [PATCH 0/2] nfc: Use str_yes_no() and str_low_high() helper Qianfeng Rong
@ 2025-06-19  9:34 ` Qianfeng Rong
  2025-06-19  9:34 ` [PATCH 2/2] nfc: pn544: Use str_low_high() helper Qianfeng Rong
  1 sibling, 0 replies; 5+ messages in thread
From: Qianfeng Rong @ 2025-06-19  9:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Qianfeng Rong, Uwe Kleine-König,
	Jakub Kicinski, Al Viro, netdev, linux-kernel
  Cc: opensource.kernel

Remove hard-coded strings by using the str_yes_no() helper
function.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 drivers/nfc/fdp/i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c
index c1896a1d978c..a7c65e9bb5a2 100644
--- a/drivers/nfc/fdp/i2c.c
+++ b/drivers/nfc/fdp/i2c.c
@@ -12,6 +12,7 @@
 #include <linux/nfc.h>
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
+#include <linux/string_choices.h>
 #include <net/nfc/nfc.h>
 #include <net/nfc/nci_core.h>
 
@@ -265,7 +266,7 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev,
 
 alloc_err:
 	dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s",
-		*clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no");
+		*clock_type, *clock_freq, str_yes_no(*fw_vsc_cfg != NULL));
 }
 
 static const struct acpi_gpio_params power_gpios = { 0, 0, false };
-- 
2.34.1


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

* [PATCH 2/2] nfc: pn544: Use str_low_high() helper
  2025-06-19  9:34 [PATCH 0/2] nfc: Use str_yes_no() and str_low_high() helper Qianfeng Rong
  2025-06-19  9:34 ` [PATCH 1/2] nfc: fdp: Use str_yes_no() helper Qianfeng Rong
@ 2025-06-19  9:34 ` Qianfeng Rong
  2025-06-19 17:33   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 5+ messages in thread
From: Qianfeng Rong @ 2025-06-19  9:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Qianfeng Rong, Uwe Kleine-König,
	Jakub Kicinski, Al Viro, netdev, linux-kernel
  Cc: opensource.kernel

Remove hard-coded strings by using the str_low_high() helper
function.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 drivers/nfc/pn544/i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index a0dfb3f98d5a..8fc9552b9d30 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -16,7 +16,7 @@
 #include <linux/nfc.h>
 #include <linux/firmware.h>
 #include <linux/gpio/consumer.h>
-
+#include <linux/string_choices.h>
 #include <linux/unaligned.h>
 
 #include <net/nfc/hci.h>
@@ -212,7 +212,7 @@ static void pn544_hci_i2c_platform_init(struct pn544_i2c_phy *phy)
 			if (ret == count) {
 				nfc_info(&phy->i2c_dev->dev,
 					 "nfc_en polarity : active %s\n",
-					 (polarity == 0 ? "low" : "high"));
+					 str_low_high(polarity == 0));
 				goto out;
 			}
 		}
-- 
2.34.1


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

* Re: [PATCH 2/2] nfc: pn544: Use str_low_high() helper
  2025-06-19  9:34 ` [PATCH 2/2] nfc: pn544: Use str_low_high() helper Qianfeng Rong
@ 2025-06-19 17:33   ` Krzysztof Kozlowski
  2025-06-20  2:01     ` Qianfeng Rong
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-19 17:33 UTC (permalink / raw)
  To: Qianfeng Rong, Uwe Kleine-König, Jakub Kicinski, Al Viro,
	netdev, linux-kernel
  Cc: opensource.kernel

On 19/06/2025 11:34, Qianfeng Rong wrote:
> Remove hard-coded strings by using the str_low_high() helper
> function.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>  drivers/nfc/pn544/i2c.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

No need to make it one change per patch... but anyway look at netdev
responses for that such changes.

Best regards,
Krzysztof

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

* Re: [PATCH 2/2] nfc: pn544: Use str_low_high() helper
  2025-06-19 17:33   ` Krzysztof Kozlowski
@ 2025-06-20  2:01     ` Qianfeng Rong
  0 siblings, 0 replies; 5+ messages in thread
From: Qianfeng Rong @ 2025-06-20  2:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Uwe Kleine-König, Jakub Kicinski,
	Al Viro, netdev, linux-kernel
  Cc: opensource.kernel


在 2025/6/20 1:33, Krzysztof Kozlowski 写道:
> On 19/06/2025 11:34, Qianfeng Rong wrote:
>> Remove hard-coded strings by using the str_low_high() helper
>> function.
>>
>> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
>> ---
>>   drivers/nfc/pn544/i2c.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
> No need to make it one change per patch... but anyway look at netdev
> responses for that such changes.
>
> Best regards,
> Krzysztof

Thanks for your reminder, I can release v2 if necessary.

Best regards,
Qianfeng


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

end of thread, other threads:[~2025-06-20  2:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19  9:34 [PATCH 0/2] nfc: Use str_yes_no() and str_low_high() helper Qianfeng Rong
2025-06-19  9:34 ` [PATCH 1/2] nfc: fdp: Use str_yes_no() helper Qianfeng Rong
2025-06-19  9:34 ` [PATCH 2/2] nfc: pn544: Use str_low_high() helper Qianfeng Rong
2025-06-19 17:33   ` Krzysztof Kozlowski
2025-06-20  2:01     ` Qianfeng Rong

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.