linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Alain Volmat <alain.volmat@st.com>
Cc: pierre-yves.mordret@st.com, alexandre.torgue@st.com,
	linux-i2c@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, fabrice.gasnier@st.com
Subject: Re: [PATCH v2 1/2] i2c: smbus: add core function handling SMBus host-notify
Date: Sun, 26 Jul 2020 15:35:51 +0200	[thread overview]
Message-ID: <20200726133551.GC16169@ninjato> (raw)
In-Reply-To: <20200725202733.GA946@kunai>

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]


> > +void i2c_free_slave_host_notify_device(struct i2c_client *client)
> > +{
> > +	i2c_slave_unregister(client);
> > +	kfree(client->dev.platform_data);
> > +	i2c_unregister_device(client);
> > +}
> > +EXPORT_SYMBOL_GPL(i2c_free_slave_host_notify_device);
> 
> Sidenote: With my recent series "i2c: slave: improve sanity checks when
> un-/registering" this code became NULL-safe (and IS_ERR safe, too).

Stupid me, it is not NULL safe. The functions are. But, we deregister
'client' on our own. It probably makes sense to add some sanity checking
of the parameters of the exported functions.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-26 13:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 11:36 [PATCH v2 0/2] i2c: stm32: add host-notify support via i2c slave Alain Volmat
2020-07-03 11:36 ` [PATCH v2 1/2] i2c: smbus: add core function handling SMBus host-notify Alain Volmat
2020-07-25 20:27   ` Wolfram Sang
2020-07-26 13:35     ` Wolfram Sang [this message]
2020-07-28 12:10     ` Alain Volmat
2020-07-28 16:36       ` Wolfram Sang
2020-08-02 19:15       ` Wolfram Sang
2020-07-03 11:36 ` [PATCH v2 2/2] i2c: stm32f7: Add SMBus Host-Notify protocol support Alain Volmat

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=20200726133551.GC16169@ninjato \
    --to=wsa@kernel.org \
    --cc=alain.volmat@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=pierre-yves.mordret@st.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).