Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp710195rdb; Sat, 19 Aug 2023 22:23:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYDuO9e+YjIWq5QP/qJA2V6Em8tHXpWxRr3cx4J9AAxcv5OhD1JbAc+qKZGWkgPt4wJjjm X-Received: by 2002:a17:90a:7524:b0:26b:27f6:9027 with SMTP id q33-20020a17090a752400b0026b27f69027mr3116292pjk.1.1692508984442; Sat, 19 Aug 2023 22:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692508984; cv=none; d=google.com; s=arc-20160816; b=QlPoGS+6lzy5e0HMDV+kfN3+oYg1Vas79U3EuPD1cCDeOVy02funnZ74F3F2JjMvVE AZF3Wpss5ZuaBy/lGSsd5uQJ0vPQAaHjAd1tLksGJOjsYA/AuhOGrvWGFpjXsxlAiDc9 ODzLtAbpOfe1D+WPbiTRWAGtVRfj6UNM3VKmgdOXsLirqT/Q2Jow0j5nPSrb5B54cbXj QrJjkt62P/xMGY79ID0zNNJBEwW2GMjaqts9x844HTLJGEOFwCq76JRcVVKODHJytP5e ztIhTzGmWGawxWHP6nRGd1/xhybSkMB8OZMvJeY05+pW612BOOZ+r3exhEEy6i+voel1 IQ7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=7yemdRTdC3BNXzCD3Gokg0+hf/8k0W894trvAhjt3jo=; fh=V+ycyjgixPjpZU1FTGZHtE63zREpFLRJKT4guo06l5s=; b=NPehTYvjCjnZYSf4BgTAV0Lp4WXouYi0+4LDn5R+lNXJoHl0xIcKaS1EHCmh2zz/qZ 3h0HhBgTQgP+bXHLsB51d/XdIwMQvAibt1tfpDyLon/zqu+q6+yeYVTGDQchjNqPNTwk VmPDs8Cqh48+hddpL+DmTYRURhQLZqPuvXsaoCpaRvAkrCHCzBWK3mRD26E8r8jNCsGm Asd6+dmmmoyWYINomL2LtLRkqtDHpftja2khqqyj3iIwW1itxtDWKmKlE/yUzxTMYFbr NHDuPj9r/ZlKi06BshxrvlIl8sgNXBR4BDLnwE9Rodf/ecnef4GGKS1EskbPkQcbeEqI lt+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b6-20020a17090a9bc600b0026826148914si4660643pjw.32.2023.08.19.22.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 22:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A430823EDAB; Sat, 19 Aug 2023 11:35:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359329AbjHRJpf (ORCPT + 99 others); Fri, 18 Aug 2023 05:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359404AbjHRJpb (ORCPT ); Fri, 18 Aug 2023 05:45:31 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C5341FC3; Fri, 18 Aug 2023 02:45:30 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 33B47D75; Fri, 18 Aug 2023 02:46:10 -0700 (PDT) Received: from bogus (unknown [10.57.34.159]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CB0B3F762; Fri, 18 Aug 2023 02:45:27 -0700 (PDT) Date: Fri, 18 Aug 2023 10:44:53 +0100 From: Sudeep Holla To: Justin Stitt Cc: Sebastian Reichel , Liviu Dudau , Lorenzo Pieralisi , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] power: vexpress: fix -Wvoid-pointer-to-enum-cast warning Message-ID: <20230818094453.pc7zlzl4lvjk3zpx@bogus> References: <20230814-void-drivers-power-reset-vexpress-poweroff-v1-1-c3d9b0107e5d@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230814-void-drivers-power-reset-vexpress-poweroff-v1-1-c3d9b0107e5d@google.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 Mon, Aug 14, 2023 at 10:21:51PM +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. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1910 > Reported-by: Nathan Chancellor Hi Sebastian, I am assuming you will pick this up. Acked-by: Sudeep Holla -- Regards, Sudeep