Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1004220rwl; Thu, 10 Aug 2023 05:12:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIVaHsXbMXDjm5YSNRdsgOrAyCN10MyCFrkPl1a8R1Mpm8QMwKMrrreHbYY7EnexGMuSi7 X-Received: by 2002:a17:90a:8b84:b0:268:2523:652c with SMTP id z4-20020a17090a8b8400b002682523652cmr1929668pjn.31.1691669559451; Thu, 10 Aug 2023 05:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691669559; cv=none; d=google.com; s=arc-20160816; b=ikl3wKr2m2jrx1YSLRAuzMilg41ylBja0UhGOjcoygtnK3Jad2ymKT8GIWLHrlStAn nypkPy0MTCkzupeb6HL8EEV0CdHygHtuZ7o17XutSg7qJcJ/6sto4OPPjwD1XlTXCX8+ 1GRjqgIEiGGsnXVpnVuBcJk4OIliqaBnYnq44LNP/uo7m8NlgyijQON84x3XfqKCT2Lj 6UHKIZ8HypixqZy6GPeexck5QHcE9HblibRc7zmNu7QUIBQjwm2FZmQar1u4B/s8XpfM UbLgdhKmqW8Oq9m/qy70F3Bu/E6qCrl4+dvBFDP//Lmra+W8siIFE6+cyBuNet935JKz inbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OyZohlw6gTKzojkyNd13CC0T/G2VwEgEGSl6K82xhVw=; fh=WBlI1L+yoQSe31GwwUqQVKDOBZlMUDrlf/nUBWAshIs=; b=SSJNqJvzWb+h2REcH0qe5NXmm3wNTj8p0VCTB4bIcm7S3nKKGr73W8WbUKFtpX8r68 NQQJDneh11cTHNiIGfCOVBiFYnrJSDKzFx1sD2FVW25CABZdKs5Qnv6f7btou4To0br3 L17YfTkCHSRuX3+EfaCmW+XbuxamWKlVnQuE1kxmYn5VwKL4j6GbmahtnC6zQEnn1FSv m4KbangmAjceJb0yLNHlcKDOCTEHDkXT0YkRRHMvqN7e/uP97Fr1CBacwxmlXJj1b5Hs GGqdsQHc9IZMUcbcM7th0JaySyRRICEYPUYuCW9mTJqWtoaZmUL6tTWee3b3FXsM+y7k liYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kPoib7Op; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a170902ce0100b001bb94b312ecsi1371663plg.296.2023.08.10.05.12.26; Thu, 10 Aug 2023 05:12:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kPoib7Op; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235255AbjHJJ7r (ORCPT + 99 others); Thu, 10 Aug 2023 05:59:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235048AbjHJJ7F (ORCPT ); Thu, 10 Aug 2023 05:59:05 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F05E710CF for ; Thu, 10 Aug 2023 02:59:04 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-317dcdae365so668281f8f.1 for ; Thu, 10 Aug 2023 02:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691661543; x=1692266343; 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=OyZohlw6gTKzojkyNd13CC0T/G2VwEgEGSl6K82xhVw=; b=kPoib7OprwN4AKPrr0KxUaWGgeFgnFlK9LaobUpxjQMqx2tbFiGz52D9fQZ6A8LRkR GOCz/x8QbujG99dOHRyOW705kiQ95NvqD/JEaxpuGc7uk8+m9CMYO8e3NdBtTRFWgOI9 rf1EZhcmo9AMJjGngTByavgqVENOgfgPg/kKTegyzQ46fI9yO/1RM+46oSlHWi9P1z/f 183VoIrE/PlNo018lajk2rQaW7br5wfQFgoNRnNnIBxvMmvCIy0bjd4UIhp7d6gIaE35 f4dL2WtNzwB3NOnpB/u20SOZ1rXesFtHZFMmyi7hhLcj0st1LMs9ajP6M1M8Gpi/rcdk NaQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691661543; x=1692266343; 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=OyZohlw6gTKzojkyNd13CC0T/G2VwEgEGSl6K82xhVw=; b=eYJjk3uxiLTUFAb4tnbcIcjSs22e9irBINnjFZ4haUeZKsE81NLBxRaWy2GIL0UavL UDcaad1sGGal8Bn3155hTCUiSFB6n1sr4eSAcO6D/fSl1rW5MN8T+roYK9oZFaIBkoat 4Id8PTMyoBIFkgtkCBP0Yy7B78KG4UuBYANFPOZDR/r4AvR2KuIvjfhfDz9a/8NIzUp7 7nMpGV3Hi7cgGpMQmOQLE0BtFWCz+HLXGThdMkuFEp07wq5BI8LKkkNZZeq1koMYYoFD vdAyMHecmTQ/+8gP+rj2LjS89BZ1OP0Hdf3ld9CjfMvppqY4WYvPAyPODebxRnZJSuQY wxeg== X-Gm-Message-State: AOJu0YwHO2xdv6bkqsQjxhTVVnIhucU7ozUtr+GPqpVIBz2hWPZKTPIp sID0cLlLAkObdrkoo3nlTMmgBA== X-Received: by 2002:adf:dd85:0:b0:314:3985:b291 with SMTP id x5-20020adfdd85000000b003143985b291mr1613355wrl.15.1691661543602; Thu, 10 Aug 2023 02:59:03 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id p1-20020adfcc81000000b003179b3fd837sm1621372wrj.33.2023.08.10.02.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 02:59:03 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Chanwoo Choi , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com Cc: Andi Shyti Subject: [PATCH 8/9] mfd: wm31x: Fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 11:58:48 +0200 Message-Id: <20230810095849.123321-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810095849.123321-1-krzysztof.kozlowski@linaro.org> References: <20230810095849.123321-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm831x-spi.c:36:10: error: cast to smaller integer type 'enum wm831x_parent' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/wm831x-i2c.c | 2 +- drivers/mfd/wm831x-spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c index 997837f13180..694ddbbf0372 100644 --- a/drivers/mfd/wm831x-i2c.c +++ b/drivers/mfd/wm831x-i2c.c @@ -36,7 +36,7 @@ static int wm831x_i2c_probe(struct i2c_client *i2c) dev_err(&i2c->dev, "Failed to match device\n"); return -ENODEV; } - type = (enum wm831x_parent)of_id->data; + type = (uintptr_t)of_id->data; } else { type = (enum wm831x_parent)id->driver_data; } diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c index 7bcddccbf155..76be7ef5c970 100644 --- a/drivers/mfd/wm831x-spi.c +++ b/drivers/mfd/wm831x-spi.c @@ -33,7 +33,7 @@ static int wm831x_spi_probe(struct spi_device *spi) dev_err(&spi->dev, "Failed to match device\n"); return -ENODEV; } - type = (enum wm831x_parent)of_id->data; + type = (uintptr_t)of_id->data; } else { type = (enum wm831x_parent)id->driver_data; } -- 2.34.1