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)) {