Message ID | 20230816-void-drivers-devfreq-event-exynos-ppmu-v1-1-3fac11083742@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 4E6F6C25B7D for <linux-arm-kernel@archiver.kernel.org>; Wed, 16 Aug 2023 20:19:52 +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:Cc:To:From:Subject:Message-ID: Mime-Version:Date: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=L98FVW0Zqc/clY95nwDGjmFHsjSZ10Q8qx5IBT2rZvY=; b=XT0 KQD2zIVoXrv/kpSzHvzjhDgjp2rsHeUy5rbAFRE8g9R6EbHqKyUIU15BVcT6VGjRPQIy/luTrjkBc dKnitoXUjBIrJomR7N9sppOVnjoKPmqevv8B+w7vyGzPz4vIOivXJSCuo9zkmuZ6eMPezqGv/VTmY 9sGNyrAsk1hmUsPuUUG0ZQIbwd2H+KzmKg33HAhMIKo2eB890CHfWuhPbAbArwsqp7YcoVbNvmouV DMYzpB9iK1AQSLtBtQJtbRvL7XuCGrYaKluoroKUY2EmQFGQE4N6B4Rchyax+OHVdzVOYMNuZJd2o TsYYimPcz0MbVuStndx6fhoQigfvoag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWMzH-004wog-38; Wed, 16 Aug 2023 20:19:27 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWMzF-004wnj-1e for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 20:19:26 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-589c6dc8670so69976977b3.0 for <linux-arm-kernel@lists.infradead.org>; Wed, 16 Aug 2023 13:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692217161; x=1692821961; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=3wsWTylhhPdG3/T8LNZoJaxLDgLi/vqIDceWVK88NME=; b=Ht3ZRd1ImNrc2iTkzCJ5Fql3ljWCB2/SIVSsRNPxYYsUGod5lhvmeTUN5m3FrjuquK yL/RgT2BZliIqrkqCktYGQQQcjCncJNHHINboxuRqGGFWxbtQ1YDCAEtEKwrmFE4ZBHP UFxkKjPiw6Qij5Ai7S4lvAOmHBP0MUy6fAM+SSZwI/F5Z1pCqWikJh4O7NUr7IxN2+7V dC2jUXD03hBSxm5SCpr2+nuPq9ZM3WVjvxqaJCnHxvtyEduJvTqlMNLMf6Dt7hNGzZxV OObllt001yGEJEjG4sYLTOL+Q2yr8czIGVcvpF7v5/YIvcUWt2l8KuK7e8rBtnrhKKZG fv/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692217161; x=1692821961; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3wsWTylhhPdG3/T8LNZoJaxLDgLi/vqIDceWVK88NME=; b=k7laOty56TYpl0zxKQM7/RVZz1UU0FexJyiFlpFgWQ61rckplTswA4ObRq4H2Kx/BQ UsKdGjBUOO49CoaMA/nk1utOd+YM7A8EZjkltX9yZ8vVRXey/SCalcnt1Dc7/WQZGiyY LzATw7JPkP5gQhxDYbbkMqObJqfQ7k8QRjKsBScPv8mr4U3wE7BBO9C95f7d1PjL7Exm AZ4xv/mMnK3S7lODwls+baP3N6IRMkkWNJIxSLVIqBuXVAbtZ+ofovY8Z0QEtB2HBaQp rDVm4RI/upzF0G507vZaMX8hJ/F6aWQM2T5Qm+XAAe8+Idob7cCpmnYzSn87olm9JBfx qLNw== X-Gm-Message-State: AOJu0YyM4n/94b74GjEHlS9QwYQ9U89fYdDGAo95od11rItfDiLOYx5B wmiwqMeVil1RVORg/lX+xVuoECtfdg++nmLYZA== X-Google-Smtp-Source: AGHT+IF1NY2O9E+AcCVUc6YmSnFStWnAWmT+ayAT17Q7KEQNdNUBTRt8h9InsGVkNddn7kVhEA8MaXYUcc13W2aRUA== X-Received: from jstitt-linux1.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:23b5]) (user=justinstitt job=sendgmr) by 2002:a81:4407:0:b0:58c:b45f:3e94 with SMTP id r7-20020a814407000000b0058cb45f3e94mr37282ywa.8.1692217161433; Wed, 16 Aug 2023 13:19:21 -0700 (PDT) Date: Wed, 16 Aug 2023 20:19:06 +0000 Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADkv3WQC/x3NSw7CMAxF0a1UHmMpCVX5bAUxqMgLeEASbIiKq u6diOGZ3LuSQQVG52ElRROTkjv8bqDbY853sMRuCi7s3dFP3IpEjioNahzRkuLFaMhvxvLNxbj W54encY7ehfF0SIF6rCqSLP/R5bptPwOrzAp4AAAA X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1692217160; l=1505; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=3i09RUBjajBo5aL6e0TrKmXYq85q23Jzin6ZTPYdgyY=; b=S4oTPqidmSx4pnXekqz3cAvXwTPXkBzQ1EIFWu9hSsoThdtp9eduwMFBcm4W1kNzVJZvIyFio YGlmbwClC6pBWurTU/dRHGUj2NmAVzjjY0yT3dMx3QDNiHt27E7UCjd X-Mailer: b4 0.12.3 Message-ID: <20230816-void-drivers-devfreq-event-exynos-ppmu-v1-1-3fac11083742@google.com> Subject: [PATCH] PM / devfreq: exynos-ppmu: fix clang -Wvoid-pointer-to-enum-cast warning From: Justin Stitt <justinstitt@google.com> To: Chanwoo Choi <cw00.choi@samsung.com>, MyungJoo Ham <myungjoo.ham@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com> Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Justin Stitt <justinstitt@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_131925_555530_DFEB8148 X-CRM114-Status: GOOD ( 13.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
PM / devfreq: exynos-ppmu: fix clang -Wvoid-pointer-to-enum-cast warning
|
expand
|
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index 896a6cc93b00..f798e1d6994d 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -527,7 +527,7 @@ static int of_get_devfreq_events(struct device_node *np, of_id = of_match_device(exynos_ppmu_id_match, dev); if (of_id) - info->ppmu_type = (enum exynos_ppmu_type)of_id->data; + info->ppmu_type = (uintptr_t)of_id->data; else { of_node_put(events_np); return -EINVAL;
When building with clang 18 I see the following warning: | drivers/devfreq/event/exynos-ppmu.c:530:21: warning: cast to smaller | integer type 'enum exynos_ppmu_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 530 | info->ppmu_type = (enum exynos_ppmu_type)of_id->data; This is due to the fact that `of_id->data` is a void* while `enum exynos_ppmu_type` has the size of an int. Cast `of_id->data` to a uintptr_t to silence the above warning for clang builds using W=1 Link: https://github.com/ClangBuiltLinux/linux/issues/1910 Reported-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Justin Stitt <justinstitt@google.com> --- drivers/devfreq/event/exynos-ppmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421 change-id: 20230816-void-drivers-devfreq-event-exynos-ppmu-64ad102497f2 Best regards, -- Justin Stitt <justinstitt@google.com>