Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28108175rwd; Tue, 4 Jul 2023 13:07:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlENAqoYglf9FNn78SMMFQIOUY8bHswPY/09RYUS63rYCH2J51IiRvePIl8U+KC+Dh4SvgkD X-Received: by 2002:a05:6a20:160a:b0:12e:d8ee:8f2e with SMTP id l10-20020a056a20160a00b0012ed8ee8f2emr6050116pzj.27.1688501242807; Tue, 04 Jul 2023 13:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688501242; cv=none; d=google.com; s=arc-20160816; b=mrHd3WqlbkkjSAtKQy2U2scJzyYQmJMrGtppog9sYrQSQYWd+pvtnX3jczNrcC16UP hDJ5kCwisXfm6wKlNfMZieybluKzvH8aYcdhxY29wnJQDyTvhWoeDrbL5cKkuOBFBU5e dMkHf9VNo4BkvwEuUkqSjBJv703RJfpwhfy7H/PwXArYyD7e/i9QLs7s4DGcNmhaYh/6 /kh+0q8Qq2pnyvb+NqO3iwrhqEgc2Gpg3Lpzk9fnl2msJxmNpwgnwpNKoNiMtT2rHa1v fJ6DyS3/ydSeySA6uG0TMF8ziv3KJGIeg3vI/0NYSPIMJdH/61mZ0rmiDYcPpKwgc4Ch P1JQ== 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=cwfdFxLnz2FRAYtKqKmj4b/IYrsbglqXAF9+qfbe5K0=; fh=IAkpF42Pi1JiyzXHmiPs8yc57wL7VozG3RCAjnRfxFY=; b=HGnsQZXY5SV30+aG01Ur2yPn+sBk+IGpvThXskMlFLux+JKbWQVHXpG1QRD052RpRP cART1Kvn/SXue0yRI+wuSNhm8vXweHZh1tkGHT1Ch+wVsLBBhUclCR1uzI6Q7MEwGEtp N/u3GG83twMT9tT4YbulwGNT7B/RMYVLCT/ONnX5ol2dEAHX4/Npx1/AmJKZHvtAEJ/d 51NI23MAt9V7/7XYuyOi5p8YdffLGD9v9P6ddWW5dtd14rgcebRPisfPWoL4/xC8kWa3 YJUJR36oRT3InuMuu6+ilmRVcYbqOl/50iAiZIc28IsyYt6s76BXlZqVbypmJmxg3O6Y YQ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fIkXGW5S; 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 s13-20020a056a00194d00b0068225e629aesi12961328pfk.0.2023.07.04.13.07.04; Tue, 04 Jul 2023 13:07:22 -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=fIkXGW5S; 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 S231615AbjGDTok (ORCPT + 99 others); Tue, 4 Jul 2023 15:44:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGDToj (ORCPT ); Tue, 4 Jul 2023 15:44:39 -0400 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6C310CF; Tue, 4 Jul 2023 12:44:38 -0700 (PDT) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-5703d12ab9aso72395027b3.2; Tue, 04 Jul 2023 12:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688499877; x=1691091877; 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=cwfdFxLnz2FRAYtKqKmj4b/IYrsbglqXAF9+qfbe5K0=; b=fIkXGW5SzTQnVanAdBKLRIui1tnMupzY6X4m+moKXsIXlWp85WTrn+bLoMZRSvZiC9 oTQRF31FImWEgwDWM1kFKabWLPXA1RHYyDxWylNomB6XpCCQBceYUUQIkBn/Gy8AYE21 0Oq9kX6FIbUEL8WLz/axyagGAXHQpRlfB5n7yFxMLy8LqXU0XJ6hDvjteA0tsUc9jNUQ FerDXy8o/sL0Kf9/Jv/dwsKCRV6FpETzx8hPuX+kV5c16w44VHz2S4uvBAqI+PkPaRGh tecvzzhvURt2dvwCU1P50RFKoHiKBHrC5qy/3BfytxGbNFmNtbrNGtF2yOlYqVoZA+LP RFFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688499877; x=1691091877; 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=cwfdFxLnz2FRAYtKqKmj4b/IYrsbglqXAF9+qfbe5K0=; b=NMG8KIz8vDAKdbpul51i6TqDzWsfAdAmYTZqZ9bAa0cLjpF/zTT06FQNH8VKlkCiq1 tIrJ4xNVUOfGANNpQF/Lw2dHYfadZceECW/ZcbdlUpZ7mY8SIQZwKkZ2OexpLtBO7UbK CK6y5yNC/eg7aEngApzKos2HFpQ3rJ4jnmyjvY1uyJAhcj/ge1EU94x3k8G/GRU9tgNy EY1JLzWJI5TrKgkPz6Q1CD2rO0i4ZOATOk5u1q2bYTuvhMklW0CVfjM4W4CAw5MUWpMk Li8VS4K/9D5rRHy8Ikd0LuAu50BE8JcMuz7I4NDdeqVi/omx5rV5OkyXKnCmenvWYrDq +OOA== X-Gm-Message-State: ABy/qLaO3uN0AcxhLRxXfBGrVV6kSOKe8zFDnY2WN2dzmuLo1Dr6SB4v cnpg1Kymww1huLamc0JQ3oksLJRUgm3Cte6dIW4= X-Received: by 2002:a0d:ca55:0:b0:56f:fba4:9b85 with SMTP id m82-20020a0dca55000000b0056ffba49b85mr13441942ywd.7.1688499877233; Tue, 04 Jul 2023 12:44:37 -0700 (PDT) MIME-Version: 1.0 References: <20230704131715.44454-5-gregkh@linuxfoundation.org> <20230704131715.44454-6-gregkh@linuxfoundation.org> In-Reply-To: From: Joaquin Aramendia Date: Tue, 4 Jul 2023 16:44:25 -0300 Message-ID: Subject: Re: [PATCH 1/3] hwmon: (oxp-sensors): remove static board variable To: Guenter Roeck Cc: Greg Kroah-Hartman , 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 Hello. > > On 7/4/23 06:17, Greg Kroah-Hartman wrote: > > Drivers should not have a single static variable for the type of device > > they are bound to. While this driver is really going to only have one > > device at a time in the system, remove the static variable and instead, > > look up the device type when needed. > > > > This is expensive. I think it would be much better to just move > the board type detection into the init code and not instantiate > the driver in the fist place if the board type is unknown. I meant to do this, since the probe function is called only once and is meant for hotpluggable things. But since it works as it is and only loads in supported hardware it didn't seem necessary. Modify what you see fit. And thanks for the attention to the quality of the driver. Joaqu=C3=ADn