Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12925816rwd; Fri, 23 Jun 2023 12:46:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5VYM9VLBSatjEtqjBrgeIOlEB3FGudfB4C1FYpQfPKS+FIqu+GnEqrTa2YcD5VhEJns7w/ X-Received: by 2002:a17:902:f68f:b0:1b6:af1a:7dd3 with SMTP id l15-20020a170902f68f00b001b6af1a7dd3mr121661plg.23.1687549583405; Fri, 23 Jun 2023 12:46:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687549583; cv=pass; d=google.com; s=arc-20160816; b=nQrQsngh0UgYCubltawr6PZ6LjnNr8ABtq4TvBWhWwI8QDQFCw6MHxIcBCUJlTPwbU 8kHougV7p/FlpRicGWucV8Rm056NQ1bp/zxc3ZnGKdYKwR53zTiG+Ov7lJ2AefhyBDDW xyG2EECtlgD7AB6LSqyWnysKtpwY4TeQxl3jIT1/m5OHfJwdVP34wcotTaxnasOkULAs KdSj7/cugFCRshFc+nUt/PxPHmwpXVTHTmyYv07xnFoB/lOKQmGHNoIDiTJk2PMXJBU9 GHDMVDNsRpeBvdsEA5B7dVPVHA0MPL0pm2JUNYIR6Tu+CCGkHzdfWcImZDTW3AzfTf+P Rqwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RdaJEW+xgtdgJKYg7FPGEe4VERxVz9tELb5Z4I53G0I=; b=lK0MbqSboTCcErVhmJYU6/XeycW+J8G+1jKG/I1UtvBHw3vN5TQBkoq4fbuAQQq37c wkOark0fDup30G+2cH4pHhCYk98T2dAmqR5DvD75vP/7Ow6Gz311qazMAZ2s2X6VswB3 UX/xFX+2LTubHETLDLQSy4iEkrvTlsvziy6qe69khSRrpXq2KOrsfSkXnY0qrEzFhJ7f aByU2dKbmft9Cj3l2vR7P0np2R4GEoRzDHqpstxezdv/1qOFgGOzyZngZuZdS9TxyOkx JlmnSt4SfK7RJwT2pDFIrdMVEX8IHYrxQjHc9hC3GMlb2KH84uGQvA3TPg1RLpEdHSkd QodQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=YqH2meT4; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a17090322c800b001ab039a411csi10731794plg.17.2023.06.23.12.46.11; Fri, 23 Jun 2023 12:46:23 -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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=YqH2meT4; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231670AbjFWTci (ORCPT + 99 others); Fri, 23 Jun 2023 15:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjFWTcg (ORCPT ); Fri, 23 Jun 2023 15:32:36 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2138.outbound.protection.outlook.com [40.107.220.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493F12701; Fri, 23 Jun 2023 12:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YgKJUlxSj04htcHaMT1Bch8cnWg2x704tTNcVXDCQ3Fe56OputSCQEy7d0Vle8CKqjgywtup+zCe/cDyVWx1HY5ThvXU6tLft32WOcCy+gq2/S/YKU8tt/G2BncUwumZ0rjUi6J6FR92plq+FtWw1d6VibnCOkQ0eLtC85Z07T3EicMKbvqI5HYmV1s8ZdiaU9AQQ2I3wIoKEYuJYyeRXMCgHEul3K9d/ymqfMQV/w9GgLs9dj7CS/IvIYGOMV36zc0W5F0MCXAC0xvUATccdBW25gCccAi6FO05NPxMWnj1u30dGWx1N05S2Q4klQ1BmBlQ2+sNT2IV4/q19W8aBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RdaJEW+xgtdgJKYg7FPGEe4VERxVz9tELb5Z4I53G0I=; b=icXHD4ZMTXLxL3h66ebD9bxr8EdBQTnR7XA0x7MRAgmQs4SPslPF3AyAXwB8saMIBEPWVhRNxg3VsAKPHZCOA2THRfz+ZJ42D/MDWr0yYcSR5wi9VoOUc/OHGsZ457HcGzsSJR5WulLcrny2a9qqpt8ZDm8UlKxcvbH7/bTnJxxZq0KAqoRg3P0yNlkzviQuosuhOqXZH68UuSiOnl7M8kDxxt4x890Akgq85S5aMOmRxVgzlQV65y8l42r6IQnPSopSegg7WReRreeqEmBeSh8vf8fq9Mb632FIIT/En5fE8W7y7bSeAH8rBJOLJPxLXHeqM4oTQJHbBZKu93+VLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RdaJEW+xgtdgJKYg7FPGEe4VERxVz9tELb5Z4I53G0I=; b=YqH2meT4QDfbtelsUJ6wKnPod2xVUpENTtTp4ueDb57bhmOPmM7+dom56cAoH7BkzvDoV5YmwBFav1g3x7eog9nkN0yhoSegNwX11QakPjfnYQvKr+OKvr44DmBlybrYw9FxjlkxJPA4GjqS3s75GpHy5mOl2TQOkl20ZvJX3xA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SJ0PR13MB5801.namprd13.prod.outlook.com (2603:10b6:a03:3e8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.28; Fri, 23 Jun 2023 19:32:31 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%5]) with mapi id 15.20.6521.023; Fri, 23 Jun 2023 19:32:31 +0000 Date: Fri, 23 Jun 2023 21:32:23 +0200 From: Simon Horman To: "Radu Pirea (NXP OSS)" Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sebastian.tobuschat@nxp.com Subject: Re: [PATCH v2 03/13] net: phy: nxp-c45-tja11xx: add *_reg_field functions Message-ID: References: <20230623074123.152931-1-radu-nicolae.pirea@oss.nxp.com> <20230623074123.152931-4-radu-nicolae.pirea@oss.nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230623074123.152931-4-radu-nicolae.pirea@oss.nxp.com> X-ClientProxiedBy: AS4P190CA0069.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:656::15) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SJ0PR13MB5801:EE_ X-MS-Office365-Filtering-Correlation-Id: c6e79126-0013-4d0f-021a-08db7420961a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XMmtjzwnjMVWPOgVbx3bEc8tuN6IqSAlURh6Z/sPjp9RbOh3+/JPeRiFDZVBq60BRPl0ZGboeG+vNXkwSo2jCtJAet95VSg76peXinDxXHrwVlzzB9dC/Yvs+ELrRaMOqZKebd/ihC7RkI6nFykutEJQz5EMDqEQbEpGkmTNXJJdl/VJ2luHLCFBkvFIGGy6LsBOf4qcRTRqwDtdQ9hsCZTKVphOix5/oQOSfYNT4+0eeN+ASM6CY/POBwT0VfbNLefK2SlGs1jOhDJWWbloEpRBtSBdT51XvZS+ys43nVJeTKXrlqrhAw6YbZWr+/kDCKgu3bAp6echzizNYAKJx52TZ2iyirSYVpmAjMSGwpURgIGmmd88wxIpa9oSFsp7pCXlU/NDdNMdCgg7lacI4yl2xhEQK9olAiOG2vx8/CAjCsl0rxp+pMV35e5cQKRzTBq0O5sgjrNl6XupeWU58/qHyKK/xcTpCCdWdYsTrFO5xoHLFC+7V/aKR8eHefGPCaqrRFlDwn4beH7dE+qBwkwMKoEbDyk2uFzlNLUMgOAsE6egHXWDJpDbvoRg7LfnkKZLW9V01VoP1Iaox8qobGsaLbrwf6in6b6+jlLmDAw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39840400004)(346002)(376002)(396003)(366004)(136003)(451199021)(6916009)(66946007)(66476007)(2616005)(4326008)(186003)(86362001)(66556008)(6506007)(6512007)(38100700002)(83380400001)(6486002)(36756003)(478600001)(2906002)(41300700001)(7416002)(5660300002)(44832011)(6666004)(8936002)(8676002)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?tYhT/sRWRxcDE9vQ09ZnPqOtXFsReb5XBZUqhRJzxty1JStuXHQ5vHdVuq0g?= =?us-ascii?Q?0fcD/hmA7V6KIZyUnH3OyV7cbmqX5+XZtrW9sx8iG1zQPlToQaSdtwF7wx9c?= =?us-ascii?Q?3loZyPaJLOQ90MNCjo54HoqFyfRNcK4eAObNiv8ksnKutENeM1loeL60Rq71?= =?us-ascii?Q?4rDKU5gGJNbRrN+L4VnKTuCEyQWODTlJgY+KzK7hfbm2cGzSEI1s26NbWYzs?= =?us-ascii?Q?xYgh/OU5yluZUylqxVcP5xPjRk5hP3n8fDw1x81DSrEtcKhGXSV6NQ67lWY7?= =?us-ascii?Q?kgfifh1/GmEwNyxfiaclk0+yi3J4E50cnum66ztHX2lohevf8BLgP9hxqCLh?= =?us-ascii?Q?JrTU044YVijH/ANzOc0YGAs+6O+heuQuSbw9o0VjQez53UkpKz9vOEbd2FR9?= =?us-ascii?Q?RLdFPvik7ESiRRFkA3FBsF0DULbNmrN8SS1aKlPVpNHDOAMRqxQwmzTGouJh?= =?us-ascii?Q?Vey/cwOu66QAAY9j+rV6mVUx+HVM6vf4RKFYWn31QqTF8f47MZ5iqb87It9o?= =?us-ascii?Q?HSrdoJH2NUiRJ5NMhUhyjpe64DAkJlgDIkNn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lELBN+XJZzNkcjcynso5ZFY6hJvI/dDh4fN+IKlP2U919OUw?= =?us-ascii?Q?ZzTYstWj/ab37eX0ZBRXezZtZIvnyM2eLwH3u10sjlvR3O1zdyeWmOf6pUMg?= =?us-ascii?Q?6zg50G0M6wy+uq7GLz3fY4s7rikmm4Fb19r88JiDiF1xoHX+j3stPFBMuPZe?= =?us-ascii?Q?E31KK+0Opz8QTVx8caCqHwXgJ/W5ie5Bu6cSmSzHSjntwGtwonS2ZIZQ1zKk?= =?us-ascii?Q?HAWwOA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6e79126-0013-4d0f-021a-08db7420961a X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2023 19:32:31.0441 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q4ESEGGr2F3syQFjBs2DjYx6HTDd4gJgU2YrjWSZSimQIf1Ur0IkVHaHlisoFzwkpkxVRXSQhe5H1wnacE6V0KKU4+tZP1hiRWSV2K3m6w0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5801 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 On Fri, Jun 23, 2023 at 10:41:13AM +0300, Radu Pirea (NXP OSS) wrote: > Between TJA1120 and TJA1103 the hardware was improved, but some register > addresses were changed and some bit fields were moved from one register > to another. > > To integrate more PHYs in the same driver with the same register fields, > but these register fields located in different registers at > different offsets, I introduced the nxp_c45_reg_field structure. > > Signed-off-by: Radu Pirea (NXP OSS) > --- > drivers/net/phy/nxp-c45-tja11xx.c | 82 +++++++++++++++++++++++++++++++ > 1 file changed, 82 insertions(+) > > diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c > index f1f15a1b6cfc..2664b3bfcb35 100644 > --- a/drivers/net/phy/nxp-c45-tja11xx.c > +++ b/drivers/net/phy/nxp-c45-tja11xx.c > @@ -191,6 +191,21 @@ struct nxp_c45_skb_cb { > unsigned int type; > }; > > +#define NXP_C45_REG_FIELD(_reg, _devad, _offset, _size) \ > + ((struct nxp_c45_reg_field) { \ > + .reg = _reg, \ > + .devad = _devad, \ > + .offset = _offset, \ > + .size = _size, \ > + }) > + > +struct nxp_c45_reg_field { > + u16 reg; > + u8 devad; > + u8 offset; > + u8 size; > +}; > + > struct nxp_c45_hwts { > u32 nsec; > u32 sec; > @@ -225,6 +240,73 @@ struct nxp_c45_phy_stats { > u16 mask; > }; > > +static int nxp_c45_read_reg_field(struct phy_device *phydev, > + const struct nxp_c45_reg_field *reg_field) Hi Radu, I think this is resolved in a latter patch in this series. But nxp_c45_read_reg_field is defined but not used. As is nxp_c45_set_reg_field and nxp_c45_clear_reg_field. This causes an allmodconfig build to fail on x86_64 with GCC 12.3.0. -- pw-bot: changes-requested