public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: vt6655: Rename function CARDbGetCurrentTSF
Date: Sun, 1 May 2022 18:50:15 +0200	[thread overview]
Message-ID: <Ym66R9hpFgRikNx7@kroah.com> (raw)
In-Reply-To: <1f38006d7eb18426a2336b7666d385021bf81faf.1651422181.git.philipp.g.hortmann@gmail.com>

On Sun, May 01, 2022 at 06:37:05PM +0200, Philipp Hortmann wrote:
> The name of the function uses CamelCase which
> is not accepted by checkpatch.pl
> 
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
>  drivers/staging/vt6655/card.c        | 10 +++++-----
>  drivers/staging/vt6655/card.h        |  2 +-
>  drivers/staging/vt6655/device_main.c |  2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
> index ec6fd185d3fd..d1dfd96e13b7 100644
> --- a/drivers/staging/vt6655/card.c
> +++ b/drivers/staging/vt6655/card.c
> @@ -11,7 +11,7 @@
>   *      CARDbAddBasicRate - Add to BasicRateSet
>   *      CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet
>   *      CARDqGetTSFOffset - Calculate TSFOffset
> - *      CARDbGetCurrentTSF - Read Current NIC TSF counter
> + *      card_get_current_tsf - Read Current NIC TSF counter
>   *      CARDqGetNextTBTT - Calculate Next Beacon TSF counter
>   *      CARDvSetFirstNextTBTT - Set NIC Beacon time
>   *      CARDvUpdateNextTBTT - Sync. NIC Beacon time
> @@ -288,7 +288,7 @@ bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
>  	u64 local_tsf;
>  	u64 qwTSFOffset = 0;
>  
> -	CARDbGetCurrentTSF(priv, &local_tsf);
> +	card_get_current_tsf(priv, &local_tsf);

Why is the value being passed as a reference and the error value (if
any), is not checked at all?

Shouldn't this just return the value as it obviously must always work?
(retorical question, something is wrong here...)

And this is a horrible global function name, can you prefix it with the
driver name to give us a chance to keep the global namespace sane?
vt6655_get_current_tsf() would be better.

thanks,

greg k-h

  reply	other threads:[~2022-05-01 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01 16:36 [PATCH 0/2] staging: vt6655: Fix name and return value of CARDbGetCurrentTSF Philipp Hortmann
2022-05-01 16:37 ` [PATCH 1/2] staging: vt6655: Rename function CARDbGetCurrentTSF Philipp Hortmann
2022-05-01 16:50   ` Greg Kroah-Hartman [this message]
2022-05-01 16:37 ` [PATCH 2/2] staging: vt6655: Replace unused return value of card_get_current_tsf Philipp Hortmann
2022-05-01 16:53   ` Greg Kroah-Hartman

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=Ym66R9hpFgRikNx7@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=forest@alittletooquiet.net \
    --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