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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180310144308.0f9ecadd@archlinux>
Date:   Sat, 10 Mar 2018 14:43:08 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Brian Masney <masneyb@...tation.org>
Cc:     linux-iio@...r.kernel.org, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, knaack.h@....de, lars@...afoo.de,
        pmeerw@...erw.net, linux-kernel@...r.kernel.org,
        Jon.Brenner@....com
Subject: Re: [PATCH 07/12] staging: iio: tsl2x7x: correct 'Avoid CamelCase'
 warning from checkpatch

On Sat,  3 Mar 2018 20:49:37 -0500
Brian Masney <masneyb@...tation.org> wrote:

> The statP and calP variables triggered an 'Avoid CamelCase' warning
> from checkpatch.pl. This patch renames these variables to stat and cal
> to fix this warning.
> 
> Signed-off-by: Brian Masney <masneyb@...tation.org>
Applied.
> ---
>  drivers/staging/iio/light/tsl2x7x.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
> index cc209b64ed5a..380a6c96a69a 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -773,7 +773,7 @@ static int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
>  }
>  
>  static void tsl2x7x_prox_calculate(int *data, int length,
> -				   struct tsl2x7x_prox_stat *statP)
> +				   struct tsl2x7x_prox_stat *stat)
>  {
>  	int i;
>  	int sample_sum;
> @@ -783,21 +783,21 @@ static void tsl2x7x_prox_calculate(int *data, int length,
>  		length = 1;
>  
>  	sample_sum = 0;
> -	statP->min = INT_MAX;
> -	statP->max = INT_MIN;
> +	stat->min = INT_MAX;
> +	stat->max = INT_MIN;
>  	for (i = 0; i < length; i++) {
>  		sample_sum += data[i];
> -		statP->min = min(statP->min, data[i]);
> -		statP->max = max(statP->max, data[i]);
> +		stat->min = min(stat->min, data[i]);
> +		stat->max = max(stat->max, data[i]);
>  	}
>  
> -	statP->mean = sample_sum / length;
> +	stat->mean = sample_sum / length;
>  	sample_sum = 0;
>  	for (i = 0; i < length; i++) {
> -		tmp = data[i] - statP->mean;
> +		tmp = data[i] - stat->mean;
>  		sample_sum += tmp * tmp;
>  	}
> -	statP->stddev = int_sqrt((long)sample_sum / length);
> +	stat->stddev = int_sqrt((long)sample_sum / length);
>  }
>  
>  /**
> @@ -812,7 +812,7 @@ static void tsl2x7x_prox_cal(struct iio_dev *indio_dev)
>  	int prox_history[MAX_SAMPLES_CAL + 1];
>  	int i;
>  	struct tsl2x7x_prox_stat prox_stat_data[2];
> -	struct tsl2x7x_prox_stat *calP;
> +	struct tsl2x7x_prox_stat *cal;
>  	struct tsl2X7X_chip *chip = iio_priv(indio_dev);
>  	u8 tmp_irq_settings;
>  	u8 current_state = chip->tsl2x7x_chip_status;
> @@ -844,13 +844,13 @@ static void tsl2x7x_prox_cal(struct iio_dev *indio_dev)
>  	}
>  
>  	tsl2x7x_chip_off(indio_dev);
> -	calP = &prox_stat_data[PROX_STAT_CAL];
> +	cal = &prox_stat_data[PROX_STAT_CAL];
>  	tsl2x7x_prox_calculate(prox_history,
> -			       chip->settings.prox_max_samples_cal, calP);
> -	chip->settings.prox_thres_high = (calP->max << 1) - calP->mean;
> +			       chip->settings.prox_max_samples_cal, cal);
> +	chip->settings.prox_thres_high = (cal->max << 1) - cal->mean;
>  
>  	dev_info(&chip->client->dev, " cal min=%d mean=%d max=%d\n",
> -		 calP->min, calP->mean, calP->max);
> +		 cal->min, cal->mean, cal->max);
>  	dev_info(&chip->client->dev,
>  		 "%s proximity threshold set to %d\n",
>  		 chip->client->name, chip->settings.prox_thres_high);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ