public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] staging: vt6655: Create one function for four macros
Date: Mon, 1 Aug 2022 14:21:26 +0300	[thread overview]
Message-ID: <20220801112126.GB3438@kadam> (raw)
In-Reply-To: <d4768227a7ea10ccec6d08eb0c55f8790ef70379.1659192760.git.philipp.g.hortmann@gmail.com>

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@gmail.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


  reply	other threads:[~2022-08-01 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 19:20 [PATCH 0/6] staging: vt6655: Create one base function for four macros Philipp Hortmann
2022-07-30 19:20 ` [PATCH 1/6] staging: vt6655: Convert macro MACvEnableProtectMD to function Philipp Hortmann
2022-07-30 19:20 ` [PATCH 2/6] staging: vt6655: Create one function for four macros Philipp Hortmann
2022-08-01 11:21   ` Dan Carpenter [this message]
2022-07-30 19:20 ` [PATCH 3/6] staging: vt6655: Rename function MACvEnableProtectMD Philipp Hortmann
2022-07-30 19:20 ` [PATCH 4/6] staging: vt6655: Convert macro MACvDisableProtectMD Philipp Hortmann
2022-07-30 19:20 ` [PATCH 5/6] staging: vt6655: Convert macro MACvEnableBarkerPreambleMd Philipp Hortmann
2022-07-30 19:21 ` [PATCH 6/6] staging: vt6655: Convert macro MACvDisableBarkerPreambleMd Philipp Hortmann

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=20220801112126.GB3438@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=philipp.g.hortmann@gmail.com \
    /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