Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4349276imw; Tue, 12 Jul 2022 06:32:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFN+NauqUQnDbFPxRzZ417jvPJg3AxpTlWjWWF+F8LE3Hzzl94Z6Zyv9dkHRa+bpRCA0XP X-Received: by 2002:a05:6402:40c2:b0:43a:b4c9:f7e9 with SMTP id z2-20020a05640240c200b0043ab4c9f7e9mr27535162edb.95.1657632769063; Tue, 12 Jul 2022 06:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657632769; cv=none; d=google.com; s=arc-20160816; b=X+tLwkIxJEvEMxyyiHU3RWoct4nmyLbEcntQGaCtKrPx58MM6cUk/Y27/C9OF4PQ+M l6+mWs7n+nFYNO8tHiMxkWsUb+2QReqw6H5p5rJOR40biUP7qJsJhBF13/LjtH8nq6hI uirwq/F96roQrTb5RIbDRBXAfM8wPqAYLLav5gNxTFE6hIvRqieqsmnncMwHcnbqPmxr m2P8+bnFaTlJXKWKhQ50+nZoZ9/Vjy+etdgrO/rp9bVSi1JBTbmCA0lRFGinX7kPsloU 3IQYjWywHsDdfJbKtsBb9b/tCZM8aAbEXbGiatU2RqUSmdsejeSkiyPYJ+u6H1P5Ie7q 0q5Q== 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:dkim-signature; bh=k7j5/4LH1uxSAoyJKqSGeIzJp+14qU8heufrbtbEFus=; b=CrIti/TI308dp6oUM5CKjToXZEmmrTLCdhge7AYOj093z6cyCYcp8rC3kozlF2vE+F UbIhzRGQebv37Mfx66NhF1Bef3hhHTh1GS1AEGQklFjaHXey2j2jXxKADY1ymSc09VvM ozEfPasK0RjsIq+yH308NoQytGNupPpbXRy3Ou0HktgDdFjikpvT5VTQEM/Nkr5DkkE3 k2P97Le+WHQlPQgQKtAv7GAO1X6Xcu7AfHyvMYH7o5rUlxJtybqUaSS4sJPsCFYjJ3l5 7vc3K3ofGBekmBSbBycF9o/pCUuUCUGm9N9l3aKao+pi1h2wzOSlgdvbK2rx6wwD6kjO S6+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=CY6DHndY; 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 sb9-20020a1709076d8900b0072b51dd6c22si9099609ejc.1004.2022.07.12.06.32.22; Tue, 12 Jul 2022 06:32:49 -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=@lunn.ch header.s=20171124 header.b=CY6DHndY; 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 S232797AbiGLNYs (ORCPT + 99 others); Tue, 12 Jul 2022 09:24:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbiGLNYq (ORCPT ); Tue, 12 Jul 2022 09:24:46 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2124161B07; Tue, 12 Jul 2022 06:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=k7j5/4LH1uxSAoyJKqSGeIzJp+14qU8heufrbtbEFus=; b=CY6DHndYMpX154FZn7uRO3BKzL f1o6IfzDXQpIrYvrfDh3EocKoGzzJGLcGuK/VGP+OWvGxl5JylzLcnMS9JyXLIDk2G3MFkmLxC1x3 jYiTnJ5bDjuozjBzTCAjUiQ6tOblbq5YQpi/h34EeYrVOdKC7j7W/u5whh0PddnYzNyE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oBFsR-00A3Jn-BL; Tue, 12 Jul 2022 15:24:35 +0200 Date: Tue, 12 Jul 2022 15:24:35 +0200 From: Andrew Lunn To: Michael Walle Cc: Xu Liang , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/4] net: phy: mxl-gpy: cache PHY firmware version Message-ID: References: <20220712131554.2737792-1-michael@walle.cc> <20220712131554.2737792-3-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220712131554.2737792-3-michael@walle.cc> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 > + priv->fw_type = FIELD_GET(PHY_FWV_TYPE_MASK, fw_version); > + priv->fw_minor = FIELD_GET(PHY_FWV_MINOR_MASK, fw_version); > > ret = gpy_hwmon_register(phydev); > if (ret) > return ret; > > + /* Show GPY PHY FW version in dmesg */ > phydev_info(phydev, "Firmware Version: 0x%04X (%s)\n", fw_version, > (fw_version & PHY_FWV_REL_MASK) ? "release" : "test"); Maybe use fw_type and fw_minor. It makes the patch a bit bigger, but makes the code more consistent. Andrew