Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2406024rwb; Sat, 19 Nov 2022 15:36:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7c0qehVpvhdZ0CjLpbLjAiDHIuaZfuNxoLsybZDLQ6+Qya+C0eK4YVQIMfiWLr6JVLb22r X-Received: by 2002:a17:906:ee1:b0:78a:efde:b84a with SMTP id x1-20020a1709060ee100b0078aefdeb84amr10776099eji.744.1668901004216; Sat, 19 Nov 2022 15:36:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668901004; cv=pass; d=google.com; s=arc-20160816; b=k8n9siQdHzxVbEe9afgAw1D5pBeDnEtUzDm1BOoW5DmbFhhPapPFU4gRSn2JvvyxJ1 h46uHy7vMHCT7eMdyPIT2DcEq7Kc1o4eb0irzPNimiJ7/KtK0nhzw/rdbqwDgLW9eFsR JwrgwL6TdauFl0wdnNpdcV85/9qcmbhoeKHms+yIM8cDKm3SQ686CJBxYtAfNStQVOru e35Wv8UL1yciNB/5pquDDcHDD5RndHctsqHX4799Pew2MO2GCrxSic56wmhBG/2HAs8b 3G+ZzJF3JkFHxXUGgjj6PkBfeVjxZZYFL+/WnNWcDtk5mgnQKkw/1WuNNSoV9ntSExWg M/Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=JiXrLhsLyI2h7bBaPOAPCGnIHQNohOLEl8vvZ2jUiSU=; b=VnhXkeTsNhWaCtd5OTLzmc0Uh/YaI/ZlJuWqHHHkFSiyPQoqvg7lgXdUPUYeH0nx7Y qLuKHQ7jBDqdqFWijiHx4rmDF0/MNlms3qjqABNQKF/YyC76qMA51+5V96DgaG5UnjRI 5R427E9VYN6xZMJnuLb54e2YKoWaTcg7c7L64QRGAm2o/igRV54grHTXiXwRnnPS+AID NRFG5KnztIPr8uwsJu4eMJri6ZFq5GV8VN7EZyEhhAf1BL9GpzuObe+7o02SXJnr13QS gSIdtdHwrEEo64z0wd12+E4g/+1a0Y9BD4VQmYu6zDDBCuXZDajsQBHaSpB5XN03G5p0 qh6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=paKkZg7Q; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.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=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb22-20020a1709071c9600b0073daf6b44a5si6572354ejc.775.2022.11.19.15.36.22; Sat, 19 Nov 2022 15:36:44 -0800 (PST) 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=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=paKkZg7Q; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.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=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235276AbiKSXOb (ORCPT + 90 others); Sat, 19 Nov 2022 18:14:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234179AbiKSXO3 (ORCPT ); Sat, 19 Nov 2022 18:14:29 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F88B13F56; Sat, 19 Nov 2022 15:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UlZoeh0nLVzLzHNNSS3jrXYlJq0ye6drWv8IRRpeD/p1Qz+9nXdZNP5cC8zvzTnHLi++s5AEPM59PJX3ODep8DZZ3MR668VixGpOISFhEY7dPb6b6uRKK7udNag76WUQv5Bao9tVxvRVO6TOobxbMB/YApPmTppcf8TwdCq0QydYQhHi6wFAif3v3/V3OP4xUf7Nclb5LvBGr2bLyWOBqAUqeSEoUj8eel/Sc1iCTSB6mu7m//XJi21a92UJaHPG5wjorz8gIoEV5CSn/hi2SvIZaXgEKPnN2oT0AZCeSGw13r9r3EPwTnaAI1TPCQYfF1lT3vLe+oFGu3mJd2ZK+w== 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=JiXrLhsLyI2h7bBaPOAPCGnIHQNohOLEl8vvZ2jUiSU=; b=f8ajG9P1JxSZO+/ZRBWYKOQobRN2xllpX8aMZExcts2jG/o6cq1UXMzC+4bkGt2kWpNXnJrH80jS5xPCVbT3XVOfZLMWeiXXmSBHSBryrxUe5ZWgnP/J58zDv7aFLHdLPz39yYmzIWTA3SxBolX2WNStfX6fmpoEI6KoqcbkePkhAx3FLKCBCcbvmitc65Q5JjKDqcNUd6jwYbG49gJadIPEhX5DodZ7hzT3prJ4vCbmKjmbKOPDbZ5sB+sZcsRNWZsyRSH3jxOJP7TlwiTArd20nnvDRiqbja7kh7mLPwB7DdTkTLLr5qLxTKzkti/djtE5dw+k3vdAsczCOeEVTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JiXrLhsLyI2h7bBaPOAPCGnIHQNohOLEl8vvZ2jUiSU=; b=paKkZg7QZr5S2KE0T3f7jUqUQ1Wp/xLawVSbisQIHAZ6rRFD8D5BU5a54SGw5Qo3HLtqMtUPtC8aKzV4pSi1sFNhJi1VNNsPew6qHKeIsf4FBZCXi50iXbMjLBdQ7pBLGac7rKnV9jETj2uRIoqdZFNSW7SO/0KH80z91tU7li8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CH2PR10MB4293.namprd10.prod.outlook.com (2603:10b6:610:7f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.11; Sat, 19 Nov 2022 23:14:23 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::45b5:a860:9cea:a74c]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::45b5:a860:9cea:a74c%4]) with mapi id 15.20.5834.009; Sat, 19 Nov 2022 23:14:22 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Paolo Abeni , Eric Dumazet , "David S. Miller" , Florian Fainelli , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v2 net-next 0/3] cleanup ocelot_stats exposure Date: Sat, 19 Nov 2022 15:14:03 -0800 Message-Id: <20221119231406.3167852-1-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0027.namprd13.prod.outlook.com (2603:10b6:a03:2c0::32) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|CH2PR10MB4293:EE_ X-MS-Office365-Filtering-Correlation-Id: 05cdc468-90d0-41ea-e40e-08daca83cb3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l9fnmg9YzQJP9MD4P5ZldZQqP1/OXYT5+Y318bgRXkLPDGR2BNlwCXR1ibCCFQVUVv5/jFqUedRq6lk70UrYWxhK+BjgbqxDGQs7r0Q8E+My9g1unSiX2XLJbLWIeDunN9GUaJOG+SzynMPPTcOnHNBqxVYkWjlVpF4uEOzX+K+9ZzihGb8UPwIv50/UaGvbU11LT/5GRmdmqxc1bWbborOiA2CYOo7qUf87Z3T2/qZtLVceZCYxFyRvBKdmf+/5OLmPJ03rbZdd5u7IQJACtx94DIrqdi2/irfkMfS2mCTXGkNV9x1Lw19x08wfiIUFILKwwF1pIk1W50ZBnmg/pARyJNBzXFjsnI4jCkBi9EZ4zMq/6y/m7M+GRKyS5+QpOqqxcwU4Fc4zOE9gL75AH8KrRggH+ab21ieZgNqsveRRGeR5fwjTtxZuoAEi5DRSoz4iTEtghf9bAr+aAMm8sCzrAhWwcQG8FDmO0jkaXui8yMDsO+qu9fu/5RctTeGRms2UdKLO2KxDRims2ANXgGpkFgJBkq+uh/7ajlrt0pZ070TWOieC1rHNAo4SxNtv68sDnkYkWq6aiy8Kg5HALhaNGsp/5BqxtbEVXsUioQKy5qPwbgONZJTmK0GBY9vs10HfJuJo0QXvnRqQqb7SjrJVnagLT8jLiNrt/aN5mnTLmdKjOha+5sv8gcTzZlkc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(396003)(136003)(376002)(39830400003)(346002)(451199015)(2906002)(26005)(86362001)(83380400001)(6512007)(4326008)(8676002)(66476007)(66556008)(66946007)(38350700002)(38100700002)(36756003)(41300700001)(44832011)(54906003)(8936002)(5660300002)(316002)(186003)(7416002)(52116002)(478600001)(1076003)(6666004)(6486002)(2616005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GKF0hpL+nd+BHPinVveiUiS+Gyy8aO1mFY0KRSQxIfKO9/gzaszqUD3kxE5/?= =?us-ascii?Q?Nj1yV9UxOnOLy7TEnGwCrRrSY9+c92ssrRrkKfdHDYrJEhF8nPb1IikvI7w8?= =?us-ascii?Q?yl4jUBe9Ykd+MG6hZrT9y+9//7Oo0WExOm8AEXATlADkAstoYDt7ojvKD5BF?= =?us-ascii?Q?zVk9jwdu/za2Xf+P9ZmiQS3EmmPnJJ+r9gAHD0fcS8VY8pVXCQ/Yvu9+KmWN?= =?us-ascii?Q?LSebTVLXMFqli3tMLrw1Wsv/to8TjITTnj5sURcqSRtFhrznEbE//9lwbICf?= =?us-ascii?Q?DgAkKEErLL8aDOhsKyV42m51t6Yz3OOeR5EQLaXrUpumpKSowjAJKNU8CYOD?= =?us-ascii?Q?ck7GGfa6XvySQY+z4hlWDfKRRJ99HJ1f2yLkrk8N7tYmlKLTVOxLbRP4mHNk?= =?us-ascii?Q?aPA/DUmuvwDC3VuIfF2PgVM6cemWm91X/nzm7oYdUd3pYj8/EdsrgmealZ2o?= =?us-ascii?Q?V/I0yan6QQLG7vi1BT5DhVgfn6Nig5vhXLGIq1nM2yHwsC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Qzn/QeJh5H0icYRgYdyWoBL7o52H?= =?us-ascii?Q?2nEg/VR/w/+Qgbz4jOVYAMLMMzv+mc90hYmvmI8bqCXXHzum0JrnTbNzCChu?= =?us-ascii?Q?b4EB0hsyYZElb+0rr9D0vMwN4uD/rdnyCJ5zBpSunMEXYA7jlGHulw9+KrYf?= =?us-ascii?Q?ly7h9vPUbG0JsPcXCP77q2LG/w8k9IJeLW9gH4CvwOCBCzyqeAz/nOywXvO6?= =?us-ascii?Q?7g=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05cdc468-90d0-41ea-e40e-08daca83cb3f X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2022 23:14:22.7553 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xRkfxaghndxKzP5r3UUXEtMYILd0xwFBEJ8Ylr8luFmv4a5xIGM1uSKLHoH21RzEfIUiu5Suuv6lirNSHl5WAV6C2d3C9HkBTvRF4U8KkvA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4293 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 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 The ocelot_stats structures became redundant across all users. Replace this redundancy with a static const struct. After doing this, several definitions inside include/soc/mscc/ocelot.h no longer needed to be shared. Patch 2 removes them. Checkpatch throws an error for a complicated macro not in parentheses. I understand the reason for OCELOT_COMMON_STATS was to allow expansion, but interestingly this patch set is essentially reverting the ability for expansion. I'm keeping the macro in this set, but am open to remove it, since it doesn't _actually_ provide any immediate benefits anymore. v1->v2 * Fix unused variable warning from v1 (patch 1) * Pick up forgotten stats patch (patch 3) Colin Foster (3): net: mscc: ocelot: remove redundant stats_layout pointers net: mscc: ocelot: remove unnecessary exposure of stats structures net: mscc: ocelot: issue a warning if stats are incorrectly ordered drivers/net/dsa/ocelot/felix.c | 1 - drivers/net/dsa/ocelot/felix.h | 1 - drivers/net/dsa/ocelot/felix_vsc9959.c | 5 - drivers/net/dsa/ocelot/seville_vsc9953.c | 5 - drivers/net/ethernet/mscc/ocelot_stats.c | 244 ++++++++++++++++++++- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 5 - include/soc/mscc/ocelot.h | 216 ------------------ 7 files changed, 235 insertions(+), 242 deletions(-) -- 2.25.1