* [PATCH v2] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init()
@ 2023-07-12 11:22 Minjie Du
2023-07-12 15:02 ` Andi Shyti
0 siblings, 1 reply; 3+ messages in thread
From: Minjie Du @ 2023-07-12 11:22 UTC (permalink / raw)
To: Wolfram Sang, Andi Shyti, open list:I2C SUBSYSTEM HOST DRIVERS,
open list
Cc: opensource.kernel, Minjie Du
Make IS_ERR() judge the debugfs_create_dir() function return.
Signed-off-by: Minjie Du <duminjie@vivo.com>
v1-v2:
Fix judge typo.
---
drivers/i2c/busses/i2c-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index e5a5b9e8b..545927b96 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -265,7 +265,7 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
*/
if (!i2c_gpio_debug_dir) {
i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
- if (!i2c_gpio_debug_dir)
+ if (IS_ERR(i2c_gpio_debug_dir))
return;
}
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init()
2023-07-12 11:22 [PATCH v2] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init() Minjie Du
@ 2023-07-12 15:02 ` Andi Shyti
[not found] ` <1e809b1e-16ec-3e2c-1ced-f50a78811131@web.de>
0 siblings, 1 reply; 3+ messages in thread
From: Andi Shyti @ 2023-07-12 15:02 UTC (permalink / raw)
To: Minjie Du
Cc: Wolfram Sang, open list:I2C SUBSYSTEM HOST DRIVERS, open list,
opensource.kernel
Hi Minje,
On Wed, Jul 12, 2023 at 07:22:22PM +0800, Minjie Du wrote:
> Make IS_ERR() judge the debugfs_create_dir() function return.
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
>
> v1-v2:
> Fix judge typo.
Please next time add the changelog after the "---" section.
You will also need:
Fixes: 14911c6f48ec ("i2c: gpio: add fault injector")
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <stable@vger.kernel.org> # v4.16+
Said that:
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Andi
> ---
> drivers/i2c/busses/i2c-gpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> index e5a5b9e8b..545927b96 100644
> --- a/drivers/i2c/busses/i2c-gpio.c
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -265,7 +265,7 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev)
> */
> if (!i2c_gpio_debug_dir) {
> i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL);
> - if (!i2c_gpio_debug_dir)
> + if (IS_ERR(i2c_gpio_debug_dir))
> return;
> }
>
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init()
[not found] ` <1e809b1e-16ec-3e2c-1ced-f50a78811131@web.de>
@ 2023-07-12 21:53 ` Andi Shyti
0 siblings, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2023-07-12 21:53 UTC (permalink / raw)
To: Markus Elfring
Cc: Minjie Du, linux-i2c, kernel-janitors, opensource.kernel, LKML,
Wolfram Sang
Hi Markus,
On Wed, Jul 12, 2023 at 08:30:11PM +0200, Markus Elfring wrote:
> > > v1-v2:
> > > Fix judge typo.
> >
> > Please next time add the changelog after the "---" section.
> >
> > You will also need:
> >
> > Fixes: 14911c6f48ec ("i2c: gpio: add fault injector")
> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Cc: <stable@vger.kernel.org> # v4.16+
> >
> > Said that:
> >
> > Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
>
> * How appropriate is your presentation of this tag “in advance”?
1. These are all things that can be fixed before pushing the
patch. I Wouldn't feel like asking to resend for a Fixes tag
and few minor adjustments in the commit log, because:
1a. it's spam in the mailing list
1b. it annoys the person who sent the fix and demotivates him
to send more fixes
but more important:
1c. I learned that tools like b4 are able to take the Fixes:
tag even afterwards. I had this same discussion just
today[*].
2. This is quite a common practice in other communities. However,
with Wolfram we agreed that I wouldn't r-b "in advance" after
asking minor fixes in the patch (but not in the commit log).
> * Would you like to take another look at the properties for
> the reviewer's statement of oversight?
>
> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n542
>
>
> Would a subject like “[PATCH v3] i2c: gpio: Fix an error check in i2c_gpio_fault_injector_init()”
> be more appropriate?
Every community has its own rules. I met both the approaches,
that's why I wouldn't be so strict. I'm sure Minjie will be able
to fix those mistakes in the future.
Said that... Minjie, do you mind sending a v3 with the commit log
fixed and all the proper tags and make everyone happy? :)
Andi
[*] https://lore.kernel.org/all/32ca3740-901c-47f2-81ab-c51e8751eefe@sirena.org.uk/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-12 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 11:22 [PATCH v2] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init() Minjie Du
2023-07-12 15:02 ` Andi Shyti
[not found] ` <1e809b1e-16ec-3e2c-1ced-f50a78811131@web.de>
2023-07-12 21:53 ` [v2] " Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).