From: Arnaud POULIQUEN <arnaud.pouliquen@foss.st.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
<linux-remoteproc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<julien.massot@iot.bzh>
Subject: Re: [PATCH v8 03/13] rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl
Date: Tue, 18 Jan 2022 11:44:31 +0100 [thread overview]
Message-ID: <cffe6884-2059-d1e7-7dfd-37c852924959@foss.st.com> (raw)
In-Reply-To: <YeXz2SFqYr+eUvnw@builder.lan>
Hello Bjorn,
On 1/17/22 11:55 PM, Bjorn Andersson wrote:
> On Tue 07 Dec 02:08 CST 2021, Arnaud Pouliquen wrote:
>> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
> [..]
>> -static void rpmsg_ctrldev_release_device(struct device *dev)
>> -{
>> - struct rpmsg_ctrldev *ctrldev = dev_to_ctrldev(dev);
>> -
>> - ida_simple_remove(&rpmsg_ctrl_ida, dev->id);
>> - ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt));
>> - cdev_del(&ctrldev->cdev);
>> - kfree(ctrldev);
>> -}
>> -
>> -static int rpmsg_chrdev_probe(struct rpmsg_device *rpdev)
>> -{
>> - struct rpmsg_ctrldev *ctrldev;
>> - struct device *dev;
>> - int ret;
>> -
>> - ctrldev = kzalloc(sizeof(*ctrldev), GFP_KERNEL);
>> - if (!ctrldev)
>> - return -ENOMEM;
>> -
>> - ctrldev->rpdev = rpdev;
>> -
>> - dev = &ctrldev->dev;
>> - device_initialize(dev);
>> - dev->parent = &rpdev->dev;
>> - dev->class = rpmsg_class;
>> -
>> - cdev_init(&ctrldev->cdev, &rpmsg_ctrldev_fops);
>> - ctrldev->cdev.owner = THIS_MODULE;
>> -
>> - ret = ida_simple_get(&rpmsg_minor_ida, 0, RPMSG_DEV_MAX, GFP_KERNEL);
>> - if (ret < 0)
>> - goto free_ctrldev;
>> - dev->devt = MKDEV(MAJOR(rpmsg_major), ret);
>> -
>> - ret = ida_simple_get(&rpmsg_ctrl_ida, 0, 0, GFP_KERNEL);
>> - if (ret < 0)
>> - goto free_minor_ida;
>> - dev->id = ret;
>> - dev_set_name(&ctrldev->dev, "rpmsg_ctrl%d", ret);
>> -
>> - ret = cdev_add(&ctrldev->cdev, dev->devt, 1);
>
> This turns out to be incomplete and the cdev_del above is in the wrong
> place. This, and the same for eptdev, is being corrected in:
>
> https://lore.kernel.org/linux-remoteproc/164245960510.1698571.4998090450663669237.b4-ty@linaro.org/T/#t
I will rebase on next branch including this patchset
Thanks,
Arnaud
>
> Regards,
> Bjorn
>
next prev parent reply other threads:[~2022-01-18 10:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 8:08 [PATCH v8 00/13] Restructure the rpmsg_char driver and introduce rpmsg_ctrl driver Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 01/13] rpmsg: char: Export eptdev create an destroy functions Arnaud Pouliquen
2022-01-17 22:32 ` Bjorn Andersson
2021-12-07 8:08 ` [PATCH v8 02/13] rpmsg: Create the rpmsg class in core instead of in rpmsg char Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 03/13] rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl Arnaud Pouliquen
2022-01-17 22:55 ` Bjorn Andersson
2022-01-18 10:44 ` Arnaud POULIQUEN [this message]
2021-12-07 8:08 ` [PATCH v8 04/13] arm: configs: Configs that had RPMSG_CHAR now get RPMSG_CTRL Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 05/13] RISC-V: " Arnaud Pouliquen
2021-12-07 8:16 ` Anup Patel
2021-12-07 8:08 ` [PATCH v8 06/13] arm64: defconfig: Config that had RPMSG_CHAR now gets RPMSG_CTRL Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 07/13] rpmsg: Update rpmsg_chrdev_register_device function Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 08/13] rpmsg: char: Refactor rpmsg_chrdev_eptdev_create function Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 09/13] rpmsg: Introduce rpmsg_create_default_ept function Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 10/13] rpmsg: char: Add possibility to use default endpoint of the rpmsg device Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 11/13] rpmsg: char: Introduce the "rpmsg-raw" channel Arnaud Pouliquen
2022-01-17 23:03 ` Bjorn Andersson
2022-01-18 11:04 ` Arnaud POULIQUEN
2022-01-18 14:36 ` Bjorn Andersson
2022-01-18 17:27 ` Arnaud POULIQUEN
2021-12-07 8:08 ` [PATCH v8 12/13] rpmsg: ctrl: Introduce new RPMSG_CREATE/RELEASE_DEV_IOCTL controls Arnaud Pouliquen
2021-12-07 8:08 ` [PATCH v8 13/13] rpmsg: core: Send a ns announcement when a default endpoint is created Arnaud Pouliquen
2022-01-10 8:48 ` [PATCH v8 00/13] Restructure the rpmsg_char driver and introduce rpmsg_ctrl driver Arnaud POULIQUEN
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=cffe6884-2059-d1e7-7dfd-37c852924959@foss.st.com \
--to=arnaud.pouliquen@foss.st.com \
--cc=bjorn.andersson@linaro.org \
--cc=julien.massot@iot.bzh \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mathieu.poirier@linaro.org \
/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
all inboxes | Powered by JetHome®