* PATCH] i2c: stm32f7: Use str_on_off() helper
@ 2025-06-23 12:31 long.yunjian
2025-06-26 11:24 ` Alain Volmat
2025-06-26 20:55 ` Andi Shyti
0 siblings, 2 replies; 3+ messages in thread
From: long.yunjian @ 2025-06-23 12:31 UTC (permalink / raw)
To: pierre-yves.mordret
Cc: alain.volmat, andi.shyti, mcoquelin.stm32, alexandre.torgue,
linux-i2c, linux-stm32, linux-arm-kernel, linux-kernel, mou.yi,
xu.lifeng1, ouyang.maochun, fang.yumeng
From: Yumeng Fang <fang.yumeng@zte.com.cn>
Remove hard-coded strings by using the str_on_off() helper.
Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
---
drivers/i2c/busses/i2c-stm32f7.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index e4aaeb2262d0..ef15475a7ee1 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -34,6 +34,7 @@
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include "i2c-stm32.h"
@@ -722,7 +723,7 @@ static int stm32f7_i2c_setup_timing(struct stm32f7_i2c_dev *i2c_dev,
dev_dbg(i2c_dev->dev, "I2C Rise(%i) and Fall(%i) Time\n",
setup->rise_time, setup->fall_time);
dev_dbg(i2c_dev->dev, "I2C Analog Filter(%s), DNF(%i)\n",
- (i2c_dev->analog_filter ? "On" : "Off"), i2c_dev->dnf);
+ str_on_off(i2c_dev->analog_filter), i2c_dev->dnf);
i2c_dev->bus_rate = setup->speed_freq;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: PATCH] i2c: stm32f7: Use str_on_off() helper
2025-06-23 12:31 PATCH] i2c: stm32f7: Use str_on_off() helper long.yunjian
@ 2025-06-26 11:24 ` Alain Volmat
2025-06-26 20:55 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Alain Volmat @ 2025-06-26 11:24 UTC (permalink / raw)
To: long.yunjian
Cc: pierre-yves.mordret, andi.shyti, mcoquelin.stm32,
alexandre.torgue, linux-i2c, linux-stm32, linux-arm-kernel,
linux-kernel, mou.yi, xu.lifeng1, ouyang.maochun, fang.yumeng
Hi,
thank you for your patch.
On Mon, Jun 23, 2025 at 08:31:44PM +0800, long.yunjian@zte.com.cn wrote:
> From: Yumeng Fang <fang.yumeng@zte.com.cn>
>
> Remove hard-coded strings by using the str_on_off() helper.
>
> Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
> ---
> drivers/i2c/busses/i2c-stm32f7.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index e4aaeb2262d0..ef15475a7ee1 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -34,6 +34,7 @@
> #include <linux/regmap.h>
> #include <linux/reset.h>
> #include <linux/slab.h>
> +#include <linux/string_choices.h>
>
> #include "i2c-stm32.h"
>
> @@ -722,7 +723,7 @@ static int stm32f7_i2c_setup_timing(struct stm32f7_i2c_dev *i2c_dev,
> dev_dbg(i2c_dev->dev, "I2C Rise(%i) and Fall(%i) Time\n",
> setup->rise_time, setup->fall_time);
> dev_dbg(i2c_dev->dev, "I2C Analog Filter(%s), DNF(%i)\n",
> - (i2c_dev->analog_filter ? "On" : "Off"), i2c_dev->dnf);
> + str_on_off(i2c_dev->analog_filter), i2c_dev->dnf);
>
> i2c_dev->bus_rate = setup->speed_freq;
>
Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Regards,
Alain
> --
> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH] i2c: stm32f7: Use str_on_off() helper
2025-06-23 12:31 PATCH] i2c: stm32f7: Use str_on_off() helper long.yunjian
2025-06-26 11:24 ` Alain Volmat
@ 2025-06-26 20:55 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2025-06-26 20:55 UTC (permalink / raw)
To: long.yunjian
Cc: pierre-yves.mordret, alain.volmat, mcoquelin.stm32,
alexandre.torgue, linux-i2c, linux-stm32, linux-arm-kernel,
linux-kernel, mou.yi, xu.lifeng1, ouyang.maochun, fang.yumeng
Hi Yumeng,
On Mon, Jun 23, 2025 at 08:31:44PM +0800, long.yunjian@zte.com.cn wrote:
> From: Yumeng Fang <fang.yumeng@zte.com.cn>
>
> Remove hard-coded strings by using the str_on_off() helper.
>
> Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
merged to i2c/i2c-host.
Thanks,
Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-26 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 12:31 PATCH] i2c: stm32f7: Use str_on_off() helper long.yunjian
2025-06-26 11:24 ` Alain Volmat
2025-06-26 20:55 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox