Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1846287rdh; Sat, 28 Oct 2023 09:18:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjaYgysuIn6FnK0gUHFiiZvZ/Jzbyi1qlzsL+folBKtXCK1OAVVa71kmNYk6V8C5wGSmy3 X-Received: by 2002:a05:6a00:392a:b0:693:394f:5d99 with SMTP id fh42-20020a056a00392a00b00693394f5d99mr7358760pfb.8.1698509930091; Sat, 28 Oct 2023 09:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698509930; cv=none; d=google.com; s=arc-20160816; b=Os+BXtWZ0oxWew6nMDGbqZzhmmZJBd264YZt9d9ZJtyj80453Ic+IIGbcW85WdRFtj p6oHTjfxPOYZwHRvUpQihLWIoxiPnOlC/DbYZUPFJLaaPgOItgcREaUJhUkauHKhwmIv wNBJW1nJjfvB8H8hXVmPpWXZ2HImVYsr7mLlUkH3lqR3BtbPEaMyx2Oq9SI/az+60FD0 uNJXuck8Q+W6HidY8whB69pfxyfhqNYcGWOLaf52J2RxdcBviN5pBGiFmWtPk9SvdFJB XMH/N1gZ8ZMDR+YjE3vVAdntAIA1q8NTQz1JAzRMWKR6v1hrytYSbaGiR+zE09UXuZOz VxXg== 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:sender:dkim-signature; bh=zQr/JKJ20NxDyi3ZLvQIALEY/brdZQ+S+sOOj2QS18c=; fh=Q2jkRZlkVGq84OkqYCKhaQRCjl5ciTKzKr7CQ66Wxcs=; b=jbTBy9PNajcv18Vx7hqPr1jA4uzEcB0ugyfc4rRCk95TpL54UES5CoX3RFlt1SfX20 DZuqjiMZJ+vT8yePkXngJ8MmRa+DDgf/1uLYoA+X7DqmvS/E5EilfbVsdXS8zs5yWlmW xDw+bvdYQ/A5SFdILBAp+OW3A5ghhgyOm43j4VE+2ryl8h21LdmRQTI94J7iDJfT/XAI VnUZ/sXQi6fatYH/MFVRSjCSgjRVnbhvMSU5QyOC5pfXvK20r7vTevsmpj0QcxodTKvs bixROBHUteHdajz+ef3ZpJOc0ZYvul73ITczwV0tiGEWnaimPrAQIQJTwttdy5D1cuHi iGPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WM1y5H8x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l62-20020a638841000000b005b969c62b27si742619pgd.747.2023.10.28.09.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 09:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WM1y5H8x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3B73D804E803; Sat, 28 Oct 2023 09:18:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229469AbjJ1QSp (ORCPT + 99 others); Sat, 28 Oct 2023 12:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjJ1QSo (ORCPT ); Sat, 28 Oct 2023 12:18:44 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55300E5; Sat, 28 Oct 2023 09:18:42 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1cc3be631edso1458205ad.1; Sat, 28 Oct 2023 09:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698509922; x=1699114722; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=zQr/JKJ20NxDyi3ZLvQIALEY/brdZQ+S+sOOj2QS18c=; b=WM1y5H8x9d9qwiwoNSf5SKNv5LNHvqhruwwTX84NhgEfktmslMaKYSy8i9RXVudUGh nkPx8OlW7jyoXpSQJAKuTAPmfb9ELfOfgQG91SvtCsOyqEBeFVNgd1moT1o7yycEN0dv aYBD/yFQ6nsEcgtEWLa/Noh8gqvLQ6UDY9ceU6D1y+Se7adOJ7Zexw0iusNTqXch06OG ArWsE0y/babp45ashy3nQazaIBvOxo9dpFFsp0bYIOb2BrtfNVncyg5MqNvP3sS/fCUx 9OUwkOa16icoYIOF2Te0GfjrZoKZZfU1tHHuX1DuWJ8GA2R3RcWvoZl1Q49EcP0bhjPT /KGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698509922; x=1699114722; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zQr/JKJ20NxDyi3ZLvQIALEY/brdZQ+S+sOOj2QS18c=; b=ZgC1a6N4PwWhZ0MLAJluauls2z5+B3pQSd5CZ/H2+UwHTH1wYHEwdRCQ+wW4OqTpR7 6LGLCvw51CdFzVsTxJylKgXnC4uXwwMFWYYdsnFRQCYPyTrP1u+PtmIHV0CHZvBNy5ms W8zr3NXwmlp/3B0wyCeVWh0eI+V4eK1oo5xthzzd79eNQMqa6Jh5QxDEYAtl8v5QqBOx ruTKml2qfFbV1CeA77BYd79FyRHMwV2QK+tppeN5gJoq1RuftxJmNqj0gQGNwrmVsF8K 1aWbrFBmb0qPGiaI6+tyHHoju7Nyjqio/DbpCHGK6A5lpuJJVhtb/QpodiPNk19+Fxwy pbCw== X-Gm-Message-State: AOJu0YwfJN7dKHo4kXFGnq8Jm0yK/jwVLW9s5Sm4CfMQNfQB5DuUuL0x VkT7x9mPOYZ84pgJf88WMsNktLn4/z8= X-Received: by 2002:a17:902:e0c5:b0:1c8:8f5f:b610 with SMTP id e5-20020a170902e0c500b001c88f5fb610mr4913848pla.13.1698509921714; Sat, 28 Oct 2023 09:18:41 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id i11-20020a170902c94b00b001c7443d0890sm3375649pla.102.2023.10.28.09.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 09:18:41 -0700 (PDT) Sender: Guenter Roeck Date: Sat, 28 Oct 2023 09:18:40 -0700 From: Guenter Roeck To: Antoniu Miclaus Cc: Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 2/2] hwmon: ltc2991: add driver support Message-ID: <075f6150-74f2-478e-9290-aa7186140cee@roeck-us.net> References: <20231026103413.27800-1-antoniu.miclaus@analog.com> <20231026103413.27800-2-antoniu.miclaus@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231026103413.27800-2-antoniu.miclaus@analog.com> X-Spam-Status: No, score=-1.2 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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 28 Oct 2023 09:18:49 -0700 (PDT) On Thu, Oct 26, 2023 at 01:33:13PM +0300, Antoniu Miclaus wrote: > Add support for LTC2991 Octal I2C Voltage, Current, and Temperature > Monitor. > > The LTC2991 is used to monitor system temperatures, voltages and > currents. Through the I2C serial interface, the eight monitors can > individually measure supply voltages and can be paired for > differential measurements of current sense resistors or temperature > sensing transistors. Additional measurements include internal > temperature and internal VCC. > > Signed-off-by: Antoniu Miclaus Applied. I do have one comment (see below) about code which I would normally reject, but I am getting tired. [ ... ] > + > +struct ltc2991_state { > + struct device *dev; It is completely pointless to have a reference to dev in struct ltc2991_state because it is only used in the init function and dereferenced six times there. It would have been much easier to pass it as argument to that function. That would also have avoided the wrong assumption or expectation that it is needed/used elsewhere. Guenter