dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	 Vinod Koul <vkoul@kernel.org>,
	 Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>,
	 Frank Li <Frank.Li@nxp.com>, Rob Herring <robh@kernel.org>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-msm@vger.kernel.org,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 5/5] dmaengine: mmp: Fix again Wvoid-pointer-to-enum-cast warning
Date: Sun, 25 May 2025 21:26:05 +0200	[thread overview]
Message-ID: <20250525-dma-fixes-v1-5-89d06dac9bcb@linaro.org> (raw)
In-Reply-To: <20250525-dma-fixes-v1-0-89d06dac9bcb@linaro.org>

This was fixed and re-introduced.  'type' is an enum, thus cast of
pointer on 64-bit compile test with W=1 causes:

  mmp_tdma.c:644:9: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Fixes: a67ba97dfb30 ("dmaengine: Use device_get_match_data()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/dma/mmp_tdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index c8dc504510f1e325017ba4fa5e7aa72b019e3be4..b7fb843c67a6f247395296fc726f7b6cab7d223f 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -641,7 +641,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
 	int chan_num = TDMA_CHANNEL_NUM;
 	struct gen_pool *pool = NULL;
 
-	type = (enum mmp_tdma_type)device_get_match_data(&pdev->dev);
+	type = (kernel_ulong_t)device_get_match_data(&pdev->dev);
 
 	/* always have couple channels */
 	tdev = devm_kzalloc(&pdev->dev, sizeof(*tdev), GFP_KERNEL);

-- 
2.45.2


  parent reply	other threads:[~2025-05-25 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 19:26 [PATCH 0/5] dmaengine: Minor fixes and cleanups Krzysztof Kozlowski
2025-05-25 19:26 ` [PATCH 1/5] dmaengine: dw-edma: Drop unused dchan2dev() and chan2dev() Krzysztof Kozlowski
2025-05-25 19:26 ` [PATCH 2/5] dmaengine: fsl-dpaa2-qdma: Drop unused mc_enc() Krzysztof Kozlowski
2025-05-25 19:26 ` [PATCH 3/5] dmaengine: qcom: gpi: Drop unused gpi_write_reg_field() Krzysztof Kozlowski
2025-05-25 19:26 ` [PATCH 4/5] dmaengine: fsl-qdma: Add missing fsl_qdma_format kerneldoc Krzysztof Kozlowski
2025-05-25 19:26 ` Krzysztof Kozlowski [this message]
2025-06-26 22:48 ` [PATCH 0/5] dmaengine: Minor fixes and cleanups Vinod Koul

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=20250525-dma-fixes-v1-5-89d06dac9bcb@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Frank.Li@nxp.com \
    --cc=Gustavo.Pimentel@synopsys.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.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).