Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2951453rdb; Tue, 13 Feb 2024 02:12:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWtWzGSDUhMHIpmkr4a6qJKaNnmjApBUlSojHwmgkSZydurluca25nrLavaz6uebNBLwngvSMF+2IW5Oz8d528sxhZrT2n39GKQ2Oo9eA== X-Google-Smtp-Source: AGHT+IF1Uwr29n7HGfgcF305tBHEA4kcR5Y48jf0j0SoqZTs4LRB7tbkIfczPLcyEX+zLtJjqKfO X-Received: by 2002:a0d:e24e:0:b0:607:8393:384f with SMTP id l75-20020a0de24e000000b006078393384fmr419391ywe.29.1707819135274; Tue, 13 Feb 2024 02:12:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707819135; cv=pass; d=google.com; s=arc-20160816; b=iSdLG3QrAKdGoPMffsDcQwvMV8WluRS77y5ZB16Rve6dAAWnaeRbA6Mo0zcMWH7N+E GNLEANhuyySGxUnXjTa8Z5oHVTiDAC/BBrV/k7kwPmy1IHTCjkJEzss02lXDnZh8vmvv tmy2S4lAiyotuZpOHd9mn9Ek4vUYxRg7/lpLAFjvAjm+tFaUklkjS2WqBPr4Q6zW+9mt OJCp/dcrf7XS9CVfguaRRliZvX8Nk9f+aInU9vsRUem/Zl+Ya4clpPIosSfiQ7RHQiVS Z25fOLARBIQl8Yh3pxNM+c0m4t6llVjBXqNDt1YzuT00IccbGzt5ioy2ucnX0IHX7M55 e6zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5/vMpuJZg8aS5DnQvZkhuNwqhaqkA+YlRxGj07T0QkA=; fh=WO5DuWv3HYQk4QBt2dZ8fGNUJO3zzzamh7I7KsqDf78=; b=ioS3bhaqpk+rNM3+G5Z5Nu3TZRrNKPO8Pk1k95fBDUZ0mgQqALLnQVZHtO3/urf+0x T0hwRTZso67EGXXzfZD7Zci/2x5+OvzZDjXUyK9aPSv+ZUpNhOLeVcA0AEk5svc01m8m jHjcdtHdpqN1agpZbrJ2ILJQyUdfD20WXGkrTgc6JDZZcrNmaZsRZH6diYzzq5Ga6ArS 7XN6TZNfLOnUcN+tHjF4k0Sa1RyjQaCkatyNg1aAt8E305r83mXrQ+tvtCYpkQq0tP6i Kg5L6UhZnDRSK0NqlvbrcL8GXVyiwUWThhEZXYihag8CtRdRmPrvgsH56wCAQWXVlcd+ qAtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0STckFO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63314-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63314-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWjB62FShj5X0WQYcM6S9ZvzoJdpgMcTuEq5/2iDt5mxBNTSxhNfVQgvoA2Kz1xQ+k2soHkI0yPFydVYOw4Gwdx5T/Xh936dvWu1qkEVg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j11-20020a05622a038b00b0042cfd7a19d9si2604022qtx.708.2024.02.13.02.12.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:12:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63314-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0STckFO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63314-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63314-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D2FC91C24A73 for ; Tue, 13 Feb 2024 10:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26BBB225CB; Tue, 13 Feb 2024 10:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D0STckFO" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F243224DE; Tue, 13 Feb 2024 10:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819073; cv=none; b=hkvjOoQzdmqFQfbBzO/f6B1iczmd9BobkUvXI4b9gL5mtbfCmBqH5wQA/iRF86pYEKiaZmD+1M9FtI0qN4HvHFMTqubBqWZ4jt/wyb6b2gPIyrfhLKeBgbT1rdcl+O0en6qK6f/YfZzuJERfXAItTjrRJohPJQi2GtZfC0X9BSk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819073; c=relaxed/simple; bh=mL4XO56Z6BWv4tMNoHpJYHvphFG+5pdC53wWnQvEb5Y=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TyC92Z6l/lUTftSEMeVQTBEqb+5QWs5ClE8M2PyNCszMZfrOjdHfzCi8st5+F57lb18OKyg3oAK8td8HAyDKU4F8Q0t+/ho7DDQj79lzWK0m8uFtwcD34UNtemIYjYj1z2uGsVIHxpt8PhAHrL+YnhxAVRIp3DgyPfyLQhSVM+w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D0STckFO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6125C433F1; Tue, 13 Feb 2024 10:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707819073; bh=mL4XO56Z6BWv4tMNoHpJYHvphFG+5pdC53wWnQvEb5Y=; h=From:To:Cc:Subject:Date:From; b=D0STckFOFxSAdd91J4HTYXokBfOyGak+23LmZrrtGV8AmqeeGqFOg7G9KY4zrdkQo 9fJbaRR9gKmH9eJ/i9WDck6tH3Lh0kNVuNI8I4TYDJZkvjsNAoifcmIfGk/P8DhvaQ F65xBXJ3N/cRhr40DhCUME0JWoxEXNRazJ1M8xnu3euc7YWesbTpIjVJ+WGkZOzu4R g67zJBv1Vz8uDDPz8oZhzsBl6dluwFkNVth8k+9Pz624uJAAvdN/dcHPLX/5aW565v GofS96pPXezVY6x1A5pS55CqTLqMEzRJoRCnAvkg218pRjmFS6UYizMDpd6kn1wbiA DaAlElGw6nIUg== From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Mohammad Rafi Shaik , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] ASoC: q6dsp: fix event handler prototype Date: Tue, 13 Feb 2024 11:10:46 +0100 Message-Id: <20240213101105.459402-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann clang-16 points out a mismatch in function types that was hidden by a typecast: sound/soc/qcom/qdsp6/q6apm-dai.c:355:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 355 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id); sound/soc/qcom/qdsp6/q6apm-dai.c:499:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 499 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler_compr, prtd, graph_id); The only difference here is the 'payload' argument, which is not even used in this function, so just fix its type and remove the cast. Fixes: 88b60bf047fd ("ASoC: q6dsp: q6apm-dai: Add open/free compress DAI callbacks") Signed-off-by: Arnd Bergmann --- sound/soc/qcom/qdsp6/q6apm-dai.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index 052e40cb38fe..00bbd291be5c 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -123,7 +123,7 @@ static struct snd_pcm_hardware q6apm_dai_hardware_playback = { .fifo_size = 0, }; -static void event_handler(uint32_t opcode, uint32_t token, uint32_t *payload, void *priv) +static void event_handler(uint32_t opcode, uint32_t token, void *payload, void *priv) { struct q6apm_dai_rtd *prtd = priv; struct snd_pcm_substream *substream = prtd->substream; @@ -157,7 +157,7 @@ static void event_handler(uint32_t opcode, uint32_t token, uint32_t *payload, vo } static void event_handler_compr(uint32_t opcode, uint32_t token, - uint32_t *payload, void *priv) + void *payload, void *priv) { struct q6apm_dai_rtd *prtd = priv; struct snd_compr_stream *substream = prtd->cstream; @@ -352,7 +352,7 @@ static int q6apm_dai_open(struct snd_soc_component *component, spin_lock_init(&prtd->lock); prtd->substream = substream; - prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id); + prtd->graph = q6apm_graph_open(dev, event_handler, prtd, graph_id); if (IS_ERR(prtd->graph)) { dev_err(dev, "%s: Could not allocate memory\n", __func__); ret = PTR_ERR(prtd->graph); @@ -496,7 +496,7 @@ static int q6apm_dai_compr_open(struct snd_soc_component *component, return -ENOMEM; prtd->cstream = stream; - prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler_compr, prtd, graph_id); + prtd->graph = q6apm_graph_open(dev, event_handler_compr, prtd, graph_id); if (IS_ERR(prtd->graph)) { ret = PTR_ERR(prtd->graph); kfree(prtd); -- 2.39.2