Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2598262rwr; Fri, 28 Apr 2023 12:42:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FsDy/TU5Cqc0I1GpnOZbI0gvu9XSvj8WtyRMzr94JBNZCoOUmDa09ZoVq6AdrAz+QhzFt X-Received: by 2002:a05:6a00:cc3:b0:63d:5cb7:2dff with SMTP id b3-20020a056a000cc300b0063d5cb72dffmr10045796pfv.33.1682710964016; Fri, 28 Apr 2023 12:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682710963; cv=none; d=google.com; s=arc-20160816; b=fEYb/6GidiB+wUum9sEKT4cZbDGMQFj+c4ABJ6jWLd59Nve3jXWb8koqpVuB6R+jqE eQYHENHFB6EmcVbD4n4twDCFqgOZJpjznlMthC4kqS/C4+M5tyMUu+0qZav2l5io9qE6 0gsR0smMcHwA3mIXIrxE6i2A2mhfcX1+hIZuc+02pM9qNa+bpGWhE7ppBd0U56BwAUw3 wqQHzcAUIotMZlyRS9tKo9te//L7kr6vQOEWnv20Ujl1gRN30toYLyr+0FqGLEuexbED a3gLI/iU3pJQVDHfDRe50C4Ea4KDFOTPUeUTAGEhS7Q27oy0Rmsxq/dmv/NY7a25rxSZ hHmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Tat8phzj3dH3eTznCo+ElpRNyVEo+jl2/PvFuCvuY5E=; b=VmUmtJAR83+X4nppM8FNByjPO4ZCGOgROO0g4EFjlz9uHqVyVloLmwwQpiq7EmEB0K lMbTdAIJNnUmRd5obu21zv+qazqKieSazBhD/BIYZDud5lLXfBWTglSUes4Ba9iMnXi3 eC5D6fQevOpi6qnpPXwOyBC+j2k2DeH2TophoLTCgy0UJjGjoRmMhdrPehlmPp8HQjOy 0BHT0ZZ1VjSUMIq1Qx+ZdZ06fb2tUja9pUhWGtoVI3PtOFRihbNAenUQ/ZxiFEp9yfFG Ds3mH+eDG+qnephKaQaQZbYiJNgYqlilUf5xuLMtusilkQp+tcNZXV/WQyNWytmjBntP N8/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=smC3hGwP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020aa79f89000000b0063b61a7ab70si21993641pfr.205.2023.04.28.12.42.31; Fri, 28 Apr 2023 12:42:43 -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=@gmail.com header.s=20221208 header.b=smC3hGwP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346201AbjD1TQA (ORCPT + 99 others); Fri, 28 Apr 2023 15:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjD1TP7 (ORCPT ); Fri, 28 Apr 2023 15:15:59 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A82126A6; Fri, 28 Apr 2023 12:15:56 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-b9d87dffadfso58930276.3; Fri, 28 Apr 2023 12:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682709355; x=1685301355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Tat8phzj3dH3eTznCo+ElpRNyVEo+jl2/PvFuCvuY5E=; b=smC3hGwPmnBKSDbiWk5UMKclZegGbmzc6a6zT3GvwMIPNa5IuHdxfl1TPjBtLKFwfo yVpHsu8re+QnHIPj3air+5KJfZa6dYZY0OKkmOnBV9CdWHrK/ZINRInfoZIILQ3yMJOm CzMjimvdsK0eCKbqLyzI9b/AU6dQUrKDpsAKFGylx5QTwaIobaV7s9khdFFRGT+Lmipz Y/iQ6AWB7Ae1eTHoAGIhJ6zqqet+aGo8mvTz1OKWPUCP/Yg++1H+RYy4xzgo/jQzhsmP lfRMQnEeojsXuwHI4LbtNkxuDveGElOnY2xSCSmFtLStXtZWR3XaGCrZqkDABUJ7f2Q2 KRpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682709355; x=1685301355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tat8phzj3dH3eTznCo+ElpRNyVEo+jl2/PvFuCvuY5E=; b=F1ULzBP7tHk3E2UdCDd6gCa3MrfmNA5/OM04MDm83U33n+YdRh2lUNGQIzqkFSlYMM s8QwoQWIS2n3WBiz3LPafPJt/+8xmDCJMkwkBdpjF6UHpRmcZGLuOYqTKFOhvEDQAszT KjnZY844wuN/SyV6xFAMvtk8pAupysYSYjU+lpsn6JZI82hoAC/+C5i3qBy/32fxGkuj Jt/mtS5PN8/Hg8NzHtKbI006TZSMTWrjEbAaA4sJZsOEL9p+EK8HWJG9TJtxEMJgwkif 3OORvQggN2+qbVNk6FhsMPNyn1cR8cq6BV5DPPVLR54euzNM91my9pbsBi2ou5uPzhJr sfJw== X-Gm-Message-State: AC+VfDxaF12OoQB48ZHfKhEYd5JAILoyoB+FNM9fICUwX6vfLb8xMsOd oeT4uQO+0sVXWk+SEs8npmeNQh6R9tjY+clbbPo= X-Received: by 2002:a81:87c4:0:b0:54f:9cd0:990 with SMTP id x187-20020a8187c4000000b0054f9cd00990mr4552114ywf.18.1682709355642; Fri, 28 Apr 2023 12:15:55 -0700 (PDT) MIME-Version: 1.0 References: <20230426184420.99945-1-samsagax@gmail.com> <720c2b48-ca48-4ee3-9158-f453e48cb012@roeck-us.net> In-Reply-To: From: Joaquin Aramendia Date: Fri, 28 Apr 2023 16:15:44 -0300 Message-ID: Subject: Re: [PATCH] hwmon: (oxp-sensors) Add AYANEO 2 and Geek models To: Guenter Roeck Cc: derekjohn.clark@gmail.com, jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 > > I don't know why but the compiler would complain with the casting from > > enum to void*. > > Really ? I tried with both 32 bit and 64 bit targets, and the above worke= d > just fine (with W=3D1). I tried with gcc 10.3 as well as 11.3. What is > your compiler version, what exactly is the warning/error message you > observed, and how exactly did your code look like ? Said something about an invalid cast of an lvalue? I can=C2=B4t remember ex= actly and couldn't reproduce it again. Will change all to your form after this patch gets merged if you like, just to keep things atomic. > > > Found out that explicitly casting the enum literal before casting it > > to void* works and > > the compiler stopped complaining so I went with it. > > > > You are not casting the enum literal, but a pointer to it. Yes. I'm taking an enum literal and taking its pointer to cast it to a void= *. A little cumbersome, but maybe it can be avoided by using your proposed form directly and after making sure it works. --=20 Joaqu=C3=ADn I. Aramend=C3=ADa