Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1102913pxb; Thu, 4 Mar 2021 03:25:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPcU2T5AsqfUZbJ6bx1o0m+drhCU1bLt0XFLIm6O90ZREfd2eTztLcqwpGDOerkjpUSbjx X-Received: by 2002:a17:906:398a:: with SMTP id h10mr3767977eje.155.1614857132913; Thu, 04 Mar 2021 03:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614857132; cv=none; d=google.com; s=arc-20160816; b=gFKHtDjBXeOp/OxVcTcPIn6c93gLNcVF1scew4xJjr9QMbpzdPhpRYgk8ASWly9lHU 3Y1jiK1Pi4QNeQ0fFj4XF3IkGzjGJwRscw/1+gOa6WAX4GsrcYqKkcFNd2aFNma73Ho/ 6zv6/CesyL5tm0N1JV2oa14CLv/TAZqA7t/x20AmeiyEBzg1KQ9h+TCy4bY9i1gd/94i lcGiKsLB7r8Paxkn8GrK1sOVfKQMHMuYbGuMXoAVqg5eyXe53loJFJEyM7tbU3x7MZtg 0dHrN4J1sFi404hcCFU4YjcffYx5SzbR2J4gDXTvsvKHxQTOPT/gackaUdh3hGett73J 2r8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=vRm8bwSPJgkfRJocoNDq21I3g5Iz0nJ0Oe0Q61WfJaE=; b=v7d0O09EZa3IUH3rgwRltGgiiCMoE+2DeeJYB+PdX/gOor/lR+u5LGIqYMY/9Oqe1N uatgev37zI0ekHZJIHGkkjUqMOHICN6ixnjK5QOeIAj+Brm/cgamUipEUYbfwBPkoTcB pR7brITjCHlobHjGFq8jPkK3oBKOc+guwLOyNbQKWAMMtpu7nQzy+wKn5jnbyolBQNk9 mdGWs3Sn0lKtOXTRHVKgchgVvDg8s9o7d6UZMTBsLBqx89FrK+rwiy5EgUMJDQqG/Zme FN+0xKjha1V0UhOrEimlQ+HO1mujW6AM4y0y1hf27miCcH0zcV+FDnvNGAiL2lTCE3pp uyFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Jz78D8Je; 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=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si17055949ejd.543.2021.03.04.03.25.08; Thu, 04 Mar 2021 03:25:32 -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=@foss.st.com header.s=selector1 header.b=Jz78D8Je; 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=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1577890AbhCCSBT (ORCPT + 99 others); Wed, 3 Mar 2021 13:01:19 -0500 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:47973 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351065AbhCCPAe (ORCPT ); Wed, 3 Mar 2021 10:00:34 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 123EvxNC032645; Wed, 3 Mar 2021 15:58:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=vRm8bwSPJgkfRJocoNDq21I3g5Iz0nJ0Oe0Q61WfJaE=; b=Jz78D8JecEgrynfgvqJwgZDMncQ3IQHrqilHhKgppgkEMIS9nbQ+Q9kfz5XH3qSHZify e3jbIVkB5iAtMFDOA9IDjh8VBzQjpYKLJkDoRYPR8HvoJWzOdC9YZfxFqNDHmzwtfMLs iItOsRpTfQQv5FS7c/yuM230YiLWgb88Cnr8ZyddTOmqNks/arW7mDV4JjCIsS6RZ/8V Fv94O8VprG0ITZVq/G83RL+HlWwAtoc3+8r2XGa2Ra7WltIPSdnqTJ1bPGd87RPtEcyu R0Oth4y6gxSNenacFrkSBSQHMqpCme4YHzzxVkkeoT4+MKYvUZKY+L4WPCkVTAkfMoA9 HA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36yfc41huy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Mar 2021 15:58:59 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B12A2100038; Wed, 3 Mar 2021 15:58:58 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 21FE025F403; Wed, 3 Mar 2021 15:58:58 +0100 (CET) Received: from lmecxl0889.lme.st.com (10.75.127.46) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 3 Mar 2021 15:58:57 +0100 Subject: Re: [PATCH v5 05/16] rpmsg: char: dissociate the control device from the rpmsg class To: Mathieu Poirier CC: Bjorn Andersson , Ohad Ben-Cohen , Andy Gross , , , , References: <20210219111501.14261-1-arnaud.pouliquen@foss.st.com> <20210219111501.14261-6-arnaud.pouliquen@foss.st.com> <20210302180111.GB3791957@xps15> From: Arnaud POULIQUEN Message-ID: <21d27324-3735-ee93-f3aa-813475b64b93@foss.st.com> Date: Wed, 3 Mar 2021 15:58:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210302180111.GB3791957@xps15> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-03_04:2021-03-03,2021-03-03 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/2/21 7:01 PM, Mathieu Poirier wrote: > On Fri, Feb 19, 2021 at 12:14:50PM +0100, Arnaud Pouliquen wrote: >> The RPMsg control device is a RPMsg device, it is already >> referenced in the RPMsg bus. There is only an interest to >> reference the ept char devices in the rpmsg class. >> This patch prepares the code split of the control and end point >> devices in two separate files. >> >> Signed-off-by: Arnaud Pouliquen >> --- >> drivers/rpmsg/rpmsg_char.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c >> index 78a6d19fdf82..23e369a00531 100644 >> --- a/drivers/rpmsg/rpmsg_char.c >> +++ b/drivers/rpmsg/rpmsg_char.c >> @@ -485,7 +485,6 @@ static int rpmsg_chrdev_probe(struct rpmsg_device *rpdev) >> dev = &ctrldev->dev; >> device_initialize(dev); >> dev->parent = &rpdev->dev; >> - dev->class = rpmsg_class; > > This may break user space... It has been around for so long that even if the > information is redundant we have to keep it. Yes, this point is part of the grey space of my series... I did it on the assumption that the "rpmsg" class interface is not used for the control part. Indeed, the group associated to the class provides information about the name service, the source address and the destination address of the endpoint.These group is not defined for the control device. That said, to preserve the interface, I can move the class creation in rpmsg control driver, to share it between the both drivers. As consequence I will need to manage the probe ordering of the char and control modules to ensure that the class is created before used. This should be solved by reintroducing patch[1] with a fix for the compilation warning. [1]https://lkml.org/lkml/2021/2/4/197 Thanks, Arnaud > >> >> cdev_init(&ctrldev->cdev, &rpmsg_ctrldev_fops); >> ctrldev->cdev.owner = THIS_MODULE; >> -- >> 2.17.1 >>