From patchwork Sun Mar 4 01:49:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10257525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC19B6037F for ; Sun, 4 Mar 2018 01:56:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD0B5287A1 for ; Sun, 4 Mar 2018 01:56:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0A46287A8; Sun, 4 Mar 2018 01:56:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59B96287A1 for ; Sun, 4 Mar 2018 01:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752634AbeCDB4M (ORCPT ); Sat, 3 Mar 2018 20:56:12 -0500 Received: from onstation.org ([52.200.56.107]:52880 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbeCDBy4 (ORCPT ); Sat, 3 Mar 2018 20:54:56 -0500 Received: from xilitla.hsd1.wv.comcast.net (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 4BFE92846; Sun, 4 Mar 2018 01:49:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1520128193; bh=T57VIrPogaXYAkx4bbF8P49iCAGcbgmHUfjnBOzmAw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hn9z1E+QQBWYEXA+uSB6XxsM00ej/eeCN/iXRzWp8+eKUYE60L+0EEfQrqh8jISOI X0b4QAHlFwYF/FDvdN35qCbJCV+72eNz/y4DLtwcoWZGbCjvheTs6iXZXS2fXIjKmN 1zspT/AcyTdJCk02+9qO43LIpiZpWyG8aNdeoXsw= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 07/12] staging: iio: tsl2x7x: correct 'Avoid CamelCase' warning from checkpatch Date: Sat, 3 Mar 2018 20:49:37 -0500 Message-Id: <20180304014942.18727-8-masneyb@onstation.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180304014942.18727-1-masneyb@onstation.org> References: <20180304014942.18727-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);