Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp902259rwl; Wed, 12 Apr 2023 05:53:28 -0700 (PDT) X-Google-Smtp-Source: AKy350awHa75dJqhPR5azXIHG8OvfHsQwXlg2xZ1X4JhQy7f/tbHo69+sgALejFQGYzy2C+K17J7 X-Received: by 2002:a17:907:6d90:b0:93b:866:bafe with SMTP id sb16-20020a1709076d9000b0093b0866bafemr14716069ejc.56.1681304007793; Wed, 12 Apr 2023 05:53:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681304007; cv=pass; d=google.com; s=arc-20160816; b=R/mVaMDBOUCNzWct8R3mvWBXciURxki6GaGhsiJm4QkzSgdML6k3Itd6Uzt4bfFxcd B9GrBxcYlYGEPpNS/f7VuH0141GXrL2RODlbtNOR0F7Td2rfcr7t7KII7IYTAkuw8RA3 Ljlxa+d7D4O5xAZ/xBa1yzHfCvYJ+fvlByaQSOq2AQMSw94XylYyt2gYNL9KYLbZZglI PvmgAVGJH5DJ12NzjdIHkup83G6+MXFWBN3wZfb2pFB/E3MLJ3oaKIm5nhxcQxfdK/85 ON2nS9oWGyDZftXKwms9Axuo3UCPvY1/pnEMe53j24bVQFYg0jzHKkLNLPjU8aGEpYJk lBjA== 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=Edo4YSD6AKS3MQf0k+r4USSRl1cHKHtSqXCo8dExYJ4=; b=b2QljYvrkkdeTijFlaAW9nz5faJdquMaEcInSaNTG1CSC19pGr8LC2hTY8qzAw8q9x cepty/xXxfWoIbQTP9BSsIPqX8mKkCpzorcwdb/zQ6GQjw5xHES1Ml41sR5LzmI4IYmd GE3YQwMSHC0B/8S03Gsu8/XsnN9pkau/WCXjPFsKI1IPGcDKf43dY5zliyd/MusfgG2B xtEDO01ZSNoayp3+HxmoOsQnx4N6u8DyyO5K5IanP/kO5603CJnfug/UETvMejpSKR52 sAmhVYFmkPWfTK+BjmRO/z/o4xux4avFMbndr/k2kG3HJEqsMQ3KH8sB4vY8LHDsP/LR qzRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=f2lfyvmS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc10-20020a170907168a00b0094a7040a5c8si2300922ejc.843.2023.04.12.05.53.03; Wed, 12 Apr 2023 05:53:27 -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=@nxp.com header.s=selector2 header.b=f2lfyvmS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbjDLMug (ORCPT + 99 others); Wed, 12 Apr 2023 08:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjDLMuQ (ORCPT ); Wed, 12 Apr 2023 08:50:16 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2066.outbound.protection.outlook.com [40.107.22.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B47017DAF; Wed, 12 Apr 2023 05:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwUjx2YpoqH8cbcPD8uK83WF/Vfax87KZgVS0NgoWY9Xow34GREJvt4C9RcvsQ45eGbrXMYiuMcstNMu/+i+O4MKrzBNL1zU4KW7EnODEy7mlxUdQbEfZ7nNzhQGny6u/n20roJff/WbUkuj3+sERouTpTEUGQoLGTYxZNZFVpMkq028BGVr9TkVFmeKz0dNTzkypH9FcBSagweuELXpZ1p5I3tzKjWLQjFZYeSsXGW1TT8e1PTaIv7QyDrbwJH5bh+vF0T/2eQGmJitilB2qRWIgiKf4adW6G8bKU5qZn5FssF8LI3wloRj1dXHPzUl4dUpI/MulSqaKE9XrAvV/Q== 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=Edo4YSD6AKS3MQf0k+r4USSRl1cHKHtSqXCo8dExYJ4=; b=oZKwASxVjWHXfHrB1NCEulHPdUPRS0KYOHx9zOHO7w2z4m2KLCBuvL8STWahsfgFofXv0vg4RMK1AB/RVv/WznRjAbbzxwCr60kpKD2Hdfh8+GDz8QED0OvuHjPMPg34J/Mduf904qzicW2+BVxt23fvCkz7MWP9AZqZNycHsNnOMBkr5TIw+Gj5QQh5w6C2HGP7gBriV34ch9mUtg7pZssKZgbJn5gukusMyxV+5DgXh6hYD7AJ8Msy2Eg5Fp66acyEzo3of4v4fuhOvVqCqr/A8FDQ4yJcoSyvvvDJEKvLdQW89zZrtne3Rj0baWxzGbzTjFvPYyZ+OtMfO8WZlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Edo4YSD6AKS3MQf0k+r4USSRl1cHKHtSqXCo8dExYJ4=; b=f2lfyvmSwPJBfGzqDdV/0lDpULST+TtD2KXZqQPXyERoHIXWvN5pamJJNBNhoaHseEiGwy2x0EMkEAxPEAP2LFFuHJJdBTAVyxM7g14zD9RrPtcxb/hMa6Duz8Qc+uyK6Id/K14wuGGYfTtcbnd9mFwmXkTPJAp5r9cRBtJCR3s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM7PR04MB6888.eurprd04.prod.outlook.com (2603:10a6:20b:107::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Wed, 12 Apr 2023 12:47:58 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::55b1:d2dd:4327:912b]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::55b1:d2dd:4327:912b%5]) with mapi id 15.20.6298.028; Wed, 12 Apr 2023 12:47:58 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Colin Foster , linux-kernel@vger.kernel.org Subject: [PATCH net-next 6/8] net: mscc: ocelot: strengthen type of "u32 reg" and "u32 base" in ocelot_stats.c Date: Wed, 12 Apr 2023 15:47:35 +0300 Message-Id: <20230412124737.2243527-7-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230412124737.2243527-1-vladimir.oltean@nxp.com> References: <20230412124737.2243527-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR0701CA0056.eurprd07.prod.outlook.com (2603:10a6:800:5f::18) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM7PR04MB6888:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b0e9fa4-cd98-4880-5061-08db3b54249d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGcd8HlKG3sK3iBapxtUFrzYkVDaBK8fZhrr+eLVfl+dOEjDx4cj3mA5SMuGEWMSgmMD2ypoaFYqEvSK6l8UP4P4l43jjuKqEsKNzIP/c7yv0LObKv/Sf/09u9SAcd7We2xmL9V/x4x2pPEmY31zH2yAKfREn8xivGD+pSJ8CdoA6DRbtSntw1YSCkGSrQ+W+9GcSJUhRVrlEb/5HqY5IRoAMXWCBEwaEpufDpe0RGeIBR+DipaPdVyXDuRe1jm8jutXkJfL+QwOszLCgHNbbJtas1IVYllpECd9vgb71Bxl31AJ8ZxFbecKwKSZsk+GqcKfFSSIIovR/7+ee7iyWamgBak2Jkzs0k6ReFpDPdvmIJMW04uaqODTKqKtXZHERVkI1MV6sW1t/4kWnvgonmD+Uqo3cxwS6UnAttIOtcHBL4I2oSm6DBcub+BnRngbwl0V0O9atgQnx9A66mTe7yTymVZoHxw3N1f9i5qQwRJM3eZmsjq/706fnMqUtClDLOohnG4SMG+nxENBisppHkXshX92uj+NG6zGPCItWbe0x2Ajwy58Ah5MfqeN2z/YJKnJ2YxlVVIHNil8tIEFaUwHKdPZmKKSeT+2yrTnybXtLNtTWxPWF+QJlge2SdEG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(376002)(346002)(396003)(451199021)(478600001)(52116002)(86362001)(83380400001)(6512007)(36756003)(38350700002)(2616005)(38100700002)(316002)(2906002)(1076003)(6506007)(26005)(54906003)(44832011)(186003)(5660300002)(66476007)(6486002)(6666004)(6916009)(8936002)(66556008)(41300700001)(8676002)(7416002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8dhO3YkryxswivNc4FA0Y4SYjkuME6L0u8nqFiV4jFgsAxZ+39Hyj5CnrHph?= =?us-ascii?Q?gImHouXsZrKkMAWQx9Wvn0eWxlYVrQ3gpC/0eRtdIUQC5ucy0Ko71AynVffQ?= =?us-ascii?Q?G88L88vAaJpCVQnqdSbbxAQMGEtiXB+dJ//DHKaej7OFkiZ7oK+LffFHv399?= =?us-ascii?Q?zScNhMLLlO3Aul8+SZJvCmmJJbjMcqM/g49SXejrBeYe1/sxtc/zj6Ap+ZPZ?= =?us-ascii?Q?SSpm/G3EQPgIUAu4QttqnzBM0rnIsVAEWY6slvt6qDls+jxnX0u0utUh8mPq?= =?us-ascii?Q?UceYIQzG2yePGjmrdECibiBchQ7lYV6L0qQR+b2vdO95o0nor/sDkMLQ8LW5?= =?us-ascii?Q?dwNR/EsOSQtkMg8Cxje7NrRuh62Ne3ii6+fN3nAHldnlezcgVl1NwXfXQ+Te?= =?us-ascii?Q?tlgJREKgbovGMoYwDNZA1MotE02aHjwvxP6TIjJe6ZyXiutYfdiRq3PedSGs?= =?us-ascii?Q?H6g3mQ5gBnYTwQn1b62372Mkj7oMJ/Uvj9uppjWogvuYA7Whx2ZdvlR98SZr?= =?us-ascii?Q?xvijWL1KzSgXs3wAyoXK4b8LuZmsLFA9Kf8irzgD17vg5y7wMRk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jolQe7BVC3lKGUxFjnr8BlNxHYuNt7ulsZB?= =?us-ascii?Q?XmPAyoN6iZkfzo8pNR8sf4R2lSDOpC03OYejnCD8afxYXMyuuOXBaQ8sPd5N?= =?us-ascii?Q?L1CNWiVCjqU2wRkcFclb/07V66ecdHWmROXlqGo4CiMF9aQY1F95l6ESjF64?= =?us-ascii?Q?WA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b0e9fa4-cd98-4880-5061-08db3b54249d X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 12:47:58.2457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HsT6Mb40c5sQltI1xQ/VkBzIgtH40Ys4XmXmCDhRrbzBs5i6tRTEoZqKMXNGEzOe5OPb/klT0G6dSm2z7YQt/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6888 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 Use the specific enum ocelot_reg to make it clear that the region registers are encoded and not plain addresses. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/mscc/ocelot_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_stats.c b/drivers/net/ethernet/mscc/ocelot_stats.c index 99a14a942600..a381e326cb2b 100644 --- a/drivers/net/ethernet/mscc/ocelot_stats.c +++ b/drivers/net/ethernet/mscc/ocelot_stats.c @@ -145,7 +145,7 @@ enum ocelot_stat { }; struct ocelot_stat_layout { - u32 reg; + enum ocelot_reg reg; char name[ETH_GSTRING_LEN]; }; @@ -257,7 +257,7 @@ struct ocelot_stat_layout { struct ocelot_stats_region { struct list_head node; - u32 base; + enum ocelot_reg base; enum ocelot_stat first_stat; int count; u32 *buf; @@ -889,7 +889,7 @@ static int ocelot_prepare_stats_regions(struct ocelot *ocelot) { struct ocelot_stats_region *region = NULL; const struct ocelot_stat_layout *layout; - unsigned int last = 0; + enum ocelot_reg last = 0; int i; INIT_LIST_HEAD(&ocelot->stats_regions); -- 2.34.1