[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADGdYn6e6Rwqezj1prLZz9Ue6GwCRcGA1Y3RNRbfbCeJn3qSnQ@mail.gmail.com>
Date: Mon, 19 May 2014 11:35:33 +0530
From: Amit Kachhap <amit.kachhap@...il.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc: Eduardo Valentin <eduardo.valentin@...com>,
Zhang Rui <rui.zhang@...el.com>,
Tomasz Figa <t.figa@...sung.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kyungmin Park <kyungmin.park@...sung.com>,
linux-samsung-soc@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/10] thermal: exynos: remove redundant pdata checks from exynos_tmu_control()
Hi Bartlomiej,
On 5/5/14, Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com> wrote:
> pdata->reference_voltage and pdata->gain are always defined
> to non-zero values so remove the redundant checks from
> exynos_tmu_control().
I prefer to have these checks for the same reason that new soc support
should not add these same code again.
>
> There should be no functional changes caused by this patch.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> ---
> drivers/thermal/samsung/exynos_tmu.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c
> b/drivers/thermal/samsung/exynos_tmu.c
> index a8d9524..45d7c6f 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -215,15 +215,11 @@ static void exynos_tmu_control(struct platform_device
> *pdev, bool on)
> if (pdata->test_mux)
> con |= (pdata->test_mux << reg->test_mux_addr_shift);
>
> - if (pdata->reference_voltage) {
> - con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
> - con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
> - }
> + con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
> + con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
>
> - if (pdata->gain) {
> - con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift);
> - con |= (pdata->gain << reg->buf_slope_sel_shift);
> - }
> + con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift);
> + con |= (pdata->gain << reg->buf_slope_sel_shift);
>
> if (pdata->noise_cancel_mode) {
> con &= ~(reg->therm_trip_mode_mask <<
> --
> 1.8.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists