netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Corentin Labbe <clabbe@baylibre.com>,
	Gilles.Muller@lip6.fr, Julia.Lawall@lip6.fr, agust@denx.de,
	airlied@linux.ie, alexandre.torgue@st.com, alistair@popple.id.au,
	benh@kernel.crashing.org, carlo@caione.org, davem@davemloft.net,
	galak@kernel.crashing.org, joabreu@synopsys.com,
	khilman@baylibre.com, maxime.ripard@bootlin.com,
	michal.lkml@markovi.net, mpe@ellerman.id.au,
	mporter@kernel.crashing.org, narmstrong@baylibre.com,
	nicolas.palix@imag.fr, oss@buserror.net, paulus@samba.org,
	peppe.cavallaro@st.com, tj@kernel.org, vitb@kernel.crashing.org,
	wens@csie.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-ide@vger.kernel.org,
	linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	cocci@systeme.lip6.fr, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 7/7] net: stmmac: dwmac-meson8b: use xxxsetbits32
Date: Mon, 24 Sep 2018 12:17:04 -0700	[thread overview]
Message-ID: <a8d06d0a-b13b-384c-ade6-b0a3b0ee61f6@gmail.com> (raw)
In-Reply-To: <1537815856-31728-8-git-send-email-clabbe@baylibre.com>

On 09/24/2018 12:04 PM, Corentin Labbe wrote:
> This patch convert meson stmmac glue driver to use all xxxsetbits32 functions.
> 
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
>  .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c    | 56 +++++++++-------------
>  1 file changed, 22 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> index c5979569fd60..abcf65588576 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> @@ -23,6 +23,7 @@
>  #include <linux/mfd/syscon.h>
>  #include <linux/platform_device.h>
>  #include <linux/stmmac.h>
> +#include <linux/setbits.h>
>  
>  #include "stmmac_platform.h"
>  
> @@ -75,18 +76,6 @@ struct meson8b_dwmac_clk_configs {
>  	struct clk_gate		rgmii_tx_en;
>  };
>  
> -static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg,
> -				    u32 mask, u32 value)
> -{
> -	u32 data;
> -
> -	data = readl(dwmac->regs + reg);
> -	data &= ~mask;
> -	data |= (value & mask);
> -
> -	writel(data, dwmac->regs + reg);
> -}

Why not make mseon8b_dwmac_mask_bits() a wrapper around
clrsetbits_le32() whose purpose is only to dereference dwmac->regs and
pass it to clrsetbits_le32()? That would be far less changes to review
and audit for correctness, same goes with every other patch in this
series touching the meson drivers.
-- 
Florian

  parent reply	other threads:[~2018-09-24 19:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 19:04 [PATCH v2 0/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 Corentin Labbe
2018-09-24 19:04 ` [PATCH v2 1/7] powerpc: rename setbits32/clrbits32 to setbits32_be/clrbits32_be Corentin Labbe
2018-09-25  4:56   ` Christophe LEROY
2018-09-27  5:30     ` LABBE Corentin
2018-09-24 19:04 ` [PATCH v2 2/7] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 in linux/setbits.h Corentin Labbe
2018-09-25  5:05   ` Christophe LEROY
2018-09-27  5:35     ` LABBE Corentin
2018-09-24 19:04 ` [PATCH v2 3/7] coccinelle: add xxxsetbitsXX converting spatch Corentin Labbe
2018-09-24 19:04 ` [PATCH v2 4/7] ata: ahci_sunxi: use xxxsetbits32 functions Corentin Labbe
2018-09-24 19:04 ` [PATCH v2 5/7] net: ethernet: stmmac: dwmac-sun8i: use xxxsetbits32 Corentin Labbe
2018-09-24 19:04 ` [PATCH v2 6/7] drm: meson: " Corentin Labbe
2018-09-24 19:07   ` Neil Armstrong
2018-09-24 19:04 ` [PATCH v2 7/7] net: stmmac: dwmac-meson8b: " Corentin Labbe
2018-09-24 19:08   ` Neil Armstrong
2018-09-24 19:17   ` Florian Fainelli [this message]
2018-09-25  7:53     ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8d06d0a-b13b-384c-ade6-b0a3b0ee61f6@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=agust@denx.de \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=alistair@popple.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=carlo@caione.org \
    --cc=clabbe@baylibre.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@kernel.crashing.org \
    --cc=joabreu@synopsys.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=michal.lkml@markovi.net \
    --cc=mpe@ellerman.id.au \
    --cc=mporter@kernel.crashing.org \
    --cc=narmstrong@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    --cc=peppe.cavallaro@st.com \
    --cc=tj@kernel.org \
    --cc=vitb@kernel.crashing.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).