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: 13349257 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F1BDCC04A94 for ; Thu, 10 Aug 2023 10:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5hfKkEBW0sEnOZPq7nRnVYYZ84ZPxN7cCYcODdZyiLQ=; b=aRHqBDWxz4MILV WVXfj8p7Gdb5CCyWU45sESWOvxxvDsIao0wJw9hvs6j5lq/2rTcvTF2Gkd4Anmz8QvfBH6W8UuP9X BLngUkQkEUKY1h4DUpPCfsB2SEuBIbbcRfnUzsy7EGAUdgGWdCW352SpSCjIK8ZW6QEIKd0rQmJXn Ip9TPGo8JfJJpb7gRDg27HPzK1ORK3fT9JZTCQDEpNy7xD2+uimGRY1MMsNLOQDeBsfQ4qD7jkEOD RCHmAkzMc1wbp3Zx3cyvJo2UtpSpWnMQ0/2XenOk0WDQtcxqYvi6uerUsq7YsOQFT59N8Rl2RYp7V ec0La3rM3/B6wGCLkh7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU3Cz-007GA8-3D; Thu, 10 Aug 2023 10:48:02 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU3Cw-007G2p-11 for linux-rockchip@lists.infradead.org; Thu, 10 Aug 2023 10:47:59 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5237365f3a6so961383a12.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=fBw8PrgbQLe+VqW+iZSWHTfIU5Usfd9nI1XMIgsJAj/Vqi37M+kygkidGhCIO3foTz 9V4vERBzN/P6i8B53eoKLo2hVljb6zhA6AedEu2rjxDKfCrsqvBl5NeEh/qvjmLmvFvN Kqyp13UXjq3TBdNkgpTSByVxaXqPEGzcDGuux2eQ/rE2YO8cRZxxyOQKQ1x6MYIYvWD0 xREOfXX4MND+0Gvfx9X8UDfqZoczEoYUV3+oiz4nXeUh/RxxSGD5Fm0yqBETo45Y0JOi WzBcgCQQNSKlB73e5AiLQguxDOqfPXNuqBZ8S/uqPlw5/eZMJcuDdGNfQC7oMOouBqiW JRGA== X-Gm-Message-State: AOJu0YzHFQdhrc5l2zil/BB03wBpMqJG6Zq6W7+frEMb9FdANGT7NTwc b06eYyi4LkGw8/ti0VgtXKUBIQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_034758_357714_3107CF8E X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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: 13349258 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9B95CC04E69 for ; Thu, 10 Aug 2023 10:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U93SYDMtRoIkdeF5au9mguVXeHosSIIg5CfMwqM2dR0=; b=3v4dwUYwSXDcl8 IczqE1pl4ijaIXNYrRsvLy4IezcM8KqnV3gK4dcW4risEUL6lEuy3USBqyVjohBXLsFuKKh2m4D3e Z5H6J0n1gQpVPUQZJLs+z6grpjO/82lEgKUeUrxCDzzhk59wb775LmMIYw99taN8b+ixpy6ROuBQ3 VUdtEWjRXX8Q+qWYJ9DwbCM43+flrVQCsIpIdomorlz4+UVmXeP4lz+SnV8Ghsp9d3KeTRtC9DbNH nPC/KQe9vbZG8XEesNo6iqLNpF4tNgS8ZvYyQuyGvq3ae/qPknxnyfuLzroe2B9eowg3Flx/XjCRM /gNEauDnfpXkf2q6LQdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU3D6-007GI2-2E; Thu, 10 Aug 2023 10:48:08 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU3Cy-007G59-1X for linux-rockchip@lists.infradead.org; Thu, 10 Aug 2023 10:48:02 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4fe2d152f62so1154778e87.0 for ; Thu, 10 Aug 2023 03:47:57 -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=M+8KBfrzp+DPSG/j713U0C7ajKMsbsMvqtNaD1sge5tw0WFsjO2pgWsx8HlpWUiDIu bKqIyI5i68aE9lq58IODAKb8nSGMddlLEpKzCvabmVC7LF3kZO51ZchTXp/U+ReScJMa S3GzBXg/fQQfwyjM6kW4dmRXw9o2iuwPWzDqASKM40RxKBlbjwMxHHylgAJTEHBbhJzX l1SJvDjW0hCDTNKuZ2sRqDA7wzXuK9Zb4Sxb+YEnV8IacXR0zYcm0HrHhVCHZgzeAjgo yaQCbmC1TE2FBpuBfTbFqenDwJskyVYJRv8jmnmxQxWlcR0fB2/HZaIDIP1T0gZ5KRci XmFA== X-Gm-Message-State: AOJu0Yz7oH2gdmfqzLqJR6pJEEnblX1cMs595+X6zS9gDrdrL5+dGWB0 QnH6DkqJm45pbZMuUrq6QbqLtQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_034800_524062_3D6D7CC0 X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org '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: 13349255 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B7332C04A94 for ; Thu, 10 Aug 2023 10:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yC6IL0+JagDYxzABABjN3kvU+rFCii6P4daF5BM3vzk=; b=zZYvRbS96Jzs61 sem4T4nDijHI9ORqyE3sc+FpN6/qtn0e730Y+F/jXa13ugbEwJ79QthoHLmVlDyAl5u8OsvUV3x9S TTsAWBwOxZIHmPCV8tvt73eRHUM2kcWaJe/SJMN3WKjEg0SDzQxLWa6p6hTM5awRwSRkNozfr3CpW DXsPjH6cloKfIqUaYCgCUyQxZdmFSfKmiX4324+hHXN6D1sWQJDj3AuofxrDdwUQ+yBT2j+blZ49O 1/nQbxevvQpSImtSgbBJanTpUXz58Zwk6lvrU0RJawE1m1arpXeuLEybl2VkbAXMx7/zxk1tJKE6P lNexbKIF76GBTt2KbESA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU3D7-007GJK-2f; Thu, 10 Aug 2023 10:48:09 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU3Cz-007G6W-2m for linux-rockchip@lists.infradead.org; Thu, 10 Aug 2023 10:48:03 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52364e9daceso900168a12.2 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=Kbii4o9ZDDJRDnjUUDdyri1tIFwp+u+yMgKz82zFJaexMBoPjRuUJUI+y9fgedGJXu qLFrqHxlIc4vQPOSsuhU9HDf6FP0fopqy+vQBksiKPTj5hYHejIKmpP4CLOE792bJPmB p3L96jYkysm+3k+m0wG41MIzMTjLrafhxi+6RbV7nRK5UuCQ+GhQYT3Av3IT5VgqKESm FqNZO5OSgj25UjxePYEEfh36OQV6+C2yL2X96hekVYaG2TWtBJol5/YgYYOIB8ziBgw+ A3JjBA4YJ/kWWZUQAUdzdxquCR4wprzwvGoyVbFsthZDYNpgIWnauygqLSKK2v2ucxdf P3XA== X-Gm-Message-State: AOJu0YyYGpLh0KIPQDcEZ8OgG4EgN0LqhIeh2fSGGe+95j2k/Kcm5hDQ cOz9NGK9gGLBIYmbWt0A5Rf6eg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_034801_911277_E1FDAF72 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org '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: 13349256 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A7F52C04E69 for ; Thu, 10 Aug 2023 10:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oWDLySLuZQMQDb5BC/di1Q6NKhDRIYATf1B0DUJNOQs=; b=Tx1qx659geiuqv w71AJiJYFaSZGxPA9WWknDpHx5GUW4GAPq2smIVyQHNh9ys3AM0mKtdpvP/I3UT91zZq5X+lZisDD lq0qXlICET7f8ODXeiaFXtD8YNfSy9bcOB+zPcSxxu83DXB0CYPebM6t50onQXivnRK+FzNVBJVz8 jyDTgA/TKIJuwbZybXklQjn+c/nFqxVNV87Y/ge8Yn5LVd0qF+so1JjN7s7oGvf7YF2pw1apdB5ZB rh8TcQfnCelvqwoRvX2g7grLLaAPk1SpbyDcDSJQ6yTb5OixenHYRmxtNTSc8nI0f+ZmxrRT7opGg BMlLX4R3O8EeA/dmXHUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qU3D9-007GLV-0f; Thu, 10 Aug 2023 10:48:11 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qU3D1-007GAc-0D for linux-rockchip@lists.infradead.org; Thu, 10 Aug 2023 10:48:04 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4fe1c285690so1095389e87.3 for ; Thu, 10 Aug 2023 03:48:02 -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=MTJryBON3MuXCjA3DVcEN7HCOU4ZEh1540QGCn6EzXtu0BCnRxOJJyDkNTfd2MPFjU e0POuAQBLcyIwoQtAM2e6m0LMgAs2RifZf8v9tSgBt1ousTjtvktFx0L/d+jkHtNhF1v 95eUNtlRYzTZlXYUGvtZGPyvKCcyFAruK25QdzBvoC7eM/ItO4560b2XKXR2AnvkUuz+ OXds9kd4NnMzd941+hsCasSsMir4lzqHLVqw32Aic/KrGUYWLDM374gu6vfpJ9v6pJga CGXcP2EdEB75xMtHKO75EdfOAEA8WxPywWti/GpcaJH9wGp6ECfPYxHPkHJ+3XzGilmn +PQw== X-Gm-Message-State: AOJu0Yzg0BnxTwS1iSD6LCjESEa/iTl3B8h0/L9ekkpGrvyzt50UQi7+ aJ8KSRxtMy9iJLZuGiL1ej4/nw== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230810_034803_132261_AB699017 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org '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");