From: Alex Elder <elder@linaro.org> To: Arnd Bergmann <arnd@arndb.de> Cc: David Miller <davem@davemloft.net>, Bjorn Andersson <bjorn.andersson@linaro.org>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Networking <netdev@vger.kernel.org>, DTML <devicetree@vger.kernel.org>, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, Linux ARM <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, syadagir@codeaurora.org, mjavid@codeaurora.org, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com> Subject: Re: [RFC PATCH 02/12] soc: qcom: ipa: DMA helpers Date: Tue, 13 Nov 2018 10:33:29 -0600 [thread overview] Message-ID: <7eaef6a8-9d12-31bb-43fb-e710ad171c0f@linaro.org> (raw) In-Reply-To: <CAK8P3a3Hur9Kn=QLrn7XDn-Kpgfta1xTxvuwcBze4n2v7fsULw@mail.gmail.com> On 11/7/18 6:17 AM, Arnd Bergmann wrote: > On Wed, Nov 7, 2018 at 1:33 AM Alex Elder <elder@linaro.org> wrote: >> >> This patch includes code implementing the IPA DMA module, which >> defines a structure to represent a DMA allocation for the IPA device. >> It's used throughout the IPA code. >> >> Signed-off-by: Alex Elder <elder@linaro.org> > > I looked through all the users of this and couldn't fine one that actually > benefits from it. I'd say better drop this patch entirely and open-code > the contents in the callers. That will help readability since the dma > API is well understood by many people. Originally this was done to make it more obvious that all DMA allocations were done with the same device pointer. Previously there were several separate devices, and it wasn't very obvious that only one was used (and required). Now that we're past that it's not difficult to do as you suggest. I have now done that, and in the process identified a few more ways to improve/simplify the code. The net result is that more lines of code were removed than were present in "ipa_dma.[ch]". I see that as a win (aside from your point below). > Generally speaking, try not to wrap Linux interfaces into driver specific > helper functions. Agreed. Thanks a lot for your review. -Alex > > Arnd >
WARNING: multiple messages have this Message-ID (diff)
From: elder@linaro.org (Alex Elder) To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 02/12] soc: qcom: ipa: DMA helpers Date: Tue, 13 Nov 2018 10:33:29 -0600 [thread overview] Message-ID: <7eaef6a8-9d12-31bb-43fb-e710ad171c0f@linaro.org> (raw) In-Reply-To: <CAK8P3a3Hur9Kn=QLrn7XDn-Kpgfta1xTxvuwcBze4n2v7fsULw@mail.gmail.com> On 11/7/18 6:17 AM, Arnd Bergmann wrote: > On Wed, Nov 7, 2018 at 1:33 AM Alex Elder <elder@linaro.org> wrote: >> >> This patch includes code implementing the IPA DMA module, which >> defines a structure to represent a DMA allocation for the IPA device. >> It's used throughout the IPA code. >> >> Signed-off-by: Alex Elder <elder@linaro.org> > > I looked through all the users of this and couldn't fine one that actually > benefits from it. I'd say better drop this patch entirely and open-code > the contents in the callers. That will help readability since the dma > API is well understood by many people. Originally this was done to make it more obvious that all DMA allocations were done with the same device pointer. Previously there were several separate devices, and it wasn't very obvious that only one was used (and required). Now that we're past that it's not difficult to do as you suggest. I have now done that, and in the process identified a few more ways to improve/simplify the code. The net result is that more lines of code were removed than were present in "ipa_dma.[ch]". I see that as a win (aside from your point below). > Generally speaking, try not to wrap Linux interfaces into driver specific > helper functions. Agreed. Thanks a lot for your review. -Alex > > Arnd >
next prev parent reply other threads:[~2018-11-13 16:33 UTC|newest] Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-07 0:32 [RFC PATCH 00/12] net: introduce Qualcomm IPA driver Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 01/12] dt-bindings: soc: qcom: add IPA bindings Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 11:50 ` Arnd Bergmann 2018-11-07 11:50 ` Arnd Bergmann 2018-11-09 22:38 ` Alex Elder 2018-11-09 22:38 ` Alex Elder 2018-11-07 14:59 ` Rob Herring 2018-11-07 14:59 ` Rob Herring 2018-11-09 22:38 ` Alex Elder 2018-11-09 22:38 ` Alex Elder 2018-11-11 1:40 ` Rob Herring 2018-11-11 1:40 ` Rob Herring 2018-11-11 1:40 ` Rob Herring 2018-11-13 16:28 ` Alex Elder 2018-11-13 16:28 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 02/12] soc: qcom: ipa: DMA helpers Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 12:17 ` Arnd Bergmann 2018-11-07 12:17 ` Arnd Bergmann 2018-11-13 16:33 ` Alex Elder [this message] 2018-11-13 16:33 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 03/12] soc: qcom: ipa: generic software interface Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 04/12] soc: qcom: ipa: immediate commands Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 14:36 ` Arnd Bergmann 2018-11-07 14:36 ` Arnd Bergmann 2018-11-13 16:58 ` Alex Elder 2018-11-13 16:58 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 05/12] soc: qcom: ipa: IPA interrupts and the microcontroller Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 06/12] soc: qcom: ipa: QMI modem communication Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 07/12] soc: qcom: ipa: IPA register abstraction Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 15:00 ` Arnd Bergmann 2018-11-07 15:00 ` Arnd Bergmann 2018-11-15 2:48 ` Alex Elder 2018-11-15 2:48 ` Alex Elder 2018-11-15 14:42 ` Arnd Bergmann 2018-11-15 14:42 ` Arnd Bergmann 2018-11-07 0:32 ` [RFC PATCH 08/12] soc: qcom: ipa: utility functions Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 09/12] soc: qcom: ipa: main IPA source file Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 14:08 ` Arnd Bergmann 2018-11-07 14:08 ` Arnd Bergmann 2018-11-15 3:11 ` Alex Elder 2018-11-15 3:11 ` Alex Elder 2018-11-07 0:32 ` [RFC PATCH 10/12] soc: qcom: ipa: data path Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 14:55 ` Arnd Bergmann 2018-11-07 14:55 ` Arnd Bergmann 2018-11-15 3:31 ` Alex Elder 2018-11-15 3:31 ` Alex Elder 2018-11-15 14:48 ` Arnd Bergmann 2018-11-15 14:48 ` Arnd Bergmann 2018-11-07 0:32 ` [RFC PATCH 11/12] soc: qcom: ipa: IPA rmnet interface Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 13:30 ` Arnd Bergmann 2018-11-07 13:30 ` Arnd Bergmann 2018-11-07 15:26 ` Dan Williams 2018-11-07 15:26 ` Dan Williams 2018-11-07 0:32 ` [RFC PATCH 12/12] soc: qcom: ipa: build and "ipa_i.h" Alex Elder 2018-11-07 0:32 ` Alex Elder 2018-11-07 0:40 ` Randy Dunlap 2018-11-07 0:40 ` Randy Dunlap 2018-11-07 0:40 ` Randy Dunlap 2018-11-08 16:22 ` Alex Elder 2018-11-08 16:22 ` Alex Elder 2018-11-07 12:34 ` Arnd Bergmann 2018-11-07 12:34 ` Arnd Bergmann 2018-11-07 15:46 ` [RFC PATCH 00/12] net: introduce Qualcomm IPA driver Arnd Bergmann 2018-11-07 15:46 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7eaef6a8-9d12-31bb-43fb-e710ad171c0f@linaro.org \ --to=elder@linaro.org \ --cc=arnd@arndb.de \ --cc=bjorn.andersson@linaro.org \ --cc=davem@davemloft.net \ --cc=devicetree@vger.kernel.org \ --cc=ilias.apalodimas@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-soc@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=mjavid@codeaurora.org \ --cc=netdev@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=syadagir@codeaurora.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.