Hi Sergei,
On Sun, Feb 7, 2016 at 8:30 PM, Sergei Shtylyov
<[email protected]> wrote:
> --- net-next.orig/drivers/net/ethernet/renesas/ravb_main.c
> +++ net-next/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2,7 +2,7 @@
> *
> * Copyright (C) 2014-2015 Renesas Electronics Corporation
> * Copyright (C) 2015 Renesas Solutions Corp.
> - * Copyright (C) 2015 Cogent Embedded, Inc. <[email protected]>
> + * Copyright (C) 2015-2016 Cogent Embedded, Inc. <[email protected]>
> *
> * Based on the SuperH Ethernet driver
> *
> @@ -42,6 +42,12 @@
> NETIF_MSG_RX_ERR | \
> NETIF_MSG_TX_ERR)
>
> +void ravb_modify(struct net_device *ndev, enum ravb_reg reg, u32 mask,
> + u32 value)
> +{
> + ravb_write(ndev, (ravb_read(ndev, reg) & ~mask) | value, reg);
> +}
Usually "mask"is used for the bits to keep, not for the bits to clear.
So I'd either
1. AND with "mask" instead of "~mask", and update all callers, or
2. rename "mask" to "clear", and "value" to "set".
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds