Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2996083rdb; Tue, 12 Sep 2023 20:48:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDtJArazB0qMIchTtB601byysOzdlLKDF1k9H9aVAhUtxea+0x5+2kijRRUfxHHQKnt+4k X-Received: by 2002:a05:6870:8a2c:b0:1bb:5bc3:7f23 with SMTP id p44-20020a0568708a2c00b001bb5bc37f23mr1576929oaq.46.1694576909780; Tue, 12 Sep 2023 20:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694576909; cv=none; d=google.com; s=arc-20160816; b=bnb7jFf60zjwwY68jpvVQg5jgRnKlBJTFH9pHtQFkwTbl/xVJ8BUzKhDl22t60k0Mz UlcL0SBVLjeuIycZD+sw5VNA/wFJk8OcYUZAkqwrvehvjrcb2RQu8yQV2DEs5rxaNyjR bOi1SWk+MliDjqIexkmURt3vaXBXBO1V9VEjC8ASC+504rHRWZjKmxjoMQsldQ88jx1f jrhQ8SRmYro68hhPC6H8qhNBiUhZH9QDwAp+dnuq/Hm1xXK70goxSffK/kYzGDsgkwE7 Ri8jH4+kcUiUrZnwiywWTFzKMTbOQ2rYhQUzaYI46jsZcG+89fp2yazBOALYBVKXnmRj 2xeQ== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=isWuiMcgmyHqdFw1OBO1uWERMOFKlIKcOTEIapx/O78=; fh=AuOSZ67MYybsWVIKyagLhAcs3tSJz8BD7mo7MeA7U3k=; b=HfWDhwzGdUN8RD0N0wZCPfJIeRgkKo0RLwZsWcXlzCrxcyHOTCWqKJeqSIS7OpVU2P zuErWoIvPVowz16xf8Y91TPUC85bYs2OsjOVSNAs8lKU7NjJhqRamLVEj0gGwGqwCxKF jROyi18gO9RwnFU0PDvJvgyCRF6FVQrZtvDmdGalcGPsGlKBMCGkGDv53mLuVT3hCGB2 1qAS2TxSh0Gs/jMMMysCB0+d77jMYPTbpginnP9dx/gqeTBQQf4CYOpuCM+qUdnZbtgl 6A8wGmreH7uO0Yfrv6LTdYjKp/4ix0z5ecwOi7uxwXI6bDr9uHcNzUyRn4x2pQO9Uj08 qzhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nyTjCpai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e124-20020a636982000000b005702257f32esi8848021pgc.185.2023.09.12.20.48.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 20:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nyTjCpai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1028E8226F0B; Tue, 12 Sep 2023 11:19:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236903AbjILSTk (ORCPT + 99 others); Tue, 12 Sep 2023 14:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbjILSTj (ORCPT ); Tue, 12 Sep 2023 14:19:39 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ECEA115; Tue, 12 Sep 2023 11:19:35 -0700 (PDT) Received: from mercury (unknown [185.254.75.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id EE3316607314; Tue, 12 Sep 2023 19:19:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694542774; bh=ZdPR4Xrn7HpWKcmeBN6s0Y6xOv+P4P1mAUlJC6Z4XHM=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=nyTjCpaizKcPfZZ+E0suixOKFmzweY1NAGmbC4xjaGEEksRjh2C2wjCcKn1Q/mFZV P0BSC50j8cXnn+UdyY8SAzQJXeAPWkIuk24OzoK0+b8cQZLiYghgg6C/YECjCVVreh PstsP8yCsnVV/5z2MRMX8RWxZqjRso2wV999zF1abqrVCpVzNmEY/IGZnuSkaPzJh1 rq4w6jmf9I3DpJuxWllauiKgOfwblMohz/ibLmvqsslz0gxhbYulN9s107tBUlfzqV 1SMv3/wsuSFomT5rt4ZIKA5uA19Pz+hdD5pGbGRytuLMLRsgeoso7bHKRDqcpO6cTw uxY2SM6s3kkSw== Received: by mercury (Postfix, from userid 1000) id 4740F106098A; Tue, 12 Sep 2023 20:19:31 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Nathan Chancellor , Nick Desaulniers , Tom Rix , Justin Stitt Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev In-Reply-To: <20230814-void-drivers-power-reset-vexpress-poweroff-v1-1-c3d9b0107e5d@google.com> References: <20230814-void-drivers-power-reset-vexpress-poweroff-v1-1-c3d9b0107e5d@google.com> Subject: Re: [PATCH] power: vexpress: fix -Wvoid-pointer-to-enum-cast warning Message-Id: <169454277126.489158.9426280067711996461.b4-ty@collabora.com> Date: Tue, 12 Sep 2023 20:19:31 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 12 Sep 2023 11:19:41 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email On Mon, 14 Aug 2023 22:21:51 +0000, Justin Stitt wrote: > When building with clang 18 I see the following warning: > | drivers/power/reset/vexpress-poweroff.c:124:10: warning: cast to smaller integer type 'enum vexpress_reset_func' from 'const void *' [-Wvoid-pointer-to-enum-cast] > | 124 | switch ((enum vexpress_reset_func)match->data) { > > This is due to the fact that `match->data` is a void* while `enum vexpress_reset_func` > has the size of an int. This leads to truncation and possible data loss. > > [...] Applied, thanks! [1/1] power: vexpress: fix -Wvoid-pointer-to-enum-cast warning commit: 4ec7b666fb4247bc6b9cdc84fa753d8dc2994d25 Best regards, -- Sebastian Reichel