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: 13688590 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C1DC38D for ; Thu, 6 Jun 2024 14:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684615; cv=none; b=hy9NjAlOpr/nhLSSWA0h9kwCyoXI+rADB1g8r/7EL4pC8lxwKhoiZr9vJhnk6vhWW0GnobM+aPPiyXYD2lWRfjUmh8W9kqubuPMR29q3FSc3qmFYrMFDwbgxQ4MLAjNvxrQw3c0iYFf9Gx9eGKW907rThsA/c4rzTlQfhNWNfBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684615; c=relaxed/simple; bh=HYbaZvNxTbJKa5f2sNO1p1OoBPjJdhGaLI/bsnkYCJE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AYH3Ar4ISMbeq3P0hZOOxX6wTpt8+tdqXE86LkBIAwLeVl7Ty7OJD89QeQskDkSQ//aqzgmTKkEEC/C1Ft2zGQXJyiCrrriULdNKEXjQA2woantVaUocfScM2xcfQfaS+FufnbXvO3iJSjLmkxLztiI71oOsS/cU4kjDtFdbzEc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YACCMcyk; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YACCMcyk" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42158db03a7so10859115e9.2 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.linux.dev; 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=YACCMcykr8os8IREvnNpEwMbFCq4Gd3GQXgeWS0YqyTDg7E4NISivyIn/Y4OvUnDJ6 B5Mxu/A7UF5KwiLgW4aDCaQiassHwaPAjuErmHIeETS+Nt2yFhWfjMw4GUIjKXo8NGTU I4a3PKwNgn8E1aVH9FElXgGOiS65bKOEdJY98AdtOTCtDj0h09VXiJHWP/B4wkK4jCWv oQBllAvK71p22pthzRTz1f+yNy3+ERAKu8QXSVfwi2mZzlpHkb7/iRGzPBG52s/DDJjB N5U017gTTi/0Ojz5ldcdOOuVqWMvThPS+3DRdFo1x0tF04oZDKlQEHC4pr2v1zlyUX8C Qwgw== 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=pysYhkpOSV2mssXj6qtnaas4gBq7MM/HiL5ceJ1hAxJqiAmOPnYbJFZ8pa7fL0odX5 JWQNWYaFkg5qf8ctpP50MVYDB0eD3MZj+bEk1Hs7aXpcy9aP9iPoHuyle2UrRHgyeo+K vIEcl00tXzMGYpz6QjReBcwyXCphUbWYgPC1JNf6Z0Te0wpo3A7fPgoVIQAIXQn4Gq93 3t0ag59Bt9h0iqJwr54EKTj+8vVF0/lbCGajEtkQCQnQSxzphc28KB4U5Zm714Rl126B xiihXx+0A6O0J2+ZCOZNmiPNVCRvG6A7ew6VYcnQts2KZUOoFU3yBatjBSan6VF30FxZ DPWg== X-Forwarded-Encrypted: i=1; AJvYcCVBCCZkWPM8hiu5slYtiO/Rw566J29c1IBHzD37dVMXxcYgYwr8uwnXGFmxKPd+DmTb1Mu+pG6E5WphjbYk6YMyTxEB X-Gm-Message-State: AOJu0YxANRUjIQnPuemdLTxMrL4ZlAB90Lk/hK0TzBZFdLMzYRGfWYKh 3dVuH5H/pxgadWi7Pb603O5PGXciQMC9CuZp9WPqw5aJm7kiu6VChOZ3tTe/MCY= 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 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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: 13688591 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8F191974F2 for ; Thu, 6 Jun 2024 14:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684616; cv=none; b=jri3Q/fzw6/Qbico6LiFh7rXr0vu5dBVnvzipQTI7Ob7OLEtEdPCZ3iKdOKUU6d2KYs0Vpqse8S+l40xXbcOBznW1UvwjNIaCO0KjNvD1iClGVB/7VUQ6zB0AplBd6CuSCI2R4vAPtN+eZG2GCQdOd+AnrbP1K2HQD9u0WyZsRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684616; c=relaxed/simple; bh=9gyIokVicuhxbeWTupBDVovN5lebwLBLjKOrrkbqEoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bGYPHad/XjaWLshpkHgXwSk9QjVsdc1atSqSopIIeMWdnAENNvJGRMxXXYVVSmOP6kAyzMwE/a/iOA7HNCstEJ2rTtY6CheO4IS4UiiaHsz8u6EuAU2Ge/SD2q1YH3keo51RMiCYo89zVnnaep6fgd0iSG7qo1nNXQeuI4OUac0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=OLkb3e8X; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OLkb3e8X" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42159283989so13472325e9.3 for ; Thu, 06 Jun 2024 07:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684613; x=1718289413; darn=lists.linux.dev; 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=OLkb3e8Xobph7PjZDIkDq29E14dp7IiFJZJPpD13MazK4wqDoe5Gkf7XgavqtU8N8m 4ula2c4zbKDuh8coRhqALZVzimB1wG5HUomDID3bbeZGNkkvU+iDee0hLkeh/zeDDS+V /HPvCIsmDr7X0la2mox6L2cv/QN0d7+03kSTWiugQK7dCrdCZ1smP+0ADPp3UCiEs6Zi vTMBKScQ1jNeHNeNK9+jEgc1aHd1+UFmzM9pQFZJO7aqnToBUXTJfAv6TqxMSfpBxtpV HDiimrD0auDAKH13adIL6PustdZIvHy38D4MHTKj+otV55Rx5YNK19xu6pgTxuzVMMcG FK8w== 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=VqWV5hR79QiiaVuuG7n3ctqFWH3KfNhebUo/dGNmCUrbBzE8mBWTPcPP7fzb4ttHcG 2344GRzDYynINBOB6ht2fqo0+pk+R+jxhmAb+fNO4eyKSqRpQCcONjDsjlPZfTOBMEkK UmEpRwWCu1WdcPYOKI878gycrlcUlM0pHYLGX1SG9I1VODZaSXv5jja18B33C0cnraJ3 JoQuRMa1wD/GEa5CKAL62Z1O2zjhsU4v/7/V+gCaA3ezKqyjIV9O5WtOP29AFjpKoagF Tj+IQWYJ2QWglwnijIXiH62zaY+C5jRuto9kyQnwpCzVy6cnUcwiLKvzq1Cy9LLE1QX9 WsEg== X-Forwarded-Encrypted: i=1; AJvYcCXBEShVOAUQrdxlVZLjYUtpmHTDCrFDZbCeoIncRJ3lgGPhhn0NF00hdcnK4G1QseFwcZESiTus4KDeCe/Y9piJdVUE X-Gm-Message-State: AOJu0Ywyna6Mvmhx/H//uQ3zWKpjhMp6VTXyWruk4lRN4JCmZQvWQ9ar 2zS3EbqMvBE303X9jggFpQob8EQyxw3D6ZHEyW02P5GDQbyi5S1+Y98Yd+5TRHw= 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> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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: 13688592 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 476CD19CCE6 for ; Thu, 6 Jun 2024 14:36:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684617; cv=none; b=AU6iXPXHpOP13h0dYEiVr9616Q88FJpTBk/rDqdP0YqbPqaBriAfOkHI/xJcvCMAeVtexiYdbGT/rBtZzNe1n9x1Can8lqETTvU/NYQPm5LVWUHsmVtovYD4ypnR2MRwUWj555ayIwYMYuKwHWDK3vZjQtKfCl3uMdtJO9YVHxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684617; c=relaxed/simple; bh=HoQgcM1v61QTQaw7hxevdOwl+gFbD0LvX+R34v7HQUI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hVyAsbHTJguSF6vCjf23o9CuKEV57rVGYs9cdiu6B9y+UEUzVXppAvovmHwkbghW8wzt1t7lHaSj1rJ/nLjZ/xTKkoXTVxVK/arYjAgeiTc4PAqpLqof7UWMXUaF82PxByFB63AhFqJBFpk9SpUVwNk0RNHiqY4bTSYQCJiaIwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YmpS9pXL; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YmpS9pXL" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-421572bb0f0so11853695e9.0 for ; Thu, 06 Jun 2024 07:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684615; x=1718289415; darn=lists.linux.dev; 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=YmpS9pXLwnZlqDcIKxCW2tQwXFdlfO/eh+IacgDSCHwL0BtynvGLsP1QP0YZXYA/QS +Ecq9C0crTNOlby0Cpz1v5z/bRd5AWhmJvt2Ub/N77BP+RW8DORNQtVUh1oB17xzl+11 WLfVFjX5jeqk4THE2C4E7TmhJfe582mGlWndRY9fRDuAtuoJxIb1QWG7qHyHwvNlaXro rjWa4h+9GpJPz1YP2dy945kzSP/M2oRilnGBVWElnIk1DGFvRf8jdptvwim9QaF4kuYQ WPg/7i3oYdsvkDYYnnssZ7TS/O6cjY8IKoMPBr3dJgocNnJHPQ0LTMf2dmppTVv9yWEf M6iA== 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=ERw/WfCSpL3lWT7fwJovHf3qCkJPeWnX5Kg8Sub2Ewv2XO8qqAOFczpxTI3OmWH+jF lsNDQqrmIEcz24YfxgLcAEYqMb9J7/+/vdH7tvTE1DcT0K11xAVDxMNCs6DrlB5EWpqA gzwkG0KH5XMwe9FnA367sr8quM7nUkl5z3zT6WLTXlHVfpc0yOQXIbbdRQ1Ea2SBXyGy 3hkGPShxciTdTXhPQn+146Gu1kygLIi06IdhSUWjUs4vEfesO3xK8mgrn05v95u9CiJo HD49J9bulUwHg8EboNzTZFKs/cTxhOtQiBGIMEWbBE82L/wsARfsxiA8eGwZUYxlSgEe epjg== X-Forwarded-Encrypted: i=1; AJvYcCXY7+IJnkCziuoWuBeRRh7wIT3Agt8Hnzs/DKYP3FlDhNTr+tLPYYNHJv4kUP1dUnAg73flp64a8BhmNkCFnZwX3fup X-Gm-Message-State: AOJu0Yx8tJiXpuEHYgx380+BcbYRxpKB9hwfYC077R87+K3D3+dmPt6f +2FBIcrXAHJ4Xr/U/Ap41KHvJnt0xUUQfPBVm8hiZFccFB7enBfib/zorsZxDH0= 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> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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)) {