Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3378392pxb; Mon, 17 Jan 2022 19:03:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOqMn3KLjo94aFwpJP9rUchXpmfGjeFTcAFPIPcP9sDjGXhlR5SJ8FvJrqCMAYWTa4rRtC X-Received: by 2002:a17:90b:4c11:: with SMTP id na17mr33076629pjb.206.1642475039483; Mon, 17 Jan 2022 19:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475039; cv=none; d=google.com; s=arc-20160816; b=uunuTjcbK1tLV0hXtrP/sylcRKKyUaVKOH4zR7ojYR6aOM/LfR2Ffi+tb0d2Kzl0GC diby/0yOGTDY+TIpOR6mOiUN24vRNtdGlZHtifjVYHkSENGCt5/sldC4ZD2+mkhaUOZt MQscRvSBWijd/0VTJmHN0NroIfBO7DgTwU7A4SYs5+iCsmQHvYSnJu6/0EC9cjW/IPhW SbwY0hldoyugMaBmOEb+QEEh6qLh9Z7ux8Q42c/SSpZ9qa8dDwHQANA1BpSFZEwsQql7 WN63HM+AOY9gc9E9uKKsWMjBk/2M/lhCAHgXip7du5r6UiXS6Rm+E/tvmfnx7y1xCT9F K4qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JgHdHThslfW8cWYgVZ7DrTIIbA1uJdRWFcKirFlKvos=; b=JlYVNlGgMViWmCGLEZrGzlF2KfbJx7nEozAGBSfD5OWbbxVkLcg7vU4vP5uS5BnO5a fmNyWvhTR5PvG4s+VFtgSaJgrWTXaDmaRNV+gpJq/ULe2UHMyumnfnmUuAp2fMg2muiO BotlD0IrssQOncW1d8d0+f+hbCAQtLogohNDhbi2ewx7s+Bf2V+c1kc2XlCdYAjDQr7P +4aPfJy8AsUlaGA2kzijiCWkqJkYu2b74DnE1zAstdM8BHYFhR65JBA+EH0vwiZbTiOj I5p6JC9RSYn7GMoQMD3nYCaKLCgSfizJa23HQ8c17Vn9CX0dtJSUHKAWoe19fTPH9O+H nURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MhsS8EUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si16405887pgi.128.2022.01.17.19.03.46; Mon, 17 Jan 2022 19:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MhsS8EUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243692AbiAQWz0 (ORCPT + 99 others); Mon, 17 Jan 2022 17:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbiAQWzY (ORCPT ); Mon, 17 Jan 2022 17:55:24 -0500 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24879C06161C for ; Mon, 17 Jan 2022 14:55:24 -0800 (PST) Received: by mail-oi1-x230.google.com with SMTP id s127so25790102oig.2 for ; Mon, 17 Jan 2022 14:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JgHdHThslfW8cWYgVZ7DrTIIbA1uJdRWFcKirFlKvos=; b=MhsS8EUXaQkCE2tOPqkbsGLNOXTZAO7ApasVgwy+ZLjMTQjBRQiRCevhCsEQ5z2C3A JbDvrP3ZnTPkV9o+F+EZ+1UR9S3NirPjX+R1yryE5LszoaLRj3mDwhFk2nE5TNEJ+mj4 rgs4ye7Lw1BKcgI/lesO+wW8DTEEw18UZIfB6rRiYvXHfPBJh0d0q5hDYci0KEd3nrMo ymaw8anHdpPEytqUGi5AsuqFD7MVJQg2grITha+UpLkPtDTRe3IZh0ozAPrwf74z6xJL i+NQoi23Cw6Kr6Pw8+n583FvCE5xTjE54YqA1b6zAq5a/IJqWrRKon2rvk/QjggCWPla BgGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JgHdHThslfW8cWYgVZ7DrTIIbA1uJdRWFcKirFlKvos=; b=jeD5TIa3WOemqaL/YRpKU0n0IAg0dCvNnwNhHuHNVk335ogwVeMpoo3SFkjZQZ5y4R Cb21WNYy3ShEVoagdlHYDQBbgj/2EHL28jgMUF320ZKNVtXM9DmpJrDLh34rUX7aNg4E FQeRudjlEtJ90KGhjqHuB8OD31zdf83jhH/JGxJa9DHrVp2AIkOZcrspuYA2d4ccHIZm MYBNxMcqsjhlle43JUOC/fimkPNkqrPM0IVMLYYpd6KuknPkFtK6II9mvgtohsADLLdK FzHmpUHSl4rbvLjgyKdTDzWeBGb5RgipifIJtVWyUXcJKYX74GyymeyMzqnZiMAvUu5G fYpg== X-Gm-Message-State: AOAM5339MfoXQ9TwRcNvORFevxlLkwDDSxQeVV57SU186P+7B6eEJXBT RMJ60w4p0FvrNv3Xj/eQwjdQ2Q== X-Received: by 2002:a05:6808:1148:: with SMTP id u8mr3297802oiu.19.1642460123552; Mon, 17 Jan 2022 14:55:23 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id k10sm7443332oil.36.2022.01.17.14.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 14:55:22 -0800 (PST) Date: Mon, 17 Jan 2022 16:55:21 -0600 From: Bjorn Andersson To: Arnaud Pouliquen Cc: Mathieu Poirier , 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 Message-ID: References: <20211207080843.21222-1-arnaud.pouliquen@foss.st.com> <20211207080843.21222-4-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211207080843.21222-4-arnaud.pouliquen@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Regards, Bjorn