Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3969940pxb; Tue, 17 Nov 2020 08:08:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaJpXo1vmvZu6Q3sYZ7oebTmKYraq/3zS3Fh5/h608WNuuWhiMB3h7NXzClc1X0kuM1rJW X-Received: by 2002:adf:db0f:: with SMTP id s15mr240894wri.354.1605629306987; Tue, 17 Nov 2020 08:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605629306; cv=none; d=google.com; s=arc-20160816; b=Zd3TH9MqrN5j4X+s9yGOsDSITuADjC6waqVFvHUODulpZtpjr3FMMBgA6v6jaZtQ01 QISz9b18+72E/HrpQX7Bn9NEd0M3sgXq0+XjzLFSfG+bb/aW7h8beU6Z/ZVTwgERTHE/ LqZiWWeFQ4eWnwLMYsmzxRYbMxGuGno8XuoKD7bpuAzUaWQPu/o77861SJzHMrNJz3Eq Qo94CH95rSQa/L7BmDGFXvV2LNR81tyD1MujLFA5x4EpKXuKHvpDw2SZ4/qgD8EwPqNY 9sxuN71Lh/SaWwsM4kFUlJThF8dvVILIk+GVDTLEmKo2bt73UsrM7DxF4JjVphSPqKUa 4HrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=D2QGGMg2PKhPr/4AkG4b7TABhIgpWhPHFiAfnUwX4s0=; b=WVEPQLfnTCyJNxHFnjpEmIJw3HDg3gadfW6ZP6P70zJ5mfW359udoIJ867PVT3GV7U v8SON+SJcM+LqWfXwpL0GDJWWrgYu0omFJF+WcW+kXHdQ+ObX8QiL1MNcpsyGyTewHKB Zlmj4xYVz/wGpDdXdoaPqGCVIZoheRsFd/4LJc/5nuJMQfWBlgsx4hqjYcIh97bj2kag SEp4Q7g1QmcObsu5ovvw/cL0H1ok7ybMgqY2bAxyg+fkpBKGDYEd/eN2NXAqD/2NXvOz fZkXAFDTkoZfIzHDnR3lbd6xDIe2bqzIZ4R/hlZK4Ye/jinT4bDtECWVOzgYznNg/MmS LtpQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 61si14725642edc.400.2020.11.17.08.08.01; Tue, 17 Nov 2020 08:08:26 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726904AbgKQQDn (ORCPT + 99 others); Tue, 17 Nov 2020 11:03:43 -0500 Received: from mga06.intel.com ([134.134.136.31]:58471 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgKQQDn (ORCPT ); Tue, 17 Nov 2020 11:03:43 -0500 IronPort-SDR: sIK4wotKrdYhe6Ui4An37FFZlPAyTE/uaM/mnn0PN1yiALgWBVj4SBe0GHsfmNRm+0EFPucgCp J8gt2n4U1kdw== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="232567101" X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="232567101" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 08:03:42 -0800 IronPort-SDR: MgMJFhvz1WxqBDp0qQDWfbasziMLBzN+LgGtFfziH2qf6LA11nU1BNpLEiRw0szajESBOa5X3Q gCdgNHn3F5Fg== X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="310254823" Received: from gliakhov-mobl2.ger.corp.intel.com (HELO ubuntu) ([10.252.34.253]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 08:03:40 -0800 Date: Tue, 17 Nov 2020 17:03:31 +0100 From: Guennadi Liakhovetski To: Arnaud POULIQUEN Cc: Mathieu Poirier , "ohad@wizery.com" , "bjorn.andersson@linaro.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 8/8] rpmsg: Turn name service into a stand alone driver Message-ID: <20201117160330.GA15538@ubuntu> References: <20201111144942.GA6403@ubuntu> <20201112115115.GA11069@ubuntu> <945f377d-1975-552d-25b2-1dc25d3c3a46@st.com> <2d25d1aa-bd8a-f0db-7888-9f72edc9f687@st.com> <20201116151028.GA1519@ubuntu> <20201116224003.GC3892875@xps15> <50549519-d9ff-9048-a3d8-dab02bfda096@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50549519-d9ff-9048-a3d8-dab02bfda096@st.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 12:42:30PM +0100, Arnaud POULIQUEN wrote: [snip] > diff --git a/drivers/rpmsg/rpmsg_ns.c b/drivers/rpmsg/rpmsg_ns.c > index 5bda7cb44618..80c2cc23bada 100644 > --- a/drivers/rpmsg/rpmsg_ns.c > +++ b/drivers/rpmsg/rpmsg_ns.c > @@ -55,6 +55,39 @@ static int rpmsg_ns_cb(struct rpmsg_device *rpdev, void > *data, int len, > return 0; > } > > +/** > + * rpmsg_ns_register_device() - register name service device based on rpdev > + * @rpdev: prepared rpdev to be used for creating endpoints > + * > + * This function wraps rpmsg_register_device() preparing the rpdev for use as > + * basis for the rpmsg name service device. > + */ > +int rpmsg_ns_register_device(struct rpmsg_device *rpdev) > +{ > +#ifdef MODULES > + int ret; > + struct module *rpmsg_ns; > + > + mutex_lock(&module_mutex); > + rpmsg_ns = find_module(KBUILD_MODNAME); > + mutex_unlock(&module_mutex); > + > + if (!rpmsg_ns) { > + ret = request_module(KBUILD_MODNAME); Is this code requesting the module in which it is located?.. I must be missing something... Thanks Guennadi