Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp206877iob; Mon, 2 May 2022 17:12:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbUK2sOCvSWlQX74AdGnUiXTLsNAki2vnhGzqydu+SaiYw1Uqe31DeYXPj1ntn7sToDZ+W X-Received: by 2002:a17:90a:4308:b0:1cb:b996:1dc with SMTP id q8-20020a17090a430800b001cbb99601dcmr1867850pjg.224.1651536766946; Mon, 02 May 2022 17:12:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651536766; cv=pass; d=google.com; s=arc-20160816; b=vuUmjrsWYvI42g6EClHhsizijSwRqyj7BBauoJczEihbO6vNJ6/rpfJ2MW8sCvMn2O X0dHQxL2BKXuTgyESxiJ5tFj28W5dUyDm3qdswLZ0pDujuZe/7+cwVL3Ugq/D70WyuBU q7TKnpgV/UbywCZi/xCHEITA5h1n83NUY84Q8Qog6Bxz04xFaTU6NkuV3AuiT7huG5oR /+GJQFj9u5UeywxrNUmwXjoMm2S82cNNDM5Vd9a37vtAftn9G7Afsd+Y5uy7Ap4lLC07 V/DUBhgynPdpuP29dasJV00dccJNPkxaBBxx92HuOqa1jtEHL7+mEnpGG5kA7rdB7rgu 9yiA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rv6mp8Bc8j3OcCG1Vhav2ztXukXsNuqM+0Ixh2vapB8=; b=X73DgGULsh5V7MXPhiAOStXqAfLiVMriIr6dGThExncmH4gIQgpLDNwSSFXfblPo9I 9ySy0YqrcuHazSs7kTxkYL/6lmxCSj2DNb78IgBlcLy2AOfKLuQwvMfKE8u8ZslLCWvu IiHcB10Tx9N4U4/eZuBl5jMitIdDa3Ne5yfAhhddhTgR8BSE89+Qa4TmpT1hDRduUEcD EDenwnVInvIIevMsuYLLSADeqT4vgHt8fe7LGaY6YPDvDkVUhjOECEBjX7o7fOcgIpNM MtwJ+l/3Nxe2dLy9ncomo0KrXfysVBwfbw8pcRU+jwjmz3BSWoXYsm++/cXTFHSq1FyN HHpQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b="gAf/uvbY"; 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l197-20020a633ece000000b003ab15789bd8si13271998pga.198.2022.05.02.17.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:12:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b="gAf/uvbY"; 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:18 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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D374331919; Mon, 2 May 2022 17:11:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358913AbiD3X1Q (ORCPT + 99 others); Sat, 30 Apr 2022 19:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235981AbiD3X1H (ORCPT ); Sat, 30 Apr 2022 19:27:07 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2139.outbound.protection.outlook.com [40.107.94.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ED835A5A9; Sat, 30 Apr 2022 16:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ChppgH1c6/aDTYosTI5BO8xYHm2+eQbd9dxrYyi45VhGfTZCci/gzrZJwjAK9X3QYx33jmRx8fflaik9m39Jhy7g5UM1PlTKSxLnDJJS9JFls8CIH+4jsM+REh1WKj2/Fds/P5RRpaihHxhtZOS95TlSF/2GIk6FVoUvLnuz2f9HU+vuZ4hFDvlXLnHMNpLzoAL4HTlIeMZ3zR1AareE1SFxCv9aSb2IoGAcRv5SZKemmugU7DDC3zBGTcQifKecYbyFebXmyF1V4bPp3F2DwDOEsgpiYQVG5Ol8+5i9U+fLeV4X9FMfrH5eyIvLZ9QgJ5jic/p68MOiB1FVgbyd4A== 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=rv6mp8Bc8j3OcCG1Vhav2ztXukXsNuqM+0Ixh2vapB8=; b=BaEUQg91Q6mw++AM7ytc2QKMvtFun4XPnGOTFC4dJxrs1ZmM31AU+zLDtswX+JHaCwpWdi4vm5AiLT0esSP0dIMpKeMVAQOs4f1l8/mfnw2ElF7XL0/qjSLBYiM+fuPd8CFzsKmI1JlOwvwlE/llOJ6W1DFVhkypU1h6EGG/8agr3x1/fsZHCpSyVR3Q4sCxNh2hQxRxNoJQ6d2b9EiRcpVj4e3/fn4rawjERiUZ/eszgjqJiL08u67X/uwXxs4Al7WMt6a/YpDCxNS9ymkpAomxJaePpfkCXKCjwIyNR9Fvqr8PG3+UqCf3DmQ2z2PhlCtKhSttNgyE1uPy3bbEoA== 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=rv6mp8Bc8j3OcCG1Vhav2ztXukXsNuqM+0Ixh2vapB8=; b=gAf/uvbYD3eGNqJuXliUnNefHfqmipM5QJVQiRq+5rybwmgQ+32kjY8ZjwVaw9t8cipS7ngZGwAsfKa9wirmk+U38MI5/RekMV/hTpjYBXsZOvL6962acG4CuyVA9gkad/0ySsjhexlEmTFh7FFMJSR5ex2c2NEL3BNNNmBLwAY= 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 CO1PR10MB4802.namprd10.prod.outlook.com (2603:10b6:303:94::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Sat, 30 Apr 2022 23:23:43 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::4581:787c:1a7a:873e]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::4581:787c:1a7a:873e%3]) with mapi id 15.20.5186.028; Sat, 30 Apr 2022 23:23:42 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 1/2] net: mscc: ocelot: remove unnecessary variable Date: Sat, 30 Apr 2022 16:23:26 -0700 Message-Id: <20220430232327.4091825-2-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220430232327.4091825-1-colin.foster@in-advantage.com> References: <20220430232327.4091825-1-colin.foster@in-advantage.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0199.namprd13.prod.outlook.com (2603:10b6:a03:2c3::24) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1fffa59d-82c0-45f4-f77c-08da2b00770c X-MS-TrafficTypeDiagnostic: CO1PR10MB4802:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xTJTx/C55GW6yYiJVVWJXfWs3KPddgglyrNK2cZVdVUU42ypNqIOM/ZWFJYisSX/5c6MkT4I3qFAu87QJw+attJ0X6ewAL0u7BLV3MLkaKF619iCJcHNjq20ezRi9/DSTQX4MCQrz8ZZmCnmswl21jQoKOOAYydmKhxWw580ZFyq4OmeF9gHBkxsXZ7r4GDYoUPGqtDJLeLyd55KJkCEWT2eCNx5vha46l8aRWOM/bRCVB9wH9uHAtmjcTJaHHsWSCPk1wWD+sQek+GMkwwDYTyOqZhhOdtcDSrmuvGmGygQEJtz4bhlke4DXQmY2l2rnrxR6PuKS3KeAOD2p8tj0kQ9l+/yuJHKJVRGHiDH77WQaDtJmCM172Qxal12RPp+uQYfEil2LW04c1XPPTnw9cq1dqLHCqkuIh0fKAtudSwIhcRlR2/1zwqj06VgCAGV8daf9xKU/B+u2ntMvp2h6FNDHNFNgzqB4OOTvSl2QzCE1cdUb2G9V8gCvFLjAmsTi+pq+f1Oem5yvz4FYHmouhzVLCtWaHYeTmq8GfWtauypbbC7tvOuKI3xcejEebNCL3zY4JVKIYO/R8YojyEkUdQu7cKjPZXVAjt0G/PF9e9isvkFYE0EiWjsxMVhAU3hKAP2tU56Ng1cSZXJIECpZiAUb7gKlz5LlHpVJc48jP3WPTWCN0WcbIHMHB9+AATMrs8QkiIB7w1r4JTzPh3vYg== 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:(13230001)(376002)(366004)(39830400003)(136003)(396003)(346002)(52116002)(6506007)(186003)(6512007)(6666004)(26005)(1076003)(2616005)(2906002)(83380400001)(5660300002)(44832011)(8936002)(54906003)(508600001)(6486002)(66946007)(316002)(66476007)(66556008)(8676002)(4326008)(38100700002)(38350700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?z+znDWBthrPM3dXh7zg7TvICLIWnUq8hOETdE6dPMj8NutH58z+mXmXh7ABL?= =?us-ascii?Q?A/ungDm6jQ01AeTAY4c33fA6je2fjjG4MQ6lxQluDQYvFtCI363ceuDj2XAT?= =?us-ascii?Q?Q/6C5tcjRhNX4xRmo4fB+K/LiE6GbxN2E/eu4e8bnioA+VftK6gfKcgWuLEC?= =?us-ascii?Q?vtfOuvfZlk637fOQx365AyPGsCJneth0lT2b1b5oXmugEZDxrDXhZE97mnVS?= =?us-ascii?Q?Qq1zokq1rRFrcowNEj5gUOODtJtvMKq/GyVsV/VFgDnYab0eTTygZY2G1psq?= =?us-ascii?Q?cD7z3WaFtWSDIa2+83yvdOyrxVO+FBhxEbH0jrL3zK9NrN5RXHV2hVE6caMU?= =?us-ascii?Q?NbLezWiB/dKiGHESPnpcabVl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NTFaPAiakClMzmTmQ03eKgWvthvjdGEokwvKVas7Tvb3Kw+vivL2c?= =?us-ascii?Q?fBgoQGjBJb8ujFiIaK9IZhh8iF8W/UPNWK+Kn0PBjsryvk1jE6vZxwui3Jyf?= =?us-ascii?Q?wm7+M4GqwfaByRBA2XpUfKyiMJ0ZUzDuMtRT9cIrfh8HCw+emd+Y+O11cPem?= =?us-ascii?Q?2aj1fN0Rj9CmyYpD7w+Z5mivqF0Slt7yMkcA357o8wNTdgfVis3aUMBZ/C8S?= =?us-ascii?Q?JZ/5jfrfhCmICOmtUgaS7NMBCa3ZtpW4fKj4aTmm1CwVvbBkoagpZs9+q5UQ?= =?us-ascii?Q?BJiqyDKNGZHRnHrT1KXUpt6nWdJMxJoIwRJ/4zVtx08TlXQr6AiwCXhStrV/?= =?us-ascii?Q?Uby+98cwDCFRNS8Unh0J0sBGYPb82RLbb2Zux2mtfrSqU2I+2GxXcz35yWzb?= =?us-ascii?Q?NxDFUKgjfljH4/fLKBLxRz7Pwk+zPBgJcL5iRkxn0fDm+Ly2xFg1pJKwl7KV?= =?us-ascii?Q?DLhnVUW+BlWJmOhtPm0WQIRxOCgPqs5tKTtQkIGnXJmqeItrEoBQ?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fffa59d-82c0-45f4-f77c-08da2b00770c X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2022 23:23:42.5866 (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: 6Box67vcXGUiW3srEO9D3qjnzkHutK/hNg3eT2q7suviZWh2RJWMnPN5elEcpyhiRb19FORTQXCC7gTU/ahmens8NSDY4Zev3jJo6O2ShJ8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4802 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Commit 2f187bfa6f35 ("net: ethernet: ocelot: remove the need for num_stats initializer") added a flags field to the ocelot stats structure. The same behavior can be achieved without this additional field taking up extra memory. Remove this structure element to free up RAM Suggested-by: Vladimir Oltean Signed-off-by: Colin Foster --- include/soc/mscc/ocelot.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 5c4f57cfa785..75739766244b 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -105,11 +105,9 @@ #define REG_RESERVED_ADDR 0xffffffff #define REG_RESERVED(reg) REG(reg, REG_RESERVED_ADDR) -#define OCELOT_STAT_FLAG_END BIT(0) - #define for_each_stat(ocelot, stat) \ for ((stat) = ocelot->stats_layout; \ - !((stat)->flags & OCELOT_STAT_FLAG_END); \ + ((stat)->name[0] != '\0'); \ (stat)++) enum ocelot_target { @@ -542,11 +540,10 @@ enum ocelot_ptp_pins { struct ocelot_stat_layout { u32 offset; - u32 flags; char name[ETH_GSTRING_LEN]; }; -#define OCELOT_STAT_END { .flags = OCELOT_STAT_FLAG_END } +#define OCELOT_STAT_END { .name = "" } struct ocelot_stats_region { struct list_head node; -- 2.25.1