From patchwork Thu Jun 6 14:36:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13688593 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 A0CE4C27C54 for ; Thu, 6 Jun 2024 14:37:11 +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=sRozQPWnVAi/G7inxnzxHp8uXYGMd86EEfcd1fjBzq4=; b=V6PwEBqjtzxhVz A0VXcdPRvoPEEv/1h4Gt8WfnxNLEyBTdibW9PzsAmnh8XWOiH2KYuPCx++MeA0NgWhJ9XvfyusIfK pjldUnTCv8ry0d+vxYd2k+sgzYi/v3bB38Mqfwe+0nRKpHDWaOMEOfSVeoKb4CoOSc/9qMNtDkrKP sgeSpy6L+He/5Yfbm97921CNR23oBANmWeQ/PuW7xFWF+2bF9BOUCAcDDbthe7yvWdQfauqlSEeoT 1HDADopDZHNV6xHhqUwpVvuMMPRzUApnGrSC525ZM6i+ZgkOK2R4TdKetIRy4UDSYBisOoCq471Zh dfJo6t2UYuOjb2le7aAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEc-0000000A6Ua-0G1U; Thu, 06 Jun 2024 14:36:58 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEX-0000000A6TO-2hVM for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2024 14:36:55 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-421555a4454so10835115e9.3 for ; Thu, 06 Jun 2024 07:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684612; x=1718289412; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BEGX/YRM4abY7OJ5gwhaYjtg7TEA+2R15UHkn44kNAM=; b=OXW4nfKLQVpNQrs5txlVptIVnlabRBEt0/L6inXtUNT/bIZq3c2xF9Mm8WhOjJt6DB pF53CBUuFGXr9Qq/g3lpma74dwr4FFnS5c0RmqWDl2GlUsnXnOgrXRMwR5ODcazdD1xM vmjZdEG3dDyweWF+dw1dLyDd6abwk0YsdjXOemyIqlFnDaTu8JGcOWAwwk6YxGCQZCqe qPPfCBL7f/EJq8pe7QrD8abV7yFq3KH0q0Rwg2HjjNwG8juRuZUJu3WmshvaMwl3Qmr5 suiMBlreQJG3DKEFSyLYl3ZLeOHVk/zXNgKfWaG2F24ObLa2ZVbJhVrs76sy1hwFVxSs wNTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684612; x=1718289412; 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=BEGX/YRM4abY7OJ5gwhaYjtg7TEA+2R15UHkn44kNAM=; b=iY5VsglovaEkMELnubSvH5vsv6EN6eltuCihWSp1chNNyDdplLWxPCgELJzj2KHh16 RwtLw0SpK3LqAW3XEBhsWxO9AKC6xFemKRdtzbmnypTy7z6FOZERAp4WzUeSaq4aBZn7 dqax39TeA0Y8Px/MMGnwc4XG8sVPqDeYB7iuzo+WR0rdLk9emg2NfIQv2ZbIJmTF41NX 4PM9zmT300gWkZ2JFCF5m54ICrfNQvOLSx3jIMbD20+txzZCC1s+MFXIOFPiHfqUR7yf Jhk4sOmerfQ0qUXHYzksT1hguQA3sa/2ho2sWdSPjPADM9HESFfvSu+vv1cw8NJc0VHq jEgg== X-Forwarded-Encrypted: i=1; AJvYcCWT26r50YaXzR4Fc7il+v3ul723YmkOWGi1CXkGJdj06LOARzQbxCiKXhlNSnWUyMJTZ98HsfZuEs19o/pNabtApUVHxfL4dpNUlSTJ12U1vkhwcRA= X-Gm-Message-State: AOJu0YwhcYUXGf9cd1FeFeFpgOgL5QdqI87kDP3nwxSOnTjYAErbEzHt XghJkmZGcQ6UTOxaCu+n0vKeDGD4gaG3OMJ5Sdr8fLLN/fbkC8eyON1qkjnDg8c= X-Google-Smtp-Source: AGHT+IEzOvqTcqQFVTM/zPrDfgG4Ch2gvXbBob36jdrxqP8DV2hXHRxxXD0hBtX3K+evZarwhWDdKQ== X-Received: by 2002:a05:600c:4714:b0:41f:afa6:3d85 with SMTP id 5b1f17b1804b1-421563504aamr51262215e9.31.1717684611808; Thu, 06 Jun 2024 07:36:51 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158148ffasm59540865e9.38.2024.06.06.07.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:36:51 -0700 (PDT) From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, llvm@lists.linux.dev Cc: Krzysztof Kozlowski Subject: [PATCH 1/3] mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again) Date: Thu, 6 Jun 2024 16:36:46 +0200 Message-ID: <20240606143648.152668-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073653_840646_669D7D31 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 8f7472c76009..67bf4de4c0c1 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -397,7 +397,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c) return ret; } - max14577->dev_type = (enum maxim_device_type)i2c_get_match_data(i2c); + max14577->dev_type = (kernel_ulong_t)i2c_get_match_data(i2c); max14577_print_dev_type(max14577); From patchwork Thu Jun 6 14:36:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13688594 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 E3EF6C25B75 for ; Thu, 6 Jun 2024 14:37:12 +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=IY93kDoGGdTqzL0GtyHL4yi4QsAv55ikLyUYboS6U4Q=; b=H0TlSzbqiawimE 1WkgM9rkzU0nxjyGLU1mg0jUm8dBsPhXqR/JOji2D3Kob12/ve322N95DDftAsnJ44RG1/KHqtzVz 7AL4AFauBH3lxxfvThZk0MpmYrkszyheLmWNbFJY+G87VNC9XfHkCYycCx4Kn9ozInYAA8kufAu3P UcnLSA5ytBh6WdYkKULJr3sGKJ9t/8aPpMPYjUoKOHtn/7n+QOuLb5bid3khXNW/IPXGsX+LXP4+M a31+aWK9at2BYKqGPtcHHiAHqEjGH2BpyPDICGLiSAY9Kstxs2HOKqo+33hnHwzKmyjIlJoAuogDP kRr+E9mLUELjFAq+QXFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEe-0000000A6V1-30Sw; Thu, 06 Jun 2024 14:37:00 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEZ-0000000A6TW-2H3G for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2024 14:36:56 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-421396e3918so13843005e9.0 for ; Thu, 06 Jun 2024 07:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684613; x=1718289413; darn=lists.infradead.org; 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=kFnV2pRf1FmcK1ZExXtDIcGcJDZUgCsecv4UoOT/g6I=; b=gFyy2blk2JMI1p7rxE9SP3fBK6pqCNhkzIHdllsLWxVEHIIrBTR+fniqtIIaEk9ShR du6mjk3vgFUscJs7JeoHd1wHSWSMNjlVssNiwvEFhvS3MfCA7VHhribnKL6fKBvtifzR pYA/bwO+keMMHSIxl7fuizbml0/yeoB5Ap8Xqo+7tMaILKVkbQeavFbGotjJZDIFUvt5 MNS761KVV0XFcgBh4KYQZJUtAFLtvLZ9HTGT9pm7/6mD38+uzjQ+qg7gvWJh5s/hkRvZ Ri+Zzq+HnycDetawbB1op5fLn9QDEDgfgczGVIdA2+6DLZbxatqZrBhxu4CpxLrtVP7M KcNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684613; x=1718289413; 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=kFnV2pRf1FmcK1ZExXtDIcGcJDZUgCsecv4UoOT/g6I=; b=uItG1mh5sbYYsh23GA5maYXY3iOVSSDNqSWZHHQ+Et2EmQymsyGwzwDXsFghGxaui4 IXkHwLCKcp8ncW3JYNvTAirXGMkTIagomGZqjKRvMh7pmETuqSGg7CGYsbQPyJMlXTa8 czGeX8r2wY8U2Rev+LgE56078V9OZzOnEusXK2r4YkwJs6kCUD4fuxXqy4zVdmLweIKg VnQ4yro3gkNuR5YJ+Go9MrOSY+1IFECXCHGUtvQC1dL9e7VK8ZEUEd3s7/pOv6GjTnAo hPpTY7Fxf6+/Rqbo8FjVFCci7m9J1pNUWp9GqzkHN0fYB77iPzUzgZ6uoItstGSXWhzh ZuPg== X-Forwarded-Encrypted: i=1; AJvYcCXILXzYv7mprZAFc+AS5NSw6Ovtcrbk0abqxl5WFO+3dw+rsQzYazol28dd4I2BEPcARX3rvYLxGVTsMTYorXOCpUfFR7gzW7vs5cv8XV0pMCoalvg= X-Gm-Message-State: AOJu0YxyoH3uLGRaMVQ8cVt+0ysyOgj7UFe2TlG0RiGZAsmmN+p4J8QA YcXQgSoHR0zqeRhdmy7Y5KiWMnXJPZRNkkSP6LiW4GZY/JoGs9kZeZQh2o3D6co= X-Google-Smtp-Source: AGHT+IEl9ZyRAcSIX5UQpPead73VIlTKgZG4JDvlzUJFXbj34q/+RJSy54ckSAI9W87xI9+q/46GXg== X-Received: by 2002:a05:600c:138f:b0:421:5604:d1c1 with SMTP id 5b1f17b1804b1-421563503fdmr64858635e9.35.1717684613218; Thu, 06 Jun 2024 07:36:53 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158148ffasm59540865e9.38.2024.06.06.07.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:36:52 -0700 (PDT) From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, llvm@lists.linux.dev Cc: Krzysztof Kozlowski Subject: [PATCH 2/3] mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again) Date: Thu, 6 Jun 2024 16:36:47 +0200 Message-ID: <20240606143648.152668-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240606143648.152668-1-krzysztof.kozlowski@linaro.org> References: <20240606143648.152668-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-20240606_073655_601223_E9DB63D1 X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/mxs-lradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/mxs-lradc.c b/drivers/mfd/mxs-lradc.c index 73893890b50a..b2ebb5433121 100644 --- a/drivers/mfd/mxs-lradc.c +++ b/drivers/mfd/mxs-lradc.c @@ -137,7 +137,7 @@ static int mxs_lradc_probe(struct platform_device *pdev) if (!lradc) return -ENOMEM; - lradc->soc = (enum mxs_lradc_id)device_get_match_data(&pdev->dev); + lradc->soc = (kernel_ulong_t)device_get_match_data(&pdev->dev); lradc->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(lradc->clk)) { From patchwork Thu Jun 6 14:36:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13688595 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 F3F3EC27C54 for ; Thu, 6 Jun 2024 14:37: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=GAcPGYwgu8VqcfF1OkfwW/D1aPum0y0Rs4sg2oWv9x8=; b=eWqRAKVoHUgQ6y t85Kbt/myfu6HYhsaO1JFYlztwL7FyXDKGSrSFqlhgNyeHr2Pc7sRIPcFQ9AV6HvA2Ut6iwcijlD+ nDt1haRQxqtFrOGoXpEwpF0EnIS2xq6HYxUvWKeGIM46IxNs5pRHEyG+xJ4/X9YIcZnqesFE+5gAG OaZ8sAcuATI8DFh9ds/HnRYGKtjlwb2OR58gVTcanIAEyxXKGIL+rXXfNN2kX6rT8iS146Ed+qtr8 c8Ypkq77X9fJwxViCU0vL6jkM3AXC7y0DyDUUQoPWzo0nPgvHFxiuVbCG6Po4B0dCCP7J51a58+PB STy45cO5D9fcBKK+/tSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEf-0000000A6VJ-1bDj; Thu, 06 Jun 2024 14:37:01 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEa-0000000A6To-255V for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2024 14:36:57 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42163fed884so1965635e9.1 for ; Thu, 06 Jun 2024 07:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684615; x=1718289415; darn=lists.infradead.org; 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=VJGZ6Uu/K+CEvU7SenPD0ND/ZswoEpORmUYwGdFQeI8=; b=gUUHtKLSW4BNkuMSPd/vbNcksj8WBxuvkFSBQR2WsuRfLMconU0ir6ge6hJaEIlHcp lsMqfUkqY6iNaSPUL3vQI8PFC30wOXy/gzdWejwYRSHdyJUc8Tg8icEG4ecrnxUaY5P2 7WxWlpcc7CDQsAPJ0oGVlgveq+JUBZL0PQulGnFO17PcF3KhQm4F+cSxqLrj5Fv2mwrl 6R7aLEyFXv6QrpTtzWMB/bQpCzRBJl4lnxKtZxCBH8Y4WYQqNXUgqR8P/hbNZTUUurs6 lxOJp8gp6C65fkOqrEpC4QK10Y7ZQOcXaMQCpdDYRHQpQTIxFonXvmZ9b5kWvVl5whh1 Uvkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684615; x=1718289415; 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=VJGZ6Uu/K+CEvU7SenPD0ND/ZswoEpORmUYwGdFQeI8=; b=Pbrp7oLfUv1+co30JV6DXFLXKUyG+ZRbvgDMW8f3CPZaSCy7JEHzVUnC1clbPweW1G DptHucDf/e/jAF9aMG3BqMeb0SOjyppXT9m8HBygwdNkjulNw06l6UQhcjujJffxemJt ilrCbauT+wsWON5UTM4EVvITE9dAtIx0Tb4qhPNnzbAfBL22u+pZ2t+eyijurkgjzxd9 Zzo5j+7FaGpvBY6iyOh43Av42C9JPDldfTyx6K4MaHOTQsSZxXODy1iuWVsb0cN0FRJ+ X44OhLshCNGkIPv5lzWJVzM4dNis8hppvy2uz7EBJ6Ifu7S7nAMcM1KSQ3gpmajZpuwl CgYQ== X-Forwarded-Encrypted: i=1; AJvYcCUIeyDBfqrAhRlMBeQiBs0C1a8E4y9X9ClQIQOYHckMCO2fVcl7UPDyi1DZ/Rd7OYBRuXUe7I7YDtq+37r4murCGXRTk4fKnDZHor4wMMx25NiPlHU= X-Gm-Message-State: AOJu0YypvtzT4xFeR9XkXh3UDQlvaVkYig9hnQejxc3stsjo5KAtHd4t Il0ii56RGLPY4UyfiDxG4bN8Jsq66f5tVFt6Izrn9k5Cgcl/UVniK7pd3SnSQyM= X-Google-Smtp-Source: AGHT+IHZn6oC9SB1W5aaL9cA3jdYYQVK4SRCy28QGjtvWm+2YyXB7pITSCWXefonmyHypnDRsqTmMQ== X-Received: by 2002:a05:600c:3b9e:b0:420:2cbe:7f00 with SMTP id 5b1f17b1804b1-42156357f60mr46822585e9.39.1717684614611; Thu, 06 Jun 2024 07:36:54 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158148ffasm59540865e9.38.2024.06.06.07.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:36:54 -0700 (PDT) From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, llvm@lists.linux.dev Cc: Krzysztof Kozlowski Subject: [PATCH 3/3] mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning (again) Date: Thu, 6 Jun 2024 16:36:48 +0200 Message-ID: <20240606143648.152668-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240606143648.152668-1-krzysztof.kozlowski@linaro.org> References: <20240606143648.152668-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-20240606_073656_556696_B09EE298 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: wm8994-core.c:625:17: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Charles Keepax --- drivers/mfd/wm8994-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index d5ac066f9db4..094c0b3dbd97 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -622,7 +622,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c) wm8994->dev = &i2c->dev; wm8994->irq = i2c->irq; - wm8994->type = (enum wm8994_type)i2c_get_match_data(i2c); + wm8994->type = (kernel_ulong_t)i2c_get_match_data(i2c); wm8994->regmap = devm_regmap_init_i2c(i2c, &wm8994_base_regmap_config); if (IS_ERR(wm8994->regmap)) {