From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-crypto@vger.kernel.org, kernel@pengutronix.de,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] crypto: atmel-ecc - Remove duplicated error reporting in .remove()
Date: Tue, 7 Jun 2022 08:48:44 +0200 [thread overview]
Message-ID: <20220607064844.a6cfpljjowyt3fiz@pengutronix.de> (raw)
In-Reply-To: <20220520172100.773730-1-u.kleine-koenig@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1860 bytes --]
Hello,
On Fri, May 20, 2022 at 07:21:00PM +0200, Uwe Kleine-König wrote:
> Returning an error value in an i2c remove callback results in an error
> message being emitted by the i2c core, but otherwise it doesn't make a
> difference. The device goes away anyhow and the devm cleanups are
> called.
>
> As atmel_ecc_remove() already emits an error message on failure and the
> additional error message by the i2c core doesn't add any useful
> information, change the return value to zero to suppress this message.
>
> Also make the error message a bit more drastical because when the device
> is still busy on remove, it's likely that it will access freed memory
> soon.
>
> This patch is a preparation for making i2c remove callbacks return void.
I want to tackle this (i.e.
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index fbda5ada2afc..066b541a0d5d 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -273,7 +273,7 @@ struct i2c_driver {
/* Standard driver model interfaces */
int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
- int (*remove)(struct i2c_client *client);
+ void (*remove)(struct i2c_client *client);
/* New driver model interface to aid the seamless removal of the
* current probe()'s, more commonly unused than used second parameter.
) directly after the next merge window. That is (depending on Linus's
counting capabilities) after v5.20-rc1. So I ask you to either take this
crypto patch before (my preferred option), or accept that I send it as part
of a bigger series that eventually contains the above hunk and will
probably be merged via the i2c tree.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-07 6:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 13:59 Bug in atmel-ecc driver Uwe Kleine-König
2022-05-17 10:24 ` Uwe Kleine-König
2022-05-17 13:11 ` Tudor.Ambarus
2022-05-17 14:33 ` Uwe Kleine-König
2022-05-18 10:07 ` Tudor.Ambarus
2022-05-18 21:36 ` Uwe Kleine-König
2022-05-20 17:21 ` [PATCH] crypto: atmel-ecc - Remove duplicated error reporting in .remove() Uwe Kleine-König
2022-06-07 6:48 ` Uwe Kleine-König [this message]
2022-06-08 4:33 ` Tudor.Ambarus
2022-06-08 7:04 ` Uwe Kleine-König
2022-06-08 8:35 ` Tudor.Ambarus
2022-06-10 9:14 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220607064844.a6cfpljjowyt3fiz@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=tudor.ambarus@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).