Message ID | 20230621182558.544417-1-brgl@bgdev.pl (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A760EB64D8 for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Jun 2023 18:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BP5M9W4cZb7+UA+0ZXcBFr6GFB5txdGHga41k48IKyA=; b=YuOC3qWTNl8pry KOadSUnsOTIHX+yiPLG1/oM3DveaGIe/c7dOfS4KYPnhKrxxt46oudeHOMaEBtL2nEcF0KnqO748c 7vOymsz558APuIuLMQlnEFLVl2loCzM/b1fL3PUXgQVht6sD3hwOHcxRuZW+npkU4BdyvzjBWNLP+ tBccGDIRmytkyqO0s1KnCEDYk89OLQBfXflVbyStBuiz5nbR1q2C4rBca/cjaQzBiSdUqt19rj+Ly ZmjTx/dfV441T7aUZguj97VpMOXXaBMdPUteaXvHqXtMgjcsqtN367lR4JXRDsCyM2JwHkL6zytXn EhVm9Dp0W1KZqX382a3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qC2X3-00FNvJ-2l; Wed, 21 Jun 2023 18:26:17 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qC2X0-00FNtO-1h for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2023 18:26:15 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-312826ffedbso2004675f8f.0 for <linux-arm-kernel@lists.infradead.org>; Wed, 21 Jun 2023 11:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687371971; x=1689963971; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9YRCkfxlgVhLag2qZdreYDwQ2ugrCPfdILJ7ghjkiVg=; b=u8ZAQRyJzdnE2piUbuVRCJwKkURKjchpnXy+eFI1urxv6Cd5d3XsXcG66xfVnGnxon XDt32nCwF3aUUMgkmVUyFjUEM9VwRuNlkR3pcnz9eWy/Q5ZQK8v+G41ZrPc9qD9pZU3g RZ0HcmroxwkfHdkQ/EkPDf/v5z98rhagKx57MVxw79caWc0Fb+f93WtwduDRjZs+NGa2 cxWgGQRrXI6MC/TtWBuNdmTxbcygfzeUVkYYs5f1NVZU02WReLQSCZSO52HASJvEo/B+ N5o0ao2itbeBnosegCy7tG8QlsBdbiJq/mgUjDBaFT3ZokQvbaYFB6+CIWNRcx+rxYnw v/QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687371971; x=1689963971; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9YRCkfxlgVhLag2qZdreYDwQ2ugrCPfdILJ7ghjkiVg=; b=BBQevM0kuXLX2omucWhyNYLJMs+FrQCwOiZlMGUW/U0qQ6m+kuKFouEjoqNQJpmBXw MSZ4uKFcL+5FQCTinP6m9pkK8jjQGC45o2gw00aRLrjIjXfTeLTw2cTeEUDiaaZYjWpE ZXXFroJwbfCOu7/ot6OGFIP8cZRhy3/VZY2xq3eUlDC7FUgmixjz0+LkVoxQ0Lvk6go1 uflc7XVSulPLCIQMl7uAa/nXwPVj8+VoH0cIg8ILx8MlmARBWqLWHyCXHrSbAo/qr2Vb u/LFRYYcSZ6U0hTCO6Itbp8lkk3PWgzfZYJ0aAVvgP87u0gDBwb5Gik1OmaRjXlmm9kC 6OYA== X-Gm-Message-State: AC+VfDxD1MQIzDjj/6q75W94Eo6aN88zGTWhLndGgvocA3G/2MbtHXMr KBUbvKjkPtFBIDSjEji9MUCirQ== X-Google-Smtp-Source: ACHHUZ7AU0YR6t8YRNVDFi1hgZ+p3KaefWogW+t3JyVHWxfXMFp6sDeW7fgBuhh/aFdqIV4RQ9+IGw== X-Received: by 2002:adf:e4cd:0:b0:30e:3d5a:b2be with SMTP id v13-20020adfe4cd000000b0030e3d5ab2bemr12500462wrm.44.1687371971502; Wed, 21 Jun 2023 11:26:11 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:a69f:8ee3:6907:ccdf]) by smtp.gmail.com with ESMTPSA id z13-20020adff74d000000b0030af15d7e41sm5176994wrp.4.2023.06.21.11.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:26:11 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Vinod Koul <vkoul@kernel.org>, Bhupesh Sharma <bhupesh.sharma@linaro.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Richard Cochran <richardcochran@gmail.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH net-next 00/12] net: stmmac: replace boolean fields in plat_stmmacenet_data with flags Date: Wed, 21 Jun 2023 20:25:46 +0200 Message-Id: <20230621182558.544417-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230621_112614_803846_06028F20 X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
net: stmmac: replace boolean fields in plat_stmmacenet_data with flags
|
expand
|
On Wed, 21 Jun 2023 20:25:46 +0200 Bartosz Golaszewski wrote: > As suggested by Jose Abreu: let's drop all 12 boolean fields in > plat_stmmacenet_data and replace them with a common bitfield. Is that what Jose meant, or: - bool has_integrated_pcs; + u32 has_integrated_pcs:1; ?
On Wed, Jun 21, 2023 at 10:12 PM Jakub Kicinski <kuba@kernel.org> wrote: > > On Wed, 21 Jun 2023 20:25:46 +0200 Bartosz Golaszewski wrote: > > As suggested by Jose Abreu: let's drop all 12 boolean fields in > > plat_stmmacenet_data and replace them with a common bitfield. > > Is that what Jose meant, or: > > - bool has_integrated_pcs; > + u32 has_integrated_pcs:1; > > ? For that to work all fields would need to be gathered together (unless the structure is __packed - not a good idea) and all future fields would need to be added in a specific place in the structure definition as well. I think a bit field is clearer and harder to get wrong here. Bart
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> As suggested by Jose Abreu: let's drop all 12 boolean fields in plat_stmmacenet_data and replace them with a common bitfield. Bartosz Golaszewski (12): net: stmmac: replace has_integrated_pcs field with a flag net: stmmac: replace the sph_disable field with a flag net: stmmac: replace the use_phy_wol field with a flag net: stmmac: replace the has_sun8i field with a flag net: stmmac: replace the tso_en field with a flag net: stmmac: replace the serdes_up_after_phy_linkup field with a flag net: stmmac: replace the vlan_fail_q_en field with a flag net: stmmac: replace the multi_msi_en field with a flag net: stmmac: replace the ext_snapshot_en field with a flag net: stmmac: replace the int_snapshot_en field with a flag net: stmmac: replace the rx_clk_runs_in_lpi field with a flag net: stmmac: replace the en_tx_lpi_clockgating field with a flag .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 23 +++++------ .../ethernet/stmicro/stmmac/dwmac-mediatek.c | 5 ++- .../stmicro/stmmac/dwmac-qcom-ethqos.c | 8 ++-- .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 4 +- .../ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 4 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 40 +++++++++++-------- .../net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 +- .../ethernet/stmicro/stmmac/stmmac_platform.c | 10 +++-- .../net/ethernet/stmicro/stmmac/stmmac_ptp.c | 5 ++- include/linux/stmmac.h | 26 ++++++------ 12 files changed, 76 insertions(+), 57 deletions(-)