public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: Fix Sparse incompatible types warning
@ 2014-04-09  7:21 Krzysztof Kozlowski
  2014-04-09 10:57 ` Lars-Peter Clausen
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2014-04-09  7:21 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-kernel
  Cc: Krzysztof Kozlowski

Fix following Sparse warning:
sound/soc/soc-core.c:252:20: error: incompatible types in comparison expression (different type sizes)

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 sound/soc/soc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 051c006281f5..41f6178249df 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -249,7 +249,7 @@ static ssize_t codec_reg_write_file(struct file *file,
 	struct snd_soc_codec *codec = file->private_data;
 	int ret;
 
-	buf_size = min(count, (sizeof(buf)-1));
+	buf_size = min(count, (size_t)(sizeof(buf)-1));
 	if (copy_from_user(buf, user_buf, buf_size))
 		return -EFAULT;
 	buf[buf_size] = 0;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-10  7:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09  7:21 [PATCH] ASoC: core: Fix Sparse incompatible types warning Krzysztof Kozlowski
2014-04-09 10:57 ` Lars-Peter Clausen
2014-04-09 11:12   ` Krzysztof Kozlowski
2014-04-09 11:30     ` Lars-Peter Clausen
2014-04-09 20:25       ` Mark Brown
2014-04-09 20:28         ` Lars-Peter Clausen
2014-04-10  3:01           ` Al Viro
2014-04-10  7:13             ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox