From: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
To: Mark Brown <broonie@kernel.org>
Cc: <agross@kernel.org>, <andersson@kernel.org>,
<konrad.dybcio@linaro.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <vkoul@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>,
<quic_msavaliy@quicinc.com>, <dianders@chromium.org>,
<mka@chromium.org>, <swboyd@chromium.org>,
<quic_vtanuku@quicinc.com>
Subject: Re: [PATCH 2/2] spi: spi-qcom-qspi: Add DMA mode support
Date: Wed, 12 Apr 2023 22:57:48 +0530 [thread overview]
Message-ID: <0eb8dbab-c76b-771f-5a99-3e548ec55731@quicinc.com> (raw)
In-Reply-To: <af2db163-9ab2-4efc-af55-933d2cc4c747@sirena.org.uk>
On 4/12/2023 9:42 PM, Mark Brown wrote:
> On Wed, Apr 12, 2023 at 08:59:06PM +0530, Vijaya Krishna Nivarthi wrote:
>> On 4/6/2023 8:58 PM, Mark Brown wrote:
>>>>>> + if (ctrl->xfer.dir == QSPI_READ)
>>>>>> + byte_ptr = (uint8_t *)xfer->rx_buf;
>>>>>> + else
>>>>>> + byte_ptr = (uint8_t *)xfer->tx_buf;
>>>>> If we need to cast to or from void * there's some sort of problem.
>>>> the tx_buf is a const void*
>>>> in v2 I will cast for tx_buf only?
>>> Or just keep byte_ptr as const - we're not modifying it are we?
>> We are modifying it, hence did cast for tx_buf only
> If it's being modified won't that upset the callers that thought it was
> const and didn't expect the data to change?
I believe callers wouldn't be upset.
The byte_ptr is being modified (incremented)
It is initialised to tx_buf (a const*) and keeps getting incremented to
parse data.
No data change.
That should be ok?
next prev parent reply other threads:[~2023-04-12 17:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 18:03 [PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi Vijaya Krishna Nivarthi
2023-04-04 18:03 ` [PATCH 1/2] arm64: dts: qcom: sc7280: Add stream-id of qspi to iommus Vijaya Krishna Nivarthi
2023-04-04 18:19 ` Krzysztof Kozlowski
2023-04-12 15:28 ` Vijaya Krishna Nivarthi
2023-04-04 18:03 ` [PATCH 2/2] spi: spi-qcom-qspi: Add DMA mode support Vijaya Krishna Nivarthi
2023-04-04 18:17 ` Mark Brown
2023-04-06 14:53 ` Vijaya Krishna Nivarthi
2023-04-06 15:28 ` Mark Brown
2023-04-12 15:29 ` Vijaya Krishna Nivarthi
2023-04-12 16:12 ` Mark Brown
2023-04-12 17:27 ` Vijaya Krishna Nivarthi [this message]
2023-04-04 20:45 ` Stephen Boyd
2023-04-12 15:28 ` Vijaya Krishna Nivarthi
2023-04-04 22:05 ` kernel test robot
2023-04-04 20:30 ` [PATCH 0/2] spi: Add DMA mode support to spi-qcom-qspi Stephen Boyd
2023-04-12 15:28 ` Vijaya Krishna Nivarthi
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=0eb8dbab-c76b-771f-5a99-3e548ec55731@quicinc.com \
--to=quic_vnivarth@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mka@chromium.org \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_vtanuku@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®