Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4383989imw; Tue, 12 Jul 2022 07:06:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slOcal7XmTWsy1XUAJuLAPRZ2lfUe6tfgfvGbHFtMdcTZl7vqflSzrsqzDjgUZUFeRBJau X-Received: by 2002:a17:907:608b:b0:722:fb4c:5675 with SMTP id ht11-20020a170907608b00b00722fb4c5675mr24585331ejc.273.1657634799958; Tue, 12 Jul 2022 07:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657634799; cv=none; d=google.com; s=arc-20160816; b=yVdCVcgFRuAkBGkvZ7YXCfVyjIiga6tmojsSyeKXqx1m0RNmEPXdhdPtxYKZ7or61N xos0MlXLHaRpxArNhUTuSfp7ETiIk0PincBmkEwAISzPH8JPUPwDZFbxjgUJoAXpd5rc ZWNqISftEICusJhZS3HDPnK+w3lLJHkHJmwLQQS0T8xF8rByopLTs9baFebG5Han8SSR 1XI3fjHt8MvdBx6kO4IBLObUi78nt7Mp7rA2VaTrUVpFNmcXGCuFXbUHdDY7aoJAlw2H 7MUwyGuznVSJI5SnuMjDt//rsNSkev956JyMJNAWj5YzOR4fyyX7Yd91fgEGZ15DbFSX rMcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=LwObfXaiRiyA2E8lhuZyZlmOcK4lNfz9a7H3acXXh2k=; b=rGa7pGEVqY8Z8QzQ256vnKJp0vifp68LrMQud24fWmvph56zWGQPHSaO9AzsBgjZt8 yWESAWzY4C9Xgvb8cFUOWac20KNcUn+thkal8TE8Dny1ypUHDcNboWSrpOBprF8mPt37 0vIcJ9LhSY5yqaO7ZST/9OjnNreHhAkHjCCMfcnpSDZOb5pnpsf2t7zl4ijoFj2hGqfB ObL3ByBUFSFSq+kKzYKbq7lY+M6yxAt5xHI5jrDyM2hqKxXYgB0ApozbBoBBd0vpPwBp Ew6z2gGa9M20jZ8eE35mZ73HHpwh8TpiASOt+jlq4+lfVwvnTlEKxQGaYkKvzX93yo5y UylA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=kiQw74SG; 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 nd38-20020a17090762a600b00726d6cc066esi15895459ejc.654.2022.07.12.07.06.02; Tue, 12 Jul 2022 07:06:39 -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=@walle.cc header.s=mail2016061301 header.b=kiQw74SG; 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 S232887AbiGLN2N (ORCPT + 99 others); Tue, 12 Jul 2022 09:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232433AbiGLN2B (ORCPT ); Tue, 12 Jul 2022 09:28:01 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCFC4B4BDE; Tue, 12 Jul 2022 06:27:58 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 02C9722239; Tue, 12 Jul 2022 15:27:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1657632477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LwObfXaiRiyA2E8lhuZyZlmOcK4lNfz9a7H3acXXh2k=; b=kiQw74SGiTE9A+JgaHnVR490CtXakg7wbq0e8ItGjSna/G+geLo8CYDa6vwY2NHkYHrsZO iTn4OosDsNX54kajO5zqODXYqUDLhLxOLZTTGXlnAeKSCyRyYE4xLcz2RSNLEKZiWBwCC0 LGGKoeWcKq/MY6r+1p0VXYYb+srWVGY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Jul 2022 15:27:56 +0200 From: Michael Walle To: Andrew Lunn 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 In-Reply-To: References: <20220712131554.2737792-1-michael@walle.cc> <20220712131554.2737792-3-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <50952529a0523a9259cc312007b76202@walle.cc> X-Sender: michael@walle.cc X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Am 2022-07-12 15:24, schrieb Andrew Lunn: >> + 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. See next patches ;) And fw_{type,minor} doesn't contain the REL_MASK. I chose not to cached that as it just used during this reporting. -michael