Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp359437iog; Thu, 30 Jun 2022 02:12:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uMusGHvhAbORbpe2cY/vs1WcxjB7VXPuMgQJRNNoHnFcGYQQ016pJv71InZhHq1dXt9wSd X-Received: by 2002:a62:3105:0:b0:51c:b8b9:7965 with SMTP id x5-20020a623105000000b0051cb8b97965mr13771907pfx.65.1656580362265; Thu, 30 Jun 2022 02:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656580362; cv=none; d=google.com; s=arc-20160816; b=sg910trwiQYRt0F/Eq/KD0bT7GtREpH5xOzSRhMOv0EBWI5Axr7zt0FVwO/6nP2oBu ZBJjyBuwi/tigvGE6uE9mZPGSi9OFaARNOyEthINuEJJxN6UrA8nEIfP7pe4bxxRDPOp 4HOIvZgJLfL+kEdQr404Vp+vwgfQD/SIPQedq2JRe0vEZlPR/AklwPB0WwdSuPCJkW1G HfZrV6F4Zw2LHxn0DEUqUwZAOhkba4P4id77pZIA9z7t17tPOTRboLCYDxYR5PnNUXs3 V6ebqDx15qoF/3ki+5oDX6P61fe/YDONY+4Lq7ycRl1GRRVGmorisWavo9K8Uwsdl1o/ GzdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=89fMKXThRMbfnxK3x4C5LtcV95DQSbT+9sICTdF5QyA=; b=sA5j5scVfCPMWE8Ks4TCCobbWC8Ta8kzmO3ESyJqjKbHL02bHfbaFoAMLPgVTqm4eT Efz4KVb/t8nepOgdfpsgaRuGToZrR0fajxfl6EFvmHfjJotLRzT1geWLMOxjmfc0bg/E HgMGLbcVv8hDmRzWLU1wSvzWWf7OyTrY11DDiJwY78nbiRbNS1P4ADhklNrHGorUou1Z v/vm4KvAhVDS3XP2iZOIAh2IC6Nt0D4r9/MYJn9kYiPJxps0qgOrPRv2Aecbh7KToUu8 lkntxCsR1PFRKQwhyiKaohJa8htE6gTMrlN/xRjymw6JkNywy9l5+QrmjlAXsIMAYdUa 52Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KNbtNjU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a056a000ccd00b0051078cc4fd5si1171827pfv.354.2022.06.30.02.12.30; Thu, 30 Jun 2022 02:12:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KNbtNjU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234015AbiF3I7F (ORCPT + 99 others); Thu, 30 Jun 2022 04:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234012AbiF3I7B (ORCPT ); Thu, 30 Jun 2022 04:59:01 -0400 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E037AF585; Thu, 30 Jun 2022 01:58:57 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5DED124000F; Thu, 30 Jun 2022 08:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1656579535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=89fMKXThRMbfnxK3x4C5LtcV95DQSbT+9sICTdF5QyA=; b=KNbtNjU4PuHLFcDfwedq/EcJljUhoSqijcpl2WajqxXPMaPk0wdAbJvjtDaTWp/69E0cXt vY0hMypuvNSQDdpdohMihglIP8Zbw97JEW28DQYGdoqETX/ZdnRYjZ8SLhvKoLw5iROm6t QkYmRgG3tNRSdfm3y1yvadZ7VH42oS+U0huISZ5mLAucGCV9rNYzO1NaWo13HzyHUkJtqO IiXJ3N5sb5qj2ZNzJd7AXcFd+Xz4byy2Aalrz8fwEchtc3pli1tW5g+KcD3YXPnLCkNd9h o94lHBHCKC3KNZV/ZPqD0l2Tgg3jLpTiuYi5RtFfK0rLFWGAnb/2jjCMVfe41A== Date: Thu, 30 Jun 2022 10:58:51 +0200 From: Miquel Raynal To: Krzysztof Kozlowski Cc: Geert Uytterhoeven , Vignesh Raghavendra , Sergey Shtylyov , Wolfram Sang , Lad Prabhakar , Richard Weinberger , Mark Brown , linux-mtd@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] memory: renesas-rpc-if: Pass device instead of rpcif to rpcif_*() Message-ID: <20220630105851.59e12f77@xps-13> In-Reply-To: <2df6673b-6f8d-19c2-90ca-342e3ba72040@linaro.org> References: <20220630092552.68a8b3ff@xps-13> <2df6673b-6f8d-19c2-90ca-342e3ba72040@linaro.org> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, krzysztof.kozlowski@linaro.org wrote on Thu, 30 Jun 2022 10:46:51 +0200: > On 30/06/2022 09:25, Miquel Raynal wrote: > > Hi Krzysztof, > >=20 > > geert+renesas@glider.be wrote on Mon, 27 Jun 2022 17:31:13 +0200: > > =20 > >> Most rpcif_*() API functions do not need access to any other fields in > >> the rpcif structure than the device pointer. Simplify dependencies by > >> passing the device pointer instead. > >> > >> Signed-off-by: Geert Uytterhoeven > >> --- > >> drivers/memory/renesas-rpc-if.c | 32 ++++++++++++++++---------------- > >> drivers/mtd/hyperbus/rpc-if.c | 18 +++++++++--------- =20 > >=20 > > [...] > > =20 > >> diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-= if.c > >> index d00d302434030b20..41734e337ac00e40 100644 > >> --- a/drivers/mtd/hyperbus/rpc-if.c > >> +++ b/drivers/mtd/hyperbus/rpc-if.c > >> @@ -56,7 +56,7 @@ static void rpcif_hb_prepare_read(struct rpcif *rpc,= void *to, > >> op.data.nbytes =3D len; > >> op.data.buf.in =3D to; > >> =20 > >> - rpcif_prepare(rpc, &op, NULL, NULL); > >> + rpcif_prepare(rpc->dev, &op, NULL, NULL); > >> } > >> =20 > >> static void rpcif_hb_prepare_write(struct rpcif *rpc, unsigned long t= o, > >> @@ -70,7 +70,7 @@ static void rpcif_hb_prepare_write(struct rpcif *rpc= , unsigned long to, > >> op.data.nbytes =3D len; > >> op.data.buf.out =3D from; > >> =20 > >> - rpcif_prepare(rpc, &op, NULL, NULL); > >> + rpcif_prepare(rpc->dev, &op, NULL, NULL); > >> } > >> =20 > >> static u16 rpcif_hb_read16(struct hyperbus_device *hbdev, unsigned lo= ng addr) > >> @@ -81,7 +81,7 @@ static u16 rpcif_hb_read16(struct hyperbus_device *h= bdev, unsigned long addr) > >> =20 > >> rpcif_hb_prepare_read(&hyperbus->rpc, &data, addr, 2); > >> =20 > >> - rpcif_manual_xfer(&hyperbus->rpc); > >> + rpcif_manual_xfer(hyperbus->rpc.dev); > >> =20 > >> return data.x[0]; > >> } > >> @@ -94,7 +94,7 @@ static void rpcif_hb_write16(struct hyperbus_device = *hbdev, unsigned long addr, > >> =20 > >> rpcif_hb_prepare_write(&hyperbus->rpc, addr, &data, 2); > >> =20 > >> - rpcif_manual_xfer(&hyperbus->rpc); > >> + rpcif_manual_xfer(hyperbus->rpc.dev); > >> } > >> =20 > >> static void rpcif_hb_copy_from(struct hyperbus_device *hbdev, void *t= o, > >> @@ -105,7 +105,7 @@ static void rpcif_hb_copy_from(struct hyperbus_dev= ice *hbdev, void *to, > >> =20 > >> rpcif_hb_prepare_read(&hyperbus->rpc, to, from, len); > >> =20 > >> - rpcif_dirmap_read(&hyperbus->rpc, from, len, to); > >> + rpcif_dirmap_read(hyperbus->rpc.dev, from, len, to); > >> } > >> =20 > >> static const struct hyperbus_ops rpcif_hb_ops =3D { > >> @@ -130,9 +130,9 @@ static int rpcif_hb_probe(struct platform_device *= pdev) > >> =20 > >> platform_set_drvdata(pdev, hyperbus); > >> =20 > >> - rpcif_enable_rpm(&hyperbus->rpc); > >> + rpcif_enable_rpm(hyperbus->rpc.dev); > >> =20 > >> - error =3D rpcif_hw_init(&hyperbus->rpc, true); > >> + error =3D rpcif_hw_init(hyperbus->rpc.dev, true); > >> if (error) > >> goto out_disable_rpm; > >> =20 > >> @@ -150,7 +150,7 @@ static int rpcif_hb_probe(struct platform_device *= pdev) > >> return 0; > >> =20 > >> out_disable_rpm: > >> - rpcif_disable_rpm(&hyperbus->rpc); > >> + rpcif_disable_rpm(hyperbus->rpc.dev); > >> return error; > >> } =20 > >=20 > > This will only apply on top of mtd/next, because that > > rpcif_disable_rpm() balance call was very recently contributed by Geert: > > https://lore.kernel.org/linux-mtd/f3070e1af480cb252ae183d479a593dbbf947= 685.1655457790.git.geert+renesas@glider.be/ > >=20 > > So we need to first share an immutable tag on the current mtd/next > > branch. Richard, that is my vacation gift for you :) =20 >=20 > I don't want entire mtd/next. I could take Renesas hyperbus specific > commits. I applied this patch a week ago and did not remembered there was a possibly conflicting series aside. > Another solution is me to rebase on some rcX, if that commit > was sent as fix for current cycle. Unfortunately, no. > The third option is to simply resolve a conflict - which should looks > pretty easy and compile-testable. In that case the commit should be > rebased on my v5.19-rc1. I believe it should work. As this is mostly a cleanup, you can also wait 5.20-rc1. Thanks, Miqu=C3=A8l