Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1736984pxu; Tue, 24 Nov 2020 07:46:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNv/7RKuAp2e1b+xEI8q2tug4GGiaHdlR4+HKnDMaX37HOQTKtyVFJmywxoY8rNi1R9czs X-Received: by 2002:a05:6402:1804:: with SMTP id g4mr4653705edy.7.1606232776991; Tue, 24 Nov 2020 07:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606232776; cv=none; d=google.com; s=arc-20160816; b=ahkPa8QYAReSAiMj7t0ONF7ebm2TCvwaBKWrAJ8avCy+vlbJGryQiNSAv3eMVlBA12 /D1mD+GbZfrhH2vBoPNc8qfp8vmkqmNgmazkpy7pMNITnoPYCsD4ocbW9QujXD2GCfHU NhojIQ1f3ekzFDV+EqjkmnxS1tU76r8pJvH4lA7+wsGaz501XdQyY/eWrzG/RL/R4G4O XH2avLxTeSCui/ohhLFA0yGvM/AcZ4SHaHuu0YBzKwrNE41ThA7U0Gzwc0BINfdWAs7x rwqGiSFnVFAKeXyBn/JH/fiKNDM8Srs+Acxw3gBdRlXfZOFz4XmYl2xTgsfAo317Focm CZCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=wGQAm/Habl7BLWd6IdQBk99pbaAhlMirh4N9+XF5FO4=; b=pJ86AnCy8W+wfWdIGw43LxCrRHa43jslgdbPBoCJ5zeDcT0el39fjWadZ5Rn2/CiVN eXiVYzBzwGBUT8E8y8FiozjQrWrny0JBFOyCkJBOs6+ie6WU8KB78Y/E0eUF3d1+wISK YHLN7EMgXXJxrIluuiGuAl03P8WRnyjyJtXmcTTjALVJPJczwCxayqcKDb8GFgSMzo1S 95MwlUkUlOjcdv6ivrB+mEhul8PVGmviUwKMvxWhL3AUDhkIgJ11uyoQHHYjQwKnsLTk /fVOXE96efAlqcZfLzkDrAFjj1Q6GixiF+f/GfEm6wSpLcfsLN4aqVUbnW5oZHI7JZo3 Hm2g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb20si9025311ejc.664.2020.11.24.07.45.52; Tue, 24 Nov 2020 07:46:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389738AbgKXPnE (ORCPT + 99 others); Tue, 24 Nov 2020 10:43:04 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:45209 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389529AbgKXPnE (ORCPT ); Tue, 24 Nov 2020 10:43:04 -0500 Received: by mail-ot1-f66.google.com with SMTP id k3so19721228otp.12; Tue, 24 Nov 2020 07:43:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wGQAm/Habl7BLWd6IdQBk99pbaAhlMirh4N9+XF5FO4=; b=jRBI85/ik5ZhX0H1lSDYU7Ofc4BaNpjTonvBs+UBoLZ2LkUrm33IciRnhkncW7XVHs Y6RN+Dsdkl53p1lIhIJTl87HCSr7gQXjnliWeBrahekcaG9W0EVyCWz7bC+2rCWoXflQ /j75okeCTn7s3hXTHaER3t5iMUkIHZFZnHZSjaZX7bcISpdP6aN9OVmtXObu2qo6CIWh KaZAXvIYltdsM9sVnJ7a/DkvzvefttO3PR4HzhMv59P/ZtTEPCP8cVRNhrghSU47EiY4 Vicy5j7AxuVPROXeLU+UYfnd8X+S168fVMP0MCi4cJQuWtVmZ4/h17X+uUqx0iQfddIi pB8A== X-Gm-Message-State: AOAM5321KCrj07O9theDu2cGTYm8u8mcbCm6xBzqtt0/DAbOP7WCN2Pm COqZimxkW4z/0XKwWGnzXXmb85WwSmyMcPpPtZ0= X-Received: by 2002:a05:6830:210a:: with SMTP id i10mr3727469otc.145.1606232583214; Tue, 24 Nov 2020 07:43:03 -0800 (PST) MIME-Version: 1.0 References: <20201124112552.26377-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20201124112552.26377-3-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20201124112552.26377-3-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Tue, 24 Nov 2020 16:42:52 +0100 Message-ID: Subject: Re: [PATCH 2/5] memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline To: Lad Prabhakar Cc: Krzysztof Kozlowski , Philipp Zabel , Jiri Kosina , Mark Brown , Linux Kernel Mailing List , Linux-Renesas , Biju Das , Prabhakar , Sergei Shtylyov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On Tue, Nov 24, 2020 at 12:27 PM Lad Prabhakar wrote: > Define rpcif_enable_rpm() and rpcif_disable_rpm() as static > inline in the header instead of exporting it. > > Suggested-by: Pavel Machek > Signed-off-by: Lad Prabhakar Thanks for your patch, which is an improvement. > --- a/include/memory/renesas-rpc-if.h > +++ b/include/memory/renesas-rpc-if.h > @@ -10,6 +10,7 @@ > #ifndef __RENESAS_RPC_IF_H > #define __RENESAS_RPC_IF_H > > +#include > #include > > enum rpcif_data_dir { > @@ -77,11 +78,19 @@ struct rpcif { > > int rpcif_sw_init(struct rpcif *rpc, struct device *dev); > void rpcif_hw_init(struct rpcif *rpc, bool hyperflash); > -void rpcif_enable_rpm(struct rpcif *rpc); > -void rpcif_disable_rpm(struct rpcif *rpc); > void rpcif_prepare(struct rpcif *rpc, const struct rpcif_op *op, u64 *offs, > size_t *len); > int rpcif_manual_xfer(struct rpcif *rpc); > ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf); > > +static inline void rpcif_enable_rpm(struct rpcif *rpc) > +{ > + pm_runtime_enable(rpc->dev); > +} > + > +static inline void rpcif_disable_rpm(struct rpcif *rpc) > +{ > + pm_runtime_put_sync(rpc->dev); Looking at how this is used, this should call pm_runtime_disable() instead. And probably this should be moved inside the core RPC-IF driver: 1. pm_runtime_enable() could be called from rpcif_sw_init(), 2. pm_runtime_put_sync() can be called from a new rpc_sw_deinit() function, to be called by the SPI and MTD drivers on probe failure and on remove. > +} Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds