Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1226771rwl; Thu, 10 Aug 2023 08:10:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEoDgN/K+a/D1t1EI0NteUWxdRX49w27gS2GZAYJMIojDrqIhs0SMjJzE0sga/TFbipedKr X-Received: by 2002:a05:6a00:cc1:b0:682:37be:c9fe with SMTP id b1-20020a056a000cc100b0068237bec9femr3752461pfv.10.1691680225618; Thu, 10 Aug 2023 08:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691680225; cv=none; d=google.com; s=arc-20160816; b=NKO2phhEkLmmc+ztX2yl8v+RoPtNKeY5CPS9H9f6+R6Oq+owTATZ2HzCZShcQQuSbf Y/9auuiOIX6SLuTS5MKXqnedCmwcYejVrRN+Y27CEl3CK1Y4HM/5WGEGYS++4YXP9D7u J5fzjcijySEj2aawxZkDUjIn4VEQwAlfJBuP6l5aNVMVXZ1k90IsQ0AjW5ULlIl3NQmH 7Sjp25e5maJGibheBP7a5UxOYBvfm/BhY0DVuYHmyrgbSvzn5lK+oMVsAUhrXL8WJMip jdZ4PG+gZQJa3rHrbFBqW1wCQ8uALyiFlxOPT4YCwViOMPvvrMcs+9gyHYBmMnTqDlGn 10jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8YkQSbm5EPuJlzxC6cblPrVKDDBGSWe11WYgmsbD46k=; fh=tGypol5OujJeBa8jlIubsdWS9/a3cBvPQOpVJw44kCg=; b=xEWsulWThbAC2scat6wHEFUuELFvFGfnTDB4GDFaNcGx7FQbv1dJTEyWiEp6sKC3gs 9KkOENg7rgHAaBXzeycZR4nDwXrlBgUK9e7yztV76xSmYHupznrEh+PR8R7/xeO9Gvq4 YWPAzxgVwPEvd5RRqFONRI4OvjTHflvy78bVlmjB3vF8JIXHrnFeOj72WARnMGewfuJS KgvC8LwJL6X7CECgnPCXbrV4plE60AwYJ9RLU1i1ik42ZZ3OtWQBvote3t8+vlLEIYOW XVLq/E+2AHay4bfqr7DTmGxD96fwvrOyoFKcPx52KepMOUPjIjR/ZnJeHwRBlJVnJYY3 JjzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AyPw5yEF; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cu2-20020a056a00448200b006876288783asi1695339pfb.119.2023.08.10.08.10.01; Thu, 10 Aug 2023 08:10:25 -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=@kernel.org header.s=k20201202 header.b=AyPw5yEF; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235204AbjHJNrS (ORCPT + 99 others); Thu, 10 Aug 2023 09:47:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234000AbjHJNrR (ORCPT ); Thu, 10 Aug 2023 09:47:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66FA212B for ; Thu, 10 Aug 2023 06:47:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6BFDB65CE9 for ; Thu, 10 Aug 2023 13:47:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65E03C433C8; Thu, 10 Aug 2023 13:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691675235; bh=QkyBBRbhaAkBlqKoL0aRnLOyMswVogqYwOnrfamsuyI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AyPw5yEFAHz2Y86hjai0dOH62HvASem+iQ1Gnh6MPraVhYC9FrPXveuwnF8+CI8ip kfe5BEc4clCP/zCrKuzm7hIXN7l04ukqxmHzRkh6tiIkcI7mxLQKfjB13/qyYtJmvG Wqw57Nm1mz/DlCoJryqUsIKza2yd+8VlfE+wyVP5Nm2lx7JAe187L688uFcgKqOhYz sNla0vRV+mqybIHhF0rg4FYi2qieMkIpLzpYPdoolH67vfQf3DUltLvLdurBFCF6G4 HRVcXDqTaaV1QBD/u2OK6d/YsNEvtfVewprr3PO6NZYk/iaum6xlKCqCY7Chm4vSf9 H4U5KF32ZWfwQ== Message-ID: <0bea4002-8160-bebc-2243-c7d4044eb5ad@kernel.org> Date: Thu, 10 Aug 2023 22:47:12 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 2/9] mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning Content-Language: en-US To: Krzysztof Kozlowski , Lee Jones , Chanwoo Choi , 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 References: <20230810095849.123321-1-krzysztof.kozlowski@linaro.org> <20230810095849.123321-2-krzysztof.kozlowski@linaro.org> From: Chanwoo Choi In-Reply-To: <20230810095849.123321-2-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 On 23. 8. 10. 18:58, Krzysztof Kozlowski wrote: > 'dev_type' is an enum, thus cast of pointer on 64-bit compile test with > W=1 causes: > > max14577.c:406:5: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/mfd/max14577.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c > index 25ed8846b7fb..1f4f5002595c 100644 > --- a/drivers/mfd/max14577.c > +++ b/drivers/mfd/max14577.c > @@ -402,8 +402,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c) > > of_id = of_match_device(max14577_dt_match, &i2c->dev); > if (of_id) > - max14577->dev_type = > - (enum maxim_device_type)of_id->data; > + max14577->dev_type = (uintptr_t)of_id->data; > } else { > max14577->dev_type = id->driver_data; > } Reviewed-by: Chanwoo Choi -- Best Regards, Samsung Electronics Chanwoo Choi