All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH] ALSA: sc6000: Use explicit cast for __iomem pointer
Date: Wed, 21 Jul 2021 00:49:02 +0200	[thread overview]
Message-ID: <20210720224902.7169-1-tiwai@suse.de> (raw)

The recent optimization to store an iomem pointer in card's
private_data field caused sparse warnings.  Although they are
practically harmless, add the explicit cast for avoiding the spurious
warnings.

Fixes: 9b7843d1e125 ("ALSA: sc6000: Assign vport directly on card's private_data")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202107210511.SnFqlZMa-lkp@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/isa/sc6000.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index d92e56cb0490..26ab7ff80768 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -531,7 +531,7 @@ static int snd_sc6000_match(struct device *devptr, unsigned int dev)
 
 static void snd_sc6000_free(struct snd_card *card)
 {
-	char __iomem *vport = card->private_data;
+	char __iomem *vport = (char __force __iomem *)card->private_data;
 
 	if (vport)
 		sc6000_setup_board(vport, 0);
@@ -582,7 +582,7 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
 			   "I/O port cannot be iomapped.\n");
 		return -EBUSY;
 	}
-	card->private_data = vport;
+	card->private_data = (void __force *)vport;
 
 	/* to make it marked as used */
 	if (!devm_request_region(devptr, mss_port[dev], 4, DRV_NAME)) {
-- 
2.26.2


                 reply	other threads:[~2021-07-20 22:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210720224902.7169-1-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.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 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.