Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3508398rwi; Wed, 12 Oct 2022 03:08:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5e+RSgaYaUAqwPg4T2OqS70UvidsxOrCMh+F/jSBVd3zeHkpvtik5AYwhSL9GAMLYfD+Jq X-Received: by 2002:a05:6402:11ce:b0:45c:a2a2:4207 with SMTP id j14-20020a05640211ce00b0045ca2a24207mr3154602edw.3.1665569284483; Wed, 12 Oct 2022 03:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665569284; cv=none; d=google.com; s=arc-20160816; b=hpAGLMXFL8v+UM4pyS1TauvaLq8J/tMadSNeXcU9+HicRdYHLuIr4TaFPAzlvl7FTO sjdSouQdHY7zdyBQVKPVphE9umBggjoccIhD8heA0DDUpdLOP8wkvx7aHaWl4GXimXmX 4IesT+WJ0gMKWSEDpO76qJve7z7PEHjBczB/6sdonvHkhVF+1sUhJG/aan3bd8zKilSO gk/g5R7zuMrqEcoziBmULA/tu8TVJxCw7gURzYRh8XXxud0RrHiIVW380Pc0zS5DzliV ufUyd5AAD7p3PLv2zw12Z766Kxlb5V0fwUWmyIoJ5aP+ktR7dHQV2VLXcnGBc1ernoT+ Pmlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pNSFAr2MGivBSLtf3MfcdCBQLmBdDr3TEf3ZiaGN4R8=; b=FYzFnz6sy8Pelm7VFgH61CBHhyHaYjDpsRi37GVqk5SJLKwzbyZKH3HMlPCMf6mVwi Emu/lECbiZtgp0t1KYt1vVum4+LLo9PjGPjd+voqIyxsinq/Zv5567OMh3mYj3wv1kAO g3FFX72trc2eP1uhapQmKao/YYBiT4NVd3T4wQeXupDBSQKMaIYDydga40wIN7T0lixo oWLO+4bwg9WOrA5cUxSxjbhl8zy6isGWTj7w+m9A+PVXS/a9YeMu/e+eul7umYOI3l7P DWnEajwq9vLP1TTGGdQ0TBaiiGvBRfTKQXMCwjyWeKvtJQuvN/iEVhNXJgrHxMYS5FcF l3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FDD9yc6U; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd25-20020a1709076e1900b0078df1c345e4si1768275ejc.518.2022.10.12.03.07.36; Wed, 12 Oct 2022 03:08:04 -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=@gmail.com header.s=20210112 header.b=FDD9yc6U; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbiJLJUV (ORCPT + 99 others); Wed, 12 Oct 2022 05:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbiJLJTx (ORCPT ); Wed, 12 Oct 2022 05:19:53 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89339FAD4; Wed, 12 Oct 2022 02:19:52 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id g27so23614157edf.11; Wed, 12 Oct 2022 02:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pNSFAr2MGivBSLtf3MfcdCBQLmBdDr3TEf3ZiaGN4R8=; b=FDD9yc6U8Q8r+i6GYJu0VNwuSvFNAx40cBnTrpkBokdJzW31FSIB9lA0QnpQAgLOjo PKVXCCexLKAo8i2FAfU9IsiFRsUQxOMdOtHZbW5L9MpfpwfTFGjiZaF4jF0zZQbUTARs zel/hmruMzT9kykHnTY2ItDib7T07yeZzsZvJZ/Is3J8jI044GBbLKdVxxGfm88IDsUk 33YTKntHYXEf7t2y8uP5s8RBD7gCeQ8CpPg3EcbTYu/QJconcAE8+QvBqOITjb4TqEjx Ju86wNLPdYTqHaRGmFq7r6YbIt01PxHEEiwve2KLNzv0TjsnV/WdZX7H4vna6WgOkYKl 91Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pNSFAr2MGivBSLtf3MfcdCBQLmBdDr3TEf3ZiaGN4R8=; b=Y5krs3gH4LstW35fFmtep+krlziDGaRKGYnnqCVNfC+2uio9hAjwiSd8BK8MAluNV9 DbqRtUP8z4qm9b/eCfsprJtVJAp0Y1ZMFKMAnrpDywh08xKwXZ+7TJBsdFiE873TTJJV DrTjQ9HVSZ2xieo7eKzcNwmeThoGhSjvJrBjyo7AG8ZeAEN9nytPrd3Ua+VkvKiCq/Ef ja5jhecoQV4ea/LEmNh7+nfbt6MrX0ymQV4YmDMrDJjEn+U1W9jOR2OlPchZWQ8fQAIM F9CdGA4LmCy33c6br3zqOsFkiDUZymvFFTCbymcQChFSmOXSkaFWMoESj/1jsLrdpeCP 6UEQ== X-Gm-Message-State: ACrzQf3wINowk3MOWA24uTQNM4qeK5BdehR3kZ5KRuNdHr3IM19i0Fs0 eagIUWm+T8BFIF+YARqaBbd0/AN6fQ7QIw== X-Received: by 2002:a05:6402:1909:b0:459:d0b8:1606 with SMTP id e9-20020a056402190900b00459d0b81606mr26027648edz.313.1665566390977; Wed, 12 Oct 2022 02:19:50 -0700 (PDT) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id d41-20020a056402402900b0045bef7cf489sm7093029eda.89.2022.10.12.02.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 02:19:50 -0700 (PDT) Date: Wed, 12 Oct 2022 12:19:47 +0300 From: Vladimir Oltean To: Colin Foster Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Russell King , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski , Rob Herring , Lee Jones Subject: Re: [RFC v4 net-next 03/17] net: mscc: ocelot: expose stats layout definition to be used by other drivers Message-ID: <20221012091947.tdiglhtzy5cvfmpe@skbuf> References: <20221008185152.2411007-1-colin.foster@in-advantage.com> <20221008185152.2411007-4-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221008185152.2411007-4-colin.foster@in-advantage.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 On Sat, Oct 08, 2022 at 11:51:38AM -0700, Colin Foster wrote: > The ocelot_stats_layout array is common between several different chips, > some of which can only be controlled externally. Export this structure so > it doesn't have to be duplicated in these other drivers. > > Rename the structure as well, to follow the conventions of other shared > resources. > > Signed-off-by: Colin Foster > --- I see that ocelot->stats_layout has become a redundant indirection. It no longer contains anything hardware-specific. The register offsets are now part of the switch-specific sys_regmap. Could you please refactor the code to use a single static const struct ocelot_stats_layout in ocelot_stats.c, and remove felix->info->stats_layout and ocelot->stats_layout?