Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1587315rwr; Thu, 27 Apr 2023 21:46:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40fuehojno6wCo7xToZwTSLMm2QeUWfIt2hUfnYiGPNC83aY5vMcLfIhgrkMp3FCeI1LPR X-Received: by 2002:a17:90a:bc92:b0:247:4c28:39a3 with SMTP id x18-20020a17090abc9200b002474c2839a3mr4371539pjr.16.1682657176833; Thu, 27 Apr 2023 21:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682657176; cv=none; d=google.com; s=arc-20160816; b=COEW8y9PzdI6QXzCumyRTvl+FAT0bL9UZbnoK2r//Yj7dH/Oqj+sDrKBr3TLLryGmf ja88VTHF7lgrbkmwGgXdgPTZpvlZOR4TZe/TD2lwx9i1hih7C4stt28J6vuUM74MvaIT tWeFOp1xQb9bpyhvJ/ba0LEqYPbaCiOU2+niMDH0d7JqvSs7jEgTf1PD0kWePFfzb+sr FrIw7lvMvRj+eUCvJPT8ffm/9FHzvnWPm1+MmBNnh/DZoySrDleoAyiso7g68JMoWwXY 2279JDWk1RiUyTM8Xvlbu3lUfm4OB9fkacVrqlCnpVAMtaJ1t4dPFFdx5dgS2Is5uYOW tS6Q== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=WDN907CyaznRR4k8kodhgNDU+z16mOoMzStatTzaj+o=; b=GWX5O34GqozLcE7pJknO0Aji8IAPsJdTVeOkDL4/aIv+ooI4TNPVN6HDa9F5RVMK54 g0j6HiMBFK4CPOrPk10cZ/klMkYzlNH2HLu0r6XjmBWwM2FcQz2YEI2ol7yQGr8pSR+l EIKBljtyqV+BtqoDrtvOYAagfSqzqpzelEbc8iTCzfcN+sHnqN9T+PRNhYLzkolZ4QZO FxNvmDW3GfaKAfLAaPAYVpsXzPggDWIKXUABpD/NKppY1aJNLeeqi2JEEZ8CPvCkSvMb nsljIbT0JXnxjEX9SL1QK66xGMhrCV3bFRd2bVufoQ+BHouSbLPJnJCmuq2k9WEpuc7p 0KNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=kllEdpQ5; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on11-20020a17090b1d0b00b00240d56569eesi1445521pjb.166.2023.04.27.21.45.55; Thu, 27 Apr 2023 21:46:16 -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=kllEdpQ5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345207AbjD1EFk (ORCPT + 99 others); Fri, 28 Apr 2023 00:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbjD1EFj (ORCPT ); Fri, 28 Apr 2023 00:05:39 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 744402717; Thu, 27 Apr 2023 21:05:34 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-63b52ad6311so10748409b3a.2; Thu, 27 Apr 2023 21:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682654734; x=1685246734; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=WDN907CyaznRR4k8kodhgNDU+z16mOoMzStatTzaj+o=; b=kllEdpQ5bert43BWr7D8RdLHiVilg+1R0Y1t6YH+9cDQeEj5R2QW6izSMegjkBfofL BuB+H2eSAAmvwbGMIjGA4FrFvEqDewPX0HVvuYA2NslUsPjTcbb9xMhhjTwtiboTR5it oDNjoWPY9NLmYN8onsCoBHKIHVH9H+Y5Klk6fUEXkCzRDFTcVJx0K4h3fZsQKE64iGCt Y3zlyaVOXF5goDB/ksZ5BK1vb7PVuG418Q9/jMwy4EFz3LctThjAZk74gxamIk3OB1hV QuWjaCseN8Pn7Uz7rTP0DEa01H3ImysJ86mvE8ZyJJbnBDISFvvqVFP3t6MxFv8e21z4 PsKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682654734; x=1685246734; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WDN907CyaznRR4k8kodhgNDU+z16mOoMzStatTzaj+o=; b=Q9REtvFzU0UECOx+UvLQW4PvvQ0bKmX8zyI7h6jiUqVSh1NLo5p0rQ7gMElXCIINpb hSXN1XVMwhaHdJWiWOrso5yMz3WNFx0pJzAeD0XrRn6jQfbxjoWWQJtqPvcBuhSNlZ9s pk9V6FfybpkQJ4RcluhNx1WExdSNBbAW1TSa3jtyFgqisliCzkgPWzwjEDVN0MVwSrwj EvuuRzrFl1/gBHiVnVzTozs1AJdoRi4JHYBfi43tuKd9DmoW+vCdEGQypgA4tyrWtOcT BGQbMeR+O0oN6B1v6hz9D5eIPUA6nMPl7zm99WkzESoFObFgrWTkKb8thw+/mONnB/cm gf/A== X-Gm-Message-State: AC+VfDwsDWRuZO60d1CvVBranyQnq9k/39GuME4y0HGjvOtVYqmkA9yN /9VOBeTheuE3dExHUP+Uh8fAKrDh+Ow= X-Received: by 2002:aa7:88c7:0:b0:63b:8cbc:bc0f with SMTP id k7-20020aa788c7000000b0063b8cbcbc0fmr5653746pff.22.1682654733775; Thu, 27 Apr 2023 21:05:33 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id o76-20020a62cd4f000000b0063d6666ee4csm14000212pfg.34.2023.04.27.21.05.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Apr 2023 21:05:33 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Thu, 27 Apr 2023 21:05:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Joaquin Aramendia Cc: derekjohn.clark@gmail.com, jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230426184420.99945-1-samsagax@gmail.com> <720c2b48-ca48-4ee3-9158-f453e48cb012@roeck-us.net> From: Guenter Roeck Subject: Re: [PATCH] hwmon: (oxp-sensors) Add AYANEO 2 and Geek models In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,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 On 4/27/23 16:16, Joaquin Aramendia wrote: > Hello Guenter and thanks for your quick review. > >> Please run checkpatch --strict on your patches. Never mind, I'll apply the >> patch anyway - I see the other entries are the same. > I've run it before on the other patches... did something change in the > checkpatch? > Nevermid, After this one I may submit a patch to fix all styling in one go > >> That makes me have a closer look at the code. What is the purpose of the >> odd typecast anyway ? Why not just >> .driver_data = (void *)aya_neo_2, >> and >> board = (enum oxp_board)dmi_entry->driver_data; >> ? > 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 worked just fine (with W=1). 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 ? > 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. Guenter > As a follow up question, since this driver has become more AYANEO than > OXP since its inception, > wouldn't it be better to change the description? > > Joaquín Aramendía