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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ym66R9hpFgRikNx7@kroah.com>
Date:   Sun, 1 May 2022 18:50:15 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Philipp Hortmann <philipp.g.hortmann@...il.com>
Cc:     Forest Bond <forest@...ttletooquiet.net>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: vt6655: Rename function CARDbGetCurrentTSF

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ