From: Christoph Hellwig <hch@lst.de>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: [PATCH 1/7] ASoC: txx9: don't work around too small resource_size_t
Date: Thu, 16 Apr 2020 17:00:05 +0200 [thread overview]
Message-ID: <20200416150011.820984-2-hch@lst.de> (raw)
In-Reply-To: <20200416150011.820984-1-hch@lst.de>
The txx9 sound driver deends on HAS_TXX9_ACLC, which is only set for
three tx49xx SOCs, and thus always has a 64-bit phys_addr_t and
resource_size_t. Instead of poking into ioremap internals to work
around a potentially too small resource_size_t just add a BUILD_BUG_ON
to catch such a case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
sound/soc/txx9/txx9aclc-ac97.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index b1d9615f2375..7402448bdb09 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -175,6 +175,8 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
int err;
int irq;
+ BUILD_BUG_ON(sizeof(drvdata->physbase) > sizeof(r->start));
+
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
@@ -190,10 +192,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
- if (sizeof(drvdata->physbase) > sizeof(r->start) &&
- r->start >= TXX9_DIRECTMAP_BASE &&
- r->start < TXX9_DIRECTMAP_BASE + 0x400000)
- drvdata->physbase |= 0xf00000000ull;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
0, dev_name(&pdev->dev), drvdata);
if (err < 0)
--
2.25.1
next prev parent reply other threads:[~2020-04-16 15:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 15:00 MIPS ioremap cleanups v2 Christoph Hellwig
2020-04-16 15:00 ` Christoph Hellwig [this message]
2020-04-16 16:12 ` [PATCH 1/7] ASoC: txx9: don't work around too small resource_size_t Mark Brown
2020-04-16 16:13 ` Christoph Hellwig
2020-04-16 15:00 ` [PATCH 2/7] MIPS: remove cpu_has_64bit_addresses Christoph Hellwig
2020-04-16 15:00 ` [PATCH 3/7] MIPS: cleanup fixup_bigphys_addr handling Christoph Hellwig
2020-04-16 15:00 ` [PATCH 4/7] MIPS: merge __ioremap_mode into ioremap_prot Christoph Hellwig
2020-04-16 15:00 ` [PATCH 5/7] MIPS: split out the 64-bit ioremap implementation Christoph Hellwig
2020-04-16 15:00 ` [PATCH 6/7] MIPS: move ioremap_prot und iounmap out of line Christoph Hellwig
2020-04-16 15:00 ` [PATCH 7/7] MIPS: use ioremap_page_range Christoph Hellwig
2020-04-20 7:02 ` MIPS ioremap cleanups v2 Thomas Bogendoerfer
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=20200416150011.820984-2-hch@lst.de \
--to=hch@lst.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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).