From patchwork Thu Aug 10 10:47:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8C25C001DB for ; Thu, 10 Aug 2023 10:48:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 96F12828; Thu, 10 Aug 2023 12:48:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 96F12828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664534; bh=6rCNOPL7i52Q9kr2IUPyCrdXXgEmaRdZeC63IK1f1VE=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=vrWgFRfjI4eSjTp7hogYfnMHUPo3Q38IZHdgJ5sUVb4UPsOm9TIrybH5dnphim8n7 Ion+8XsUb8XYHoaGBIRlEjPbaYawC1O+dGUkFEj35tQuJX9C1a60QmXWEnau05Xfm7 Z+lsP3y+bnbE2ovPP13WkQUKm/hgnEr1IxCRThNE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D792DF800FB; Thu, 10 Aug 2023 12:48:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1E016F801EB; Thu, 10 Aug 2023 12:48:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 284AAF801EB; Thu, 10 Aug 2023 12:47:59 +0200 (CEST) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A3318F800EE for ; Thu, 10 Aug 2023 12:47:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A3318F800EE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=G6pHUHno Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5237365f3a6so961382a12.2 for ; Thu, 10 Aug 2023 03:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664473; x=1692269273; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cL5UPVfVDvTPeQFgxKATIKznitcWyNXilLQp5uC80cI=; b=G6pHUHnoTRweCuka8lUSPfAXJhMF537/JJNKPyOuyVHJBy5UR0uOeLt8TW7dwXa4JD BEBO2xt/mITqpaAYcQ65ixrn/FU1/rF5Uo2CChXWuk6wBuA0iR1sT0O4SYChe32G/E9x 2nV5gCCrVFq/EamTv7i9wU21Fs+zGTJWa/uPofqynaQLcuik19lqLog8NruRcQLUmRvp ZhPLwqEOmjw0yPYz8dSNNq957zC/gjOaH2cIpxW8F0j0tkGBbbzdykd2D6tbKd9B4k3W BXrzxJRZ78QSdp1HmG0pQX8ee0aNP460OnyCEwER3ENS5EBe7eOPBxLEYZ/CRizp28b8 F6zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664473; x=1692269273; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cL5UPVfVDvTPeQFgxKATIKznitcWyNXilLQp5uC80cI=; b=HYhivuQfTtB1WlG9t2EiXebmH5XhaoKl8ecq3ih+gjD5MR4shUsY7IUrQlENgNkH48 H4pAPMSclVf7/yDhRtz104TSzoOyw2V1Nc0w0ZI+I25DLLPB0F2GRVmdGn0errN5gz3s +yj4FNyGUjtGw4TEecp0gud09sUlG0SfofA+AoOZiJn0J385B/D1GC2mzYLTgmw2EO+4 JaFVWVUnzs+qrEmOBtplXBYM/eUInPNZDCnMsVnjd3Ws/9+0U8Wa/PRS4NzszFyQbWai M1BeydZ08uWR+5zLKPpFvHAtcM9nICoK5m0gaRFEK/tIq283GtMRMuMZoFjPGrnZ0Kvz 3D5Q== X-Gm-Message-State: AOJu0YxY3By884wB+z9e51bHKBp2IMasPmuerheL4HZ/C16sVtzxm9zF wDRhkU8Litb23eFwZBa56WOGuA== X-Google-Smtp-Source: AGHT+IGXS1aQfmfAEnnnicUw9UC/MVRyaVegshXzkv6MrwG7ZgOG9nfvxHajlaARube88C1uKtE0IA== X-Received: by 2002:a05:6402:28a:b0:523:406a:5f6 with SMTP id l10-20020a056402028a00b00523406a05f6mr1588660edv.12.1691664472836; Thu, 10 Aug 2023 03:47:52 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id x20-20020aa7cd94000000b0051dfa2e30b2sm653854edv.9.2023.08.10.03.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:47:52 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Nathan Chancellor , Nick Desaulniers , Tom Rix , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, llvm@lists.linux.dev Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 1/4] ASoC: aw88261: Fix unitialized ret of aw88261_reg_update() Date: Thu, 10 Aug 2023 12:47:43 +0200 Message-Id: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: Q6Z7SQRZUPP4JFXSSPV5ZTALFLCKSNC4 X-Message-ID-Hash: Q6Z7SQRZUPP4JFXSSPV5ZTALFLCKSNC4 X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: There is a branch in if() clause where aw88261_reg_update() could return uninitialized value. Pounted out by W=1 clang build: sound/soc/codecs/aw88261.c:651:7: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (aw_dev->prof_cur != aw_dev->prof_index) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/aw88261.c:660:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/codecs/aw88261.c:651:3: note: remove the 'if' if its condition is always true if (aw_dev->prof_cur != aw_dev->prof_index) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/aw88261.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c index 82923b454dd4..fddba2f2de41 100644 --- a/sound/soc/codecs/aw88261.c +++ b/sound/soc/codecs/aw88261.c @@ -636,7 +636,7 @@ static int aw88261_dev_stop(struct aw_device *aw_dev) static int aw88261_reg_update(struct aw88261 *aw88261, bool force) { struct aw_device *aw_dev = aw88261->aw_pa; - int ret; + int ret = 0; if (force) { ret = regmap_write(aw_dev->regmap, From patchwork Thu Aug 10 10:47:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7950CC001DB for ; Thu, 10 Aug 2023 10:49:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3A3A983B; Thu, 10 Aug 2023 12:48:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A3A983B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664548; bh=ScGk93Y2dNlMmrR0MgykPBeTqSPNMT7za/shT+UCoxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ffjnPqCvIMqpCrEy6gC/PtlvSE40EWudIcG0Xh8I00X/pas6WK2NdDCHGaPngIKTk CXzdCqC4Ai3rbIyrLHCt7HNLtp2zJmbw57/KyLSrYyMLRMBLgZU096ri3LRuFqL5Qr eRGnYfKWETLa4Y6nlBTAifPUL8t1wR9MeZ915HZA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 492CFF80568; Thu, 10 Aug 2023 12:48:05 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 60850F80571; Thu, 10 Aug 2023 12:48:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E25ADF801EB; Thu, 10 Aug 2023 12:48:00 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0CD20F80166 for ; Thu, 10 Aug 2023 12:47:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0CD20F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=cq1kU20n Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-52256241c50so962321a12.3 for ; Thu, 10 Aug 2023 03:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664474; x=1692269274; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wdCk7OUtlyVla0geNv76Vk4CNU64Mjej9PSyuuwP9Mg=; b=cq1kU20nMj6zkP5dpHC0Hptq8NDMOxwqXMIyqFGDLtXHdhylP/8FUA5sLq0QpIHQIn R6aRN019gA0L336WxdmXNVzP9H5PB795+pAKYjntNoFZwliERBALI2KEdPDDN4h7yJ7k /wNGeKxG5ZUdAKtmwd8Uql/mAj42Wkd4FeXd2mE1g6+aCRY0H/Xydvfx2LngX62guhQf Q3Z92vB+nZf827DmAqmBMJJSv+FPrc1lHcIoILW7T4qVr2jlt1WlRwYv9JKmis44Xg5e rzrcwyp8+z1Pk2cZktUcFxabe/SEpMY1Ukio/T9ZiJOfp3w6zfgY3FbqF8SAGFn+Ty6n R/1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664474; x=1692269274; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wdCk7OUtlyVla0geNv76Vk4CNU64Mjej9PSyuuwP9Mg=; b=cjSobgREZkQ6D2pLTIFbm1hy0+0T1IlLeoY3/P06sYkbtaUqSSi3vEoxbQyeK2y0U4 NuHANN0Hp3R0N9Frf3qmkQncBPVJvG2oMaLYmBu5bVLnW7i8gEqIFd1zokMUrXeVQc2h +Xu9E7e91D0v3oPZuEJ39N73ct+f6gVXrkGTK48CYU1NaTP0AiAuZ50NbM7oxId7nkkG 8j3Kbf1fsObcjy+0k7VOWNbP3nnMG0vybP0dwxkceC1b4i1S9oR5o3SMwvuJGKryCnIz I6nxp+S1DkN4PQRL8uuS96gpj6/NUoTtOLBNcNndpzSz6Ntip/gNkHqrII0Olm1Y336u Vqfg== X-Gm-Message-State: AOJu0Yx4S5sMcfs22JExBy0fAPw57Vgn6aH/f0fmltDObxJJMCPF2HGm wxy4Qs9hjA6E36/VCuYU0xU6jA== X-Google-Smtp-Source: AGHT+IEnAtHjVByssGhPTqQELF84XSx5/0DHEL7BVsY09r1D07osAN5bMweLFHfpBNKn1GaFZacbBg== X-Received: by 2002:a50:fb91:0:b0:523:102f:3ce0 with SMTP id e17-20020a50fb91000000b00523102f3ce0mr1833711edq.21.1691664474683; Thu, 10 Aug 2023 03:47:54 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id x20-20020aa7cd94000000b0051dfa2e30b2sm653854edv.9.2023.08.10.03.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:47:54 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Nathan Chancellor , Nick Desaulniers , Tom Rix , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, llvm@lists.linux.dev Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 2/4] ASoC: codecs: tlv320aic32x4: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:47:44 +0200 Message-Id: <20230810104749.164827-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> References: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: DU35KPYKG7CGFBA7RXWJILRYWWY5OAQR X-Message-ID-Hash: DU35KPYKG7CGFBA7RXWJILRYWWY5OAQR X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: tlv320aic32x4.c:1352:18: error: cast to smaller integer type 'enum aic32x4_type' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/tlv320aic32x4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index ffe1828a4b7e..6829834a412f 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -1349,7 +1349,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) return -ENOMEM; aic32x4->dev = dev; - aic32x4->type = (enum aic32x4_type)dev_get_drvdata(dev); + aic32x4->type = (uintptr_t)dev_get_drvdata(dev); dev_set_drvdata(dev, aic32x4); From patchwork Thu Aug 10 10:47:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7E85C001DB for ; Thu, 10 Aug 2023 10:49:22 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 83EB582A; Thu, 10 Aug 2023 12:48:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 83EB582A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664560; bh=1NMdXUOC58+tcXZ9Q7r2MNWfwM6LYQNW8X+6AqBoqyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ot+Q7DqsPazMfNUl6HB0xk8ZGlmN3PI/ouNKPYwbhcZXqMDL7cI2P5PJvLO92l2eb XaPN/tv1omixh+k6NS2Gi/bEwL88oTWj2hD8Ujn8LeGFwfMsl4nV9m9bSt3gkMjc8Q 1LcQ8nCGGQJSjxtse3kLEoZU6SHFb+YuhEuSVjjA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38AA8F80587; Thu, 10 Aug 2023 12:48:09 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 715A9F8057E; Thu, 10 Aug 2023 12:48:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94FC0F801EB; Thu, 10 Aug 2023 12:48:02 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0FFA4F800EE for ; Thu, 10 Aug 2023 12:47:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0FFA4F800EE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=L+pJzrZz Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so922872a12.1 for ; Thu, 10 Aug 2023 03:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664478; x=1692269278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UpZqgVo2zkbi2B7sOh6o48YWO5812KC5/SRbTNsfhC4=; b=L+pJzrZz5LiodQRp/U/kbzpSYWnuq6UUxyeRItM6/VS+qn+D1PDLrcfAJlUCmks3Kz Licj4R5ZhYqFNIyGDXQpyL/zv+UQqLViDrfb5AQ5Lk0yh0s8tkC9JT5Wi4Rz2sWltvfD 24dwksZBWyf0htE1vPBy9QBmrbo+qPRzH8EaHBcvW31pMM5faimC9YDi9d+PxB0L0IKN RvDGD0ECUskqfPBcVKcp9DdgIhUjd4a6DuzkmtbPY6Y/FFnK61k2qicYoEsqIRuuzPtV 5rb0itHN4h2ptsZeSrFedln9PwV3C4sILAvNxBhujef01IdBWcivSBYg3FU8C6qUz/HA Y3AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664478; x=1692269278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UpZqgVo2zkbi2B7sOh6o48YWO5812KC5/SRbTNsfhC4=; b=RfvzZHdyOpdDeavBrmsPl2F7D0yza9skMzg/yMmyhUzrxKbZEhgGxx3QTzUxLATo6+ 5WUkD8ZQ/4k2a5eLY72rTM63dYs8o/MSR+2GQmC5Yx+x2VEpfsLmdrzgqq1K+mIvEgi9 Gbw5g4Nfz/0hmhbJ9d8tZ6EzgqJFvvbXVD6svdGN7gM1H7ostjeebopb04UWIcd54B6f wzsUdmw9HUFoL6CS2o94+uXdLwhpBjrCdMtdkSItwshr4JpwgKA/RaZbQIUV50qo1eJP KrMlt9iL1QCTihnEqsY4FNQdtxDceDSmbjCFaomYT6oCdoHGI4jOb5XU2Hd/Kh4dcUBE r2dA== X-Gm-Message-State: AOJu0Yw7Aq4HkXzeh2qdllkbPGuPcOqR8LBDjm0fcgbMJ5fxcEWYWsoW s4xCaF80sfDhAOR3KsVG+BxcVg== X-Google-Smtp-Source: AGHT+IFi6mpqtjPUZgkNME8tljPZsCKLpCa4i79mEQYjX4KcyxYg/CD19QBrJpMdXKSWYT3AtUshSw== X-Received: by 2002:a50:fc09:0:b0:522:2d1b:5a38 with SMTP id i9-20020a50fc09000000b005222d1b5a38mr1688860edr.10.1691664478219; Thu, 10 Aug 2023 03:47:58 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id x20-20020aa7cd94000000b0051dfa2e30b2sm653854edv.9.2023.08.10.03.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:47:57 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Nathan Chancellor , Nick Desaulniers , Tom Rix , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, llvm@lists.linux.dev Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 3/4] ASoC: codecs: wm8904: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:47:46 +0200 Message-Id: <20230810104749.164827-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> References: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 7AKZXFSQ2JCAFU5YPTI7DLDDWGIBQFZD X-Message-ID-Hash: 7AKZXFSQ2JCAFU5YPTI7DLDDWGIBQFZD X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 'devtype' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm8904.c:2205:21: error: cast to smaller integer type 'enum wm8904_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wm8904.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 60319b468fb2..829bf055622a 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2202,7 +2202,7 @@ static int wm8904_i2c_probe(struct i2c_client *i2c) match = of_match_node(wm8904_of_match, i2c->dev.of_node); if (match == NULL) return -EINVAL; - wm8904->devtype = (enum wm8904_type)match->data; + wm8904->devtype = (uintptr_t)match->data; } else { const struct i2c_device_id *id = i2c_match_id(wm8904_i2c_id, i2c); From patchwork Thu Aug 10 10:47:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D472BC001DB for ; Thu, 10 Aug 2023 10:50:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 72A58822; Thu, 10 Aug 2023 12:49:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 72A58822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664611; bh=dffqceKs75iUWUAgXZmLN8kdEHNrQvBCfQpDDFCxwTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=MQsjhmwfiJeHonqQxp7+kY4MDowXAHudQdpkxQXv7++H1KUkDHDMt7EOPLK58KCvz 0pVBdQezQ9zlt/4k35xIIR2LO+ECiSVUuYulPGkjX9QOSNU3yDpId0ZXqKcaHn+uht rHyrIgzF0gh/n43EX3kO99IEPx4oBZc3SFblLY1w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6540CF80557; Thu, 10 Aug 2023 12:48:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9560CF805B2; Thu, 10 Aug 2023 12:48:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A2744F8057A; Thu, 10 Aug 2023 12:48:07 +0200 (CEST) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AFA31F8055C for ; Thu, 10 Aug 2023 12:48:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AFA31F8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UGqNEmNN Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fe11652b64so1132862e87.0 for ; Thu, 10 Aug 2023 03:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664481; x=1692269281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qzMSq7HLSHN1HFLKAp83kiHFzC/dRhYUs++4UrDqaOA=; b=UGqNEmNN1GRZd/cQPQ8BSIM/P3HO1mpPaFsq5qWJJQp/cf2hqFCbXFb+QeRHXLlMKG 7zasTTRuG7one9GfxqSB1uSZzw6Wy2owDcgscp2LVQ0ZEYKU/dIgcZ2X7SMvcCIuMvnP fT+UGY1nG6W+GX8JH8DDyNGJS0INeWEZe/xIc7W7rVuY1LUon1MxyAMsMXy/QaIJnAs5 yOJES8JPBZNK0XFRdKrYta4LXxKYP8bpG35w5ltlkGbEGVbpp3kh+yoIZax3cM3SBv4E PjezXo8hgAwGpuJ1o+WPULiVfbGjx4KGX4Oer/736Jql6eOYkB/sibEnHmDbRKKrJh36 Xrxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664481; x=1692269281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qzMSq7HLSHN1HFLKAp83kiHFzC/dRhYUs++4UrDqaOA=; b=bKn+3u36+o2zP2x5Rnej7mINBndsWVjr2JcelUaItbyabxJtsjFrSesYRAA8SuiW/b KOsHlrNpBRgE9QbhV3pSYUpwKe0C42P5/so6VelAfSukrnWhyTajqraN+vqtVpthQ+LB sto/N+swAq0AFydEUJVuuEyWwQKtc7lmY3DkRblpF2k6zO4lZ39ZRwKc+bIIciFBCCWV vcfHNppH+gw09GjghlPOukp+usQYguol/inQlemHv4gz2nDSTsiVvh/q695kdPXa46Fp qvGmzf6UHDUjSnNPmcD+45uK94vKa0+UKUHpSuaz9CsHFAlBZT0RZbZeVwFXqgYXsnTr AuKw== X-Gm-Message-State: AOJu0Yyn9x91mI69Mk8k+Q9a8weTr9Dy4th87F+PmnWUThrCXYEYuLEa jMaE2XaMkQj6DdtIrWVTzzfS2Q== X-Google-Smtp-Source: AGHT+IEP9ckwBL1/0mfPqosWIWOXy9uevpV0Iq3ArH10HdVvSOvTyx5j3EETKE0Mzgr1fyviNz4aeA== X-Received: by 2002:a19:9159:0:b0:4fe:a2e:890c with SMTP id y25-20020a199159000000b004fe0a2e890cmr1439491lfj.49.1691664481535; Thu, 10 Aug 2023 03:48:01 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id x20-20020aa7cd94000000b0051dfa2e30b2sm653854edv.9.2023.08.10.03.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:48:01 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Nathan Chancellor , Nick Desaulniers , Tom Rix , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, llvm@lists.linux.dev Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 4/4] ASoC: rockchip: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:47:48 +0200 Message-Id: <20230810104749.164827-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> References: <20230810104749.164827-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 3KOGAC4DHU4EPLP6BPAMUX7PZPBAXS3X X-Message-ID-Hash: 3KOGAC4DHU4EPLP6BPAMUX7PZPBAXS3X X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 'version' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rockchip_pdm.c:587:18: error: cast to smaller integer type 'enum rk_pdm_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 52f9aae60be8..678989b25e57 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -584,7 +584,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev) match = of_match_device(rockchip_pdm_match, &pdev->dev); if (match) - pdm->version = (enum rk_pdm_version)match->data; + pdm->version = (uintptr_t)match->data; if (pdm->version == RK_PDM_RK3308) { pdm->reset = devm_reset_control_get(&pdev->dev, "pdm-m");