Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp682633pxb; Tue, 19 Oct 2021 10:43:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA8yHNz1d3W9QfAWGTlGIcoFYtMDrCFUJ7z4rVDFCG1pXslB25Oy8GoKFkAScLlw7D+vMm X-Received: by 2002:a05:6402:4311:: with SMTP id m17mr55217173edc.368.1634665439662; Tue, 19 Oct 2021 10:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634665439; cv=none; d=google.com; s=arc-20160816; b=vfQaka5lnqkbGqyY4JrXFUYVW7FqTk+A+oSE21NiVjgv7UTbefG/3pZZMH4QlSHzRQ JM4mGG8ghq/Ma5UfT/1k00wrj4yHMrbGatmX4BfV2FAC/J05fecr0ipwm/21PtE4zt+0 BmFqNNNflgWLe/V5RmYaRMm7klQVr9vWCTvrSUrDRBSlKXEBNqXROtCsbKFiBr9ad77A ZttTTXG8JZhzAIxUFIWi6EEjJNhikLBu9dQNZgDHNXXNfscjbFPTNBqrtndBuAV4IYZD 3U93w2KlzyJrOos0Q/XdDWBGDuZzLqB0BMYBzgwwRlZzTCHmn+m/1AJQv9W+/4n3FupE Hj6g== 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=aIh9saArreNJuwW89Ey0XiYCdKVw/+DI3nSpmQ+KnZk=; b=flIoiwvdjs4rYxrpyO6C761NzR6oZ9N+VTTIoBdPY/5c7Z7eATTInkkZGum4vDvp8y Rz6srIa/pgKDRn7/aY2kYc+Q808OMWI33T9mjluqNIhF8PSJrF+pv3cR5ryJVtCf1xpB DXhTio+We3vWCuQw6U2UUbBhJlH8/eIr/zU75gmLmMX+VNwR4n0I4T78fQ1jALGPvm4Q CQ+4Bwu219Q5I/y7faWP1xWNUL1PlsBy0LNxxHD5Zy2qLnaoIfplTf7pRllB7NalXu4F 7AR0qPwboe+ANh0gxAbciWGENqp04KfSpIJFhIoorFArEKZcLSDiKtsUSz4W28doVWB3 AdKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ac840SZ2; 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 f2si31563604edl.338.2021.10.19.10.43.35; Tue, 19 Oct 2021 10:43:59 -0700 (PDT) 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=ac840SZ2; 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 S231235AbhJSRld (ORCPT + 99 others); Tue, 19 Oct 2021 13:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234682AbhJSRlc (ORCPT ); Tue, 19 Oct 2021 13:41:32 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD732C06161C for ; Tue, 19 Oct 2021 10:39:19 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id w17so2336979plg.9 for ; Tue, 19 Oct 2021 10:39:19 -0700 (PDT) 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=aIh9saArreNJuwW89Ey0XiYCdKVw/+DI3nSpmQ+KnZk=; b=ac840SZ2tQBDysEKUu7JIgqu1DXb/RmqyWhcj5aO2bQsaec36NNyRrw7pYE264Aa5l ATGTgHvDix/PMVU1JKvrbhcYkr/KC0TuyK0mc0cZsv0vE8aS45RLJ7LeCGNTf2ZL5jHF CtNvMW1dAFALRT2gpeSywg6F+zzVhW27ths3n7cj1blOPf0uhWRHx8WQ46UcNTEYeJG5 o93i0WIbyL1I799Q/TWI7/IdN8iBKZVJboon555BYJ70EVm9zaDXiwwzQ+4ypc7/9cBd MExoZJwoUrefvgA+q+ufCjpadLgSVqkmusnSlVWXff5wAxkYRN/G09drV2SwbBce4Mpf xvOw== 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=aIh9saArreNJuwW89Ey0XiYCdKVw/+DI3nSpmQ+KnZk=; b=OeswjmUZ1/vyHQzHaF8gJ1NLypqMa9q3Fzh0w9UOtz3j0O0Zt2NDYraHdY4H18RVge 3MC73iqCutAY1Jcg+1JBFkN8Om3zEM0Ii0lakoE0qDt49HBYk9xOvN3RvUcTNO+xAiVg nAFWxOfZiWExo9Ai8/Vet8DQhlN7hQZmP9IEYb344BzDlCtxpiv9sRucZniRpxkD1aPm arHXMAFJ0/AMW/GMIVGYsmVEEfgyin0rT7JSZqnw4EBkFBoa+QEWhuJ8m3kzMU95rTlC i/WvMrJoXER4Lac6n6OnIoThIqoLQcYcTa3vizrzq0ZQGmhzmhJGOuKu0cyh5LCUb45X 1Oxw== X-Gm-Message-State: AOAM5330XT531f/wrSxsPqqSi/VB799lQxv81UoEf/+KCEXz3vtisARG rCc3cmzekcZsB94+NsfoTJCZRA== X-Received: by 2002:a17:90a:414c:: with SMTP id m12mr1388141pjg.187.1634665159309; Tue, 19 Oct 2021 10:39:19 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id d23sm3386554pjx.4.2021.10.19.10.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 10:39:17 -0700 (PDT) Date: Tue, 19 Oct 2021 11:39:15 -0600 From: Mathieu Poirier To: Arnaud Pouliquen Cc: Bjorn Andersson , Ohad Ben-Cohen , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Rob Herring , Christoph Hellwig , Stefano Stabellini , Bruce Ashfield Subject: Re: [RFC PATCH 3/7] remoteproc: Remove vdev_to_rvdev and vdev_to_rproc from remoteproc API Message-ID: <20211019173915.GA3340362@p14s> References: <20211001101234.4247-1-arnaud.pouliquen@foss.st.com> <20211001101234.4247-4-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001101234.4247-4-arnaud.pouliquen@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Good morning, On Fri, Oct 01, 2021 at 12:12:30PM +0200, Arnaud Pouliquen wrote: > These both functions are only used by the remoteproc_virtio. s/"These both functions"/"Both of these functions" > There is no reason to expose them in the API. > Move the functions in remoteproc_virtio.c > > Signed-off-by: Arnaud Pouliquen > --- > drivers/remoteproc/remoteproc_virtio.c | 12 ++++++++++++ > include/linux/remoteproc.h | 12 ------------ > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c > index 5e5a78b3243f..c9eecd2f9fb2 100644 > --- a/drivers/remoteproc/remoteproc_virtio.c > +++ b/drivers/remoteproc/remoteproc_virtio.c > @@ -25,6 +25,18 @@ > > #include "remoteproc_internal.h" > > +static struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) > +{ > + return container_of(vdev->dev.parent, struct rproc_vdev, dev); > +} > + > +static struct rproc *vdev_to_rproc(struct virtio_device *vdev) > +{ > + struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); > + > + return rvdev->rproc; > +} > + > static int copy_dma_range_map(struct device *to, struct device *from) > { > const struct bus_dma_region *map = from->dma_range_map, *new_map, *r; > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 83c09ac36b13..e0600e1e5c17 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -684,18 +684,6 @@ int rproc_coredump_add_custom_segment(struct rproc *rproc, > void *priv); > int rproc_coredump_set_elf_info(struct rproc *rproc, u8 class, u16 machine); > > -static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) > -{ > - return container_of(vdev->dev.parent, struct rproc_vdev, dev); > -} > - > -static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) > -{ > - struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); > - > - return rvdev->rproc; > -} > - > void rproc_add_subdev(struct rproc *rproc, struct rproc_subdev *subdev); > > void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev); > -- > 2.17.1 >