From: Amit Tomer <amittomer25@gmail.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: "Andre Przywara" <andre.przywara@arm.com>,
"Andreas Färber" <afaerber@suse.de>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
dan.j.williams@intel.com, cristian.ciocaltea@gmail.com,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-actions@lists.infradead.org
Subject: Re: [PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA engine
Date: Tue, 30 Jun 2020 23:44:06 +0530 [thread overview]
Message-ID: <CABHD4K8y-3LTnp-UnFRvP4vocpJYpVZ8iH4r_+BmsQSVUDScyA@mail.gmail.com> (raw)
In-Reply-To: <20200630142427.GP2599@vkoul-mobl>
Hi,
On Tue, Jun 30, 2020 at 7:54 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 30-06-20, 15:17, Amit Tomer wrote:
> > Hi Vinod,
> >
> > On Mon, Jun 29, 2020 at 3:22 PM Vinod Koul <vkoul@kernel.org> wrote:
> >
> > > If you use of_device_get_match_data() you will not fall into this :)
> >
> > But again, of_device_get_match_data() returns void *, and we need
> > "uintptr_t" in order to type cast it properly (at-least without
> > warning).
>
> Not really, you can cast from void * to you own structure.. btw why do
> you need uintptr_t?
uintptr_t allows us to cast to an integer type that matches with enum
in terms of size, and
clang is happy about it (no more such warnings).
> The problem is a pointer to enum conversion :) I think the right way
> would be to do would be below
>
> soc_type = (enum foo)of_device_get_match_data(dev);
>
> or
> soc_type = (unsigned long) of_device_get_match_data(dev);
>
> which I think should be fine in gcc, but possibly give you above warning
Yeah, GCC is always fine with it.
> in clang.. but i thought that was fixed in clang https://reviews.llvm.org/D75758
Thanks for pointing this out.
To be honest, I thought clang had brought something important which is
missed by GCC (via emitting this warning)
that needed to be fixed in Kernel code.
But looking at this commit[1], feeling that CLANG people just wanted
to be compatible with GCC, and
in that situation why should one believe the clang ?
[1]: https://github.com/ClangBuiltLinux/llvm-project/commit/4fd4438882cc7f78e56e147d52d9a1f63b58ba81
Thanks
-Amit
next prev parent reply other threads:[~2020-06-30 18:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 10:17 [PATCH v4 00/10] Add MMC and DMA support for Actions S700 Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 01/10] dmaengine: Actions: get rid of bit fields from dma descriptor Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA engine Amit Singh Tomar
2020-06-24 6:15 ` Vinod Koul
2020-06-24 9:35 ` André Przywara
2020-06-29 8:28 ` Amit Tomer
2020-06-29 9:54 ` Vinod Koul
2020-06-29 11:19 ` André Przywara
2020-06-29 13:21 ` Vinod Koul
2020-06-29 8:19 ` Amit Tomer
2020-06-29 9:52 ` Vinod Koul
2020-06-30 9:47 ` Amit Tomer
2020-06-30 14:24 ` Vinod Koul
2020-06-30 18:14 ` Amit Tomer [this message]
2020-06-09 10:17 ` [PATCH v4 03/10] clk: actions: Add MMC clock-register reset bits Amit Singh Tomar
2020-06-09 11:29 ` kernel test robot
2020-06-09 10:17 ` [PATCH v4 04/10] arm64: dts: actions: limit address range for pinctrl node Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 05/10] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Amit Singh Tomar
2020-06-17 21:16 ` Rob Herring
2020-06-09 10:17 ` [PATCH v4 06/10] arm64: dts: actions: Add DMA Controller for S700 Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 07/10] dt-bindings: reset: s700: Add binding constants for mmc Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 08/10] dt-bindings: mmc: owl: add compatible string actions,s700-mmc Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 09/10] arm64: dts: actions: Add MMC controller support for S700 Amit Singh Tomar
2020-06-09 10:17 ` [PATCH v4 10/10] arm64: dts: actions: Add uSD support for Cubieboard7 Amit Singh Tomar
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=CABHD4K8y-3LTnp-UnFRvP4vocpJYpVZ8iH4r_+BmsQSVUDScyA@mail.gmail.com \
--to=amittomer25@gmail.com \
--cc=afaerber@suse.de \
--cc=andre.przywara@arm.com \
--cc=cristian.ciocaltea@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-actions@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.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;
as well as URLs for NNTP newsgroup(s).