From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8DA2C43334 for ; Tue, 12 Jul 2022 13:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231600AbiGLNYr (ORCPT ); Tue, 12 Jul 2022 09:24:47 -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> Precedence: bulk List-ID: X-Mailing-List: netdev@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