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: 712379 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:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 712665 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 B7B69C001DE for ; Thu, 10 Aug 2023 10:49:46 +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 EF5D7886; Thu, 10 Aug 2023 12:48:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF5D7886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664585; 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=gKSush04jrizySON84WrTkG4yP+dJE1w5dXkdJFrwfBQh6VpH1k59ZWrb4UGVg7Xu xixEJ26zx4HDJQHieJ7h5nGwEflg3T/FwtwcQfokNfEZf0ZE4o5IsSW+2vUr4GIU+f mgbDQ99V9Z/EHKUFafMOx0F5ulG86n4ZYFKF0+i8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4EE34F805AB; Thu, 10 Aug 2023 12:48:13 +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 C3E21F805A0; Thu, 10 Aug 2023 12:48:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0F94FF8016E; Thu, 10 Aug 2023 12:48:03 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 8A790F800FB for ; Thu, 10 Aug 2023 12:47:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8A790F800FB 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=zfeXdylh Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4fe7e67cc77so1125355e87.2 for ; Thu, 10 Aug 2023 03:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664476; x=1692269276; 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=zfeXdylhcEBVDrqAny1SLIvN9Crr5v54nzF3ZLf3W/Eif1dNWT9wNlCKgPCQL/o0/E iYzjBPH3863DIk4aENP9BsmFOE0Y+EpLU2SlozYtRxJb4GQaDpNAA33nYUQsy3M2dVsT OpxZyOWl5CCCLP6aJa0vYV6RmTQxA+wi4TcMmhitHOdEobpn5o5vLFCXEirr7/Qm+DMr G5Rpk7tIg24B9EHXKP/uHgwg1ZuSYKfYQmoOFP6aLTRJty/VCoAZStEIc29/gNuUHg5E VwUyx6TO9alL/BcefRo7HnARKktyocMZXCzb007Et2yQXMf/XrlEBt21mzzwDFc17QPK ar7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664476; x=1692269276; 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=gwF4KhfP/EnE0nydBUz2cODbRmOLoTH1TTWiOoJM3S8Owk9P7X+uB3DsOiggihCHb9 3XcoGMWqT9dig7tdkS05BOprNRnWRb+zcQdWIDdmSduss8JtrL/sbgUpVw07up2BRdr5 aXfb1J5LxDBqkwtx8v3SWrl1auNm9XeAmtZ3TCk1WVgiQS0A53VcnC7Tv+ewOlpzh5ke xxF2RDrhjBNLfhH4VxVdYCVJ6LtqO5YFn0dBDIxu8BuhafJT8moZZm29nq9ySQdvheY2 v5xTmGpmHRZTcgtngQmBXWjSikkQrmE1bbK5pePt1kUj5gqpt/zoT6rCUek7lyIU922Q w27g== X-Gm-Message-State: AOJu0YyXNA3i6pOfYlbLMQsLuab66NX0sVg4MhT7RQFbYjZ9DQwmQA/+ cofXaLPAV4ugxdYz1a/g3qlkdg== X-Google-Smtp-Source: AGHT+IER0Z61HNUztY8QpmTryefpq33DBRiWMkpaT+UcHCgK4QowLfvk76l0MXCWns6xcZPsgfbbnw== X-Received: by 2002:a05:6512:4013:b0:4fe:c6c:ac95 with SMTP id br19-20020a056512401300b004fe0c6cac95mr1693259lfb.35.1691664476514; Thu, 10 Aug 2023 03:47:56 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:47:56 -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:45 +0200 Message-Id: <20230810104749.164827-3-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: 3QTTNUCVWW6N6SKNJCUX5FT4AVUTYOSL X-Message-ID-Hash: 3QTTNUCVWW6N6SKNJCUX5FT4AVUTYOSL 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:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 712377 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 BA2B3C04E69 for ; Thu, 10 Aug 2023 10:49:58 +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 6DF5C82C; Thu, 10 Aug 2023 12:49:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DF5C82C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664596; 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=kH6Xoer0NUAlZ9B/3kFEqTJb4aN0bpkVpLbRrxmHj7O1LKIZggkSur90O4vbQWZHR eRJMoEuCcZK2PB1yrWr5n0bwynELHV89lEVcxDv5PcY7/C9aS6LDZnq8VUMFLbsUka 6Dfz0n8DtKiNqivodfnr7R+RA2Rv6DXlT59tSKsY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 02EB7F805AF; Thu, 10 Aug 2023 12:48:14 +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 99539F805AF; Thu, 10 Aug 2023 12:48:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2EB4DF801EB; Thu, 10 Aug 2023 12:48:05 +0200 (CEST) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 7B33AF8055B for ; Thu, 10 Aug 2023 12:48:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7B33AF8055B 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=KMQ/zCzP Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-52256241c66so1575990a12.1 for ; Thu, 10 Aug 2023 03:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664480; x=1692269280; 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=KMQ/zCzP8/TnQe3Wo6hhI2Ivi3DhHc4D2lLfGnt9ciA00FsL4hsZH4u87Vx04WxQ3x RRedSie2gJxhgIafqOtTPolui5SRF7Ic4Vh/1ssUoRFIsFqtay8eJwiP2rP/GE3d5CyF 1U8Y8epFOGqz1GAfIaPLFw4D8jQ7FzptURDIlo29y/NLoTttT7zN4Y6JjqzQPpmgZ3DI qkoSxsWbdO4WWARabNALqhZfBleorwPNeLZ6txLHzT3GrZ2hyPwlbJS1fKPvwSxXIh1h MoL9oTYywO4hnzh8dJ90rVwUuNJGIvdY3mBw5BAQWHGNEzJ2+JwSpH+gwOi61e2xzoIM byWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664480; x=1692269280; 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=awhy7m7stzp2b4t1gbEck/phyJM2A0irmengJm2DqgoqSNswkDs/tvKpivUdRjuglu lPx69NC2sRa4xRyFnXAgHyLhbdAh71LBnGT14SUuvY2zcrAcNn/F59yhg1H+R4an7Irl n302V32PNf39Ej017iCbgKQleCNXtp0Uj5ydjga/vw6Gjcp7OsLcnOfpKYpgV6G5oUNk MYbi1KlSAHRfHlK5Me3T94hID04SfEVXE+dd3qXQkBzzHk+9LZ0/o7unYZttIJnoZf1K BNKm+WklwVgjAmsHFDfNoot42oO9B+UyOq7zFZv3pqeK3Y7dg6UNcwXZOOMqSbLThWWS /2Sg== X-Gm-Message-State: AOJu0Yy0rwt7t7rOBvvg8rh5aXIxVZKflwgvXNDUGghqPbku1heqEZL3 PNpnWcpO/X8Bm8hO6iK8Z8wAJQ== X-Google-Smtp-Source: AGHT+IFqyvPfsZCXo/1EPc3mjODI47QAw0qLpl21vWUgc1bNs1yO0pXM9KolaKHhD7miC+E9pkUSwg== X-Received: by 2002:aa7:d343:0:b0:522:2add:5841 with SMTP id m3-20020aa7d343000000b005222add5841mr2074582edr.7.1691664479840; Thu, 10 Aug 2023 03:47:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:47:59 -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:47 +0200 Message-Id: <20230810104749.164827-5-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: CYCPB5WUR3G4EI6NZ7WJUWHFT43UACZ2 X-Message-ID-Hash: CYCPB5WUR3G4EI6NZ7WJUWHFT43UACZ2 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:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 712376 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 5898DC001DE for ; Thu, 10 Aug 2023 10:50:35 +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 070E01DF; Thu, 10 Aug 2023 12:49:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 070E01DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1691664633; 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=m/GLHXW1z9qNji+/HmvMRGCoti70+cfbttWT/mhiQMqLEd7M4fBCgZyyn6HHrEf0p KQYyz8v658CFGHrLT5C72IAHdmCZdsHnK08JSHot0qcoubuI0OHJal7fsi1hViUp2l EbNvs11xS7qhesWDNyLWuxgB8S721+i1LINcXnOc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6F99DF805B2; Thu, 10 Aug 2023 12:48:22 +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 81D1EF805C4; Thu, 10 Aug 2023 12:48:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D3034F80579; Thu, 10 Aug 2023 12:48:08 +0200 (CEST) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 9AF28F80578 for ; Thu, 10 Aug 2023 12:48:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9AF28F80578 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=ClILBq+M Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-523ba00a62aso7075a12.2 for ; Thu, 10 Aug 2023 03:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691664483; x=1692269283; 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=ClILBq+MRAloWpJfwnTeCf1bHZEDnZelIoj+A/axjmW1s+j+dR7FOxDjEF9I8PXXMG Tc/C6Gx1scvwjkKx98djoORst6Cl/ycaIodat9D0KfilMBRvN/MaESoqI9Ak9Z8YOvq8 Drt7RbTwvMya7Xn2ck8jDeLdI/Z7sUH7nVGyIWw72YyEu8FIwQyDUF2+604OgUg5Qlo8 KTzw8odQYPl7LwA7/7fNEKKen26+y7OwDK4lXPT/WxmIVFxgAll4Bs74be7u4YK0EZSR uDWOkSy5IvuHT6ViBxshwTxcHfylLOROqvd7FmX+lup7xXId0mPOyWI9lt1jUGL3LnMp YXlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664483; x=1692269283; 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=CKi5tykSOtgv8s1PThtiE9nJ+c54Xq1q9rz/IAS+EfMjXAc/lsZ9+9rT74IxjbAq5E 1CsSXZuNVQeNciHGAjyQG0ma+OcQ1puUm/f7ZbHclSIfRYXmgOdDW2AabfoAuDlAMwyS GTZmK3481uNQ+DlaG5Kdev3LfXtUR3bqR/pmJfuwuV6pPIIJsv0LEKADY7nnQqsepGez Ui1BhSsDASAQOewMfuyAdjXINNcHavlnuIC/if0lTQbIPraQ5Jsv7/x+8vHlyBHJK7xI sWACGroxN6BRaEHXp1ayYbLFzokrYa55wFZtxpigOTrI9BLmjSC3EMnXSGWVkkuGuqk9 GcuQ== X-Gm-Message-State: AOJu0Yx8mIdoyQniW3/nK+DDP3ZW4hbwBC5WSjul80UD0D2GvF4AQWi+ NE58plFw2Cz3bac7nvZ5hN9eAg== X-Google-Smtp-Source: AGHT+IEm4GcDsfGX7LdWBqE4b5IJZoo0ChzDs3csIlSh1GyolAoj+48i33/6cKTWLD7egpAVJdszfA== X-Received: by 2002:a50:fa84:0:b0:51e:2305:931 with SMTP id w4-20020a50fa84000000b0051e23050931mr1511310edr.22.1691664483233; Thu, 10 Aug 2023 03:48:03 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:48:02 -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:49 +0200 Message-Id: <20230810104749.164827-7-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: UGJDLFJDU655VC6YLHKCRLC62XXX44CT X-Message-ID-Hash: UGJDLFJDU655VC6YLHKCRLC62XXX44CT 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");