Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1120779pxb; Fri, 1 Oct 2021 04:05:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2rAUQkyGLo0R3Vs+IPGpclDnoWfFmSjLpk2RpmTtIwetm+JsOSYLc/Tm9AQcUOzg8Xiny X-Received: by 2002:a17:902:7590:b0:13d:c5d4:1b29 with SMTP id j16-20020a170902759000b0013dc5d41b29mr9267392pll.36.1633086320827; Fri, 01 Oct 2021 04:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633086320; cv=none; d=google.com; s=arc-20160816; b=ZDqn1rvXGgj8PXohLidoJLpzrY001L+qlfHUpvo5vGwuQd1NvoaBRmDZmdzg5M0gqi l5nyYokwrrJFZOq8OGnE8Bz9i4VUmSriWXJ1Q0neNfJ8GdsHARCjl3TFrUO9uzA8zX8j zPi92gqS3FUAtScq87bTYcD79qzAsB5x2n9HysMZKZRUqE9y78n4eP5tw7W2QnbDupje k7YXYp3q5Y/1KknW30lVnr2VFaZj8HcgJBivrd4hl0XKkXcW7EDOpC3Xx6NhGOG4NMSF P9VB3ufnw0j+b6SICx1KXCVL1ZuFKlr4nbnyAkSB1h/TuiTECdTDv3hmFmaKWAIY9hS4 FpQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zRbhdB+toguxYDHOMlJ+jXPLzLlUhANjFvRiywkPkb8=; b=0n0dS0AqR8rkB3I5FObzKzSnzvqc53vbmUlQSSBOpVbYN0UhZ9Y4Fcsvus2OL+YnsE 7tSMl41CtuZBSdykdiUmO9DVwunOej0WKlY8ScWZWbc17rX7XY5o7WNSdwgzaKFOEL+A UgDaTbO9sRvgNrNEWUg8cuOLMSoO4lhCr9ATcMeDgz6vg7M1g/NwteN41/XA8gTaP0Qg yCP3n+qDhv7mpPuE4OHhlqz1rdZjkS1T/jvEKbRx+xVwqJutB4P2uHsh4toY5Iids3H0 TpbdeSAh0WH+w40pbd5lIcjoU2Kr4aFw0Ws0Mro7rZvZGKDYyU4ls/1CKrjIj7cwXueM YvLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=mneJCka3; 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 i124si7199726pfb.89.2021.10.01.04.05.05; Fri, 01 Oct 2021 04:05:20 -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=@foss.st.com header.s=selector1 header.b=mneJCka3; 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 S1353497AbhJAKOp (ORCPT + 99 others); Fri, 1 Oct 2021 06:14:45 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:45712 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353453AbhJAKOi (ORCPT ); Fri, 1 Oct 2021 06:14:38 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1918NLNV032017; Fri, 1 Oct 2021 12:12:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=zRbhdB+toguxYDHOMlJ+jXPLzLlUhANjFvRiywkPkb8=; b=mneJCka3x2IWFOG0/vFtYVRITDdvIUaq3obZnm7Xz30bcXx1B5ruveRKmAnCXVJKnez+ e9sVwfuY1NwfTTivUuzjR91YxkknH4EpST4H2jXSLpYLJP+aCvGK1FVruD0b3pWObO97 4vXlBhu2d+1zFlQmfuNWUIUdEZbBAYbm7LXx5E2IrSsPZBQt/imSjXgCP5TFx5VoAVnW sDsEhiELnJoFHE/FiKXL+7uJril/ekgJypJics+ZW+wRDiY1Zsgt13QJfIhtf6XSr6tY Ygs7jbif/wHVnEr5DmJNwfqvFW4pBtbIVXeaeVZgAgJvM15gjWHWCAp7np9uxg0XG20/ Xg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bds9njb50-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Oct 2021 12:12:46 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7BB84100034; Fri, 1 Oct 2021 12:12:46 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6FDCE226FDD; Fri, 1 Oct 2021 12:12:46 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 1 Oct 2021 12:12:45 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier CC: , , , Rob Herring , Christoph Hellwig , Stefano Stabellini , Bruce Ashfield , Subject: [RFC PATCH 3/7] remoteproc: Remove vdev_to_rvdev and vdev_to_rproc from remoteproc API Date: Fri, 1 Oct 2021 12:12:30 +0200 Message-ID: <20211001101234.4247-4-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211001101234.4247-1-arnaud.pouliquen@foss.st.com> References: <20211001101234.4247-1-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-01_01,2021-09-30_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These both functions are only used by the remoteproc_virtio. 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