From patchwork Thu Aug 10 09:12:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 713309 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63C87C001B0 for ; Thu, 10 Aug 2023 09:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234685AbjHJJNC (ORCPT ); Thu, 10 Aug 2023 05:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234587AbjHJJMd (ORCPT ); Thu, 10 Aug 2023 05:12:33 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449C326A5 for ; Thu, 10 Aug 2023 02:12:29 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fe0d5f719dso996422e87.2 for ; Thu, 10 Aug 2023 02:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691658747; x=1692263547; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Htd/z2F7UUScMygTNeT7Itp1hTM2TNM8XLM8S0EeMbk=; b=yfSdVESMRpRIqdOLo9ElSeY5VhUcLrAhe9vvR74OF27QX7tn8JvLFYN4qIXSQ6LrKN zp+rtZscwMT2u+cliOkOlI1ijhyLrQGZrXZoH0eK4YjoUBqzb4kx2Y5xvHKJHHOhBOSF ddS9gdY/ynd4QmvcGEidd6g4tBy0SeQn/MveMwxc6E3OiP9b9FqGGsc8xojcC+70Iyeh 8jsbbsFVH50wP/LCTkQK6IKVj6KjYqj4c52N/xVsV/5vgAJz74xTZmP4FzoA3SXDKxUi jB4hLTNv7+RzEyai3VX/XuaexBUx56HlEoacEgR9I56wKQVGZ7lI67JVKAZI8TO7lmVn 5wEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691658747; x=1692263547; 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=Htd/z2F7UUScMygTNeT7Itp1hTM2TNM8XLM8S0EeMbk=; b=FD6Si7vqmY3T+ROytxUfwu8jbmfebMqzUcUXaCrASi0u2tdO6PyCcrnRVLgy56VDZ3 utz9vJMMnaSjQzOdXPhoGzsMUk+NZYf5IvZeXLZ3Z5XyNwpBdLfKHMSJTGzpZrx77s1s rHqBqr9DGytJ1K8ZRk2XSDUQkkOLKbP0iumTIz+lkxge5SQVHzm1atHdIKLi+BQP38Zo YUw0if4KVKB8dNDh7V8OJ/muyPIe1PGkoNTiEtqw+D1NOR2mi7AUAf78SHroj+xmBSjj kI6TibzMeiFsPK51wABeTwEnvGwOEmJAc9p8vOe4VpkGMOY1kv0wHOJQIZ0BGJfmvrYz SWDg== X-Gm-Message-State: AOJu0YzEKPyu1DBd4+FtnxOcLq2sSwQBSdHaFtaLGN+ij+A6fuW33fFW GNgHTaywAkacwMa6IZdrn0mTUw== X-Google-Smtp-Source: AGHT+IE6Iks4Spr/j3fclN0BH0yxXPY85IWHUb1d17wuwqtArGFuIGsqA+mNTYIL5i+q7A7/N7gOfQ== X-Received: by 2002:a19:7111:0:b0:4fb:cff5:3963 with SMTP id m17-20020a197111000000b004fbcff53963mr1104029lfc.60.1691658747473; Thu, 10 Aug 2023 02:12:27 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id f14-20020a50ee8e000000b0051ded17b30bsm531961edr.40.2023.08.10.02.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 02:12:27 -0700 (PDT) From: Krzysztof Kozlowski To: Kalle Valo , Jeff Johnson , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath11k@lists.infradead.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 11:12:23 +0200 Message-Id: <20230810091224.70088-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/net/wireless/ath/ath11k/ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 139da578831a..ada4d68c7421 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1121,7 +1121,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev) return -EINVAL; } - hw_rev = (enum ath11k_hw_rev)of_id->data; + hw_rev = (uintptr_t)of_id->data; switch (hw_rev) { case ATH11K_HW_IPQ8074: From patchwork Thu Aug 10 09:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 712582 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C0A0C04A94 for ; Thu, 10 Aug 2023 09:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234608AbjHJJND (ORCPT ); Thu, 10 Aug 2023 05:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234591AbjHJJMd (ORCPT ); Thu, 10 Aug 2023 05:12:33 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B664626AB for ; Thu, 10 Aug 2023 02:12:30 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fe11652b64so990297e87.0 for ; Thu, 10 Aug 2023 02:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691658749; x=1692263549; 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=S4vMnao8ynro5sLCotm+nXaNSlXbnXYXpD09POJdN54=; b=PRSq9Xj1IwTUFdZFXwacGPyOX36KteDLnBAqQZN52uLMB7PYQf2EPsvnZVy8gGvjbz KVFPapCZIm9wwTvAmbRN1QYN03qcVJOOkA+tRZhFv0wKfNH6uoHZyxNWALRl9pcIek9o TJgsjeSHCrMGD6ZBzNcLXdiB6Pf3coayM/uku3fWcqyBmunH5meFWWQ+6KbjNdeIgM2n LgNwjeG/+D2cmUuILvGz1Ll9sGNZKUOG+O72D9Vaze0sB1oQ5R19ABkR2BzpbaJkKN/2 aPm6aTaJrmhvP9MNjqsVVIAkntwOlJqyfLVzsIASNvwmN7ecd7armrAo1nfsqWXIq+pz 4sHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691658749; x=1692263549; 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=S4vMnao8ynro5sLCotm+nXaNSlXbnXYXpD09POJdN54=; b=c4N4+23t0Mar+G7ItdHmwpvq2n0pT2MEsF0yw0bexJkrxFYUZ52mNxr3lFqT+j45Vo u7IWvCXHGooHJxznJDgHenaEWMlfRZXwXG9oORPbZlUufs+79PvtUwfi4i2lsdMv31oa t2PdE74SBi8WfQ9s5gF6N4sZQIsoKo+sfbFnSIPEb7BXRAsBcMcZgEPKfToNfTguL0JT TWTh/ulLTHsfgDQqsCF2gLMTk99WWvM26WiQjWevJrOaYwL4iD46S9FbkgoBLFrtCu/M RzO8HlEEUx68/JXEWIVGoojBufhbYIYF9lazEAPslkeb7ud9QajIRhOhp9BErfZHWNrt gANQ== X-Gm-Message-State: AOJu0Yy/7IPxsAffsk57OHNtGHtZkAVT0F2s88DDUNCaw29NHldqeBjH 8f4/ffZDoZDitWk07VuS4k0Pcg== X-Google-Smtp-Source: AGHT+IGm1zgOhdplBb5O86k8X1Zn50kKdJzv8/v8exGVX3ASOQXPtGqlZ9dJZM2GlvtPlOZOrjv0JA== X-Received: by 2002:ac2:4d19:0:b0:4f8:5905:8e0a with SMTP id r25-20020ac24d19000000b004f859058e0amr1236690lfi.6.1691658748922; Thu, 10 Aug 2023 02:12:28 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id f14-20020a50ee8e000000b0051ded17b30bsm531961edr.40.2023.08.10.02.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 02:12:28 -0700 (PDT) From: Krzysztof Kozlowski To: Kalle Valo , Jeff Johnson , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath11k@lists.infradead.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH net-next 2/2] wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 11:12:24 +0200 Message-Id: <20230810091224.70088-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810091224.70088-1-krzysztof.kozlowski@linaro.org> References: <20230810091224.70088-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: ath10k/ahb.c:736:11: error: cast to smaller integer type 'enum ath10k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath10k/ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index 4a006fb4d424..95bcf54ddc3f 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c @@ -733,7 +733,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev) int ret; struct ath10k_bus_params bus_params = {}; - hw_rev = (enum ath10k_hw_rev)of_device_get_match_data(&pdev->dev); + hw_rev = (uintptr_t)of_device_get_match_data(&pdev->dev); if (!hw_rev) { dev_err(&pdev->dev, "OF data missing\n"); return -EINVAL;