lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220801112126.GB3438@kadam>
Date:   Mon, 1 Aug 2022 14:21:26 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Philipp Hortmann <philipp.g.hortmann@...il.com>
Cc:     Forest Bond <forest@...ttletooquiet.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] staging: vt6655: Create one function for four macros

On Sat, Jul 30, 2022 at 09:20:30PM +0200, Philipp Hortmann wrote:
> Create function vt6655_mac_en_dis_bits_u32_reg with three parameters to
> cover functionality of four macros.
> 
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
> ---
>  drivers/staging/vt6655/device_main.c | 12 ++++++++++--
>  drivers/staging/vt6655/mac.h         |  3 +++
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index 3565aa53f007..5f64204dc312 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -216,15 +216,23 @@ static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index)
>  		iowrite32(DMACTL_RUN, iobase + reg_index);
>  }
>  
> -static void MACvEnableProtectMD(void __iomem *iobase)
> +static void vt6655_mac_en_dis_bits_u32_reg(void __iomem *iobase, bool en_not_dis, u32 bit_mask)

Never have "not" in a variable name.  Just make this two functions.

static void vt6655_mac_set_bits(void __iomem *iobase, u32 mask)
static void vt6655_mac_clear_bits(void __iomem *iobase, u32 mask)

Rename "bit_mask" to "mask" or "bits" because bit masks are the only type
of mask that there is in the kernel.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ