From patchwork Sun May 7 09:51:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9715625 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 2DC2B60380 for ; Sun, 7 May 2017 23:25:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20CCE26224 for ; Sun, 7 May 2017 23:25:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1590326419; Sun, 7 May 2017 23:25:40 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 AC95426224 for ; Sun, 7 May 2017 23:25:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbdEGXZi (ORCPT ); Sun, 7 May 2017 19:25:38 -0400 Received: from mout.web.de ([212.227.15.4]:52324 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbdEGXZh (ORCPT ); Sun, 7 May 2017 19:25:37 -0400 Received: from [192.168.1.3] ([77.182.161.211]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MQc7J-1dUYtX1ylZ-00U5Qd; Sun, 07 May 2017 11:51:50 +0200 Subject: [PATCH 1/3] thermal: tegra: Combine two function calls into one in regs_show() From: SF Markus Elfring To: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, Arnd Bergmann , Eduardo Valentin , Jonathan Hunter , Mikko Perttunen , Thierry Reding , Wei Ni , Zhang Rui Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <4623bb17-1dd8-2038-e465-5fe3309e22ba@users.sourceforge.net> Date: Sun, 7 May 2017 11:51:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:S9KdiGOG85mkM6yrbZXwGkHnX+jifl004LPBFbxmFqr0deix4Ui CXnCv4WMbGFPXljmjqcjP34ItPZTO7fvSwIl7DuHJ2K/OBu9AeVDDO+yS/ZJYhHFBGHegfP pZdBgwDI+rd6Fvu0O6GE+2u90AOUA8DazYlA5Ex7egavMTgRG2c9uz2YGL8Ic9CXo0ZcGLa Sf5lZTElqNKy9483lovBA== X-UI-Out-Filterresults: notjunk:1; V01:K0:gC7tdSAVScY=:qcD8u+15u7SvFvo+HkT6tb QBo1t3TuRXSI15Bfm8wS/K4yY9D5/+sljd7eIwoBpvPA5/1EnfMDlNeSNebTgL96TKsVVis72 490luhaBeu8ZdyuVjf/mz17IqgJko4s2WtGSOG73QAmcaT1+MU2Pbs+5/t6K/gthA8g64nAi2 P4XfojRYdgajCjhOgTG3RDaYbT5LtnN4hscjIxHbdEj0rJLFWLiu4KzVKQOzvFi/wS6jjvhX6 lN1G1Wk4ofnnc8H2NcrzZsMsVsK5L/eefuXgag3ovPnYAyAvyYKLhbA61qUmhp+3ogvC0EH6/ JAlJXiTff7ZlM1AWSPeprML3DszFo/gaaUe3Wp10roy8zvKFXSosKNes/AFdta6aXyY5ulhhG UmGdhbqP/5WzHYpAeYv7Zh79HU2UWWu6I7GbumTbIUx9IyUdaIjoxZLpgKODtsvDEudd2xdVR /bMhDEb2ml2zoJqFcVwd32eoyRvotJZQYI0L2UgkDGHnFS5CmaYhk+bZ8G7m5l6cQtEJx1epo 7QqN5w0rEth+ZJW1XGYBC7y0luu/fimz4MKxBF7nBArSNt4//F5UdMzLZkgopBCW1edVTeTaJ FcWDV7QL4NhSSsLy8X47kD9LlHuzy8cVb3KOXfxjFobWO3kVR9aL/SVGqjLYpZNrdy4sJuSao xt5M4lZaE+eX9pVlMrvhApmBAQVoiwL3l0WEvG+MFjPZNwcsqCq9/CntZ8gNcjc/QcroynmMt NBHkf5ljdpV2yCDGyB2hycl8XKHqASOhkU5AAJ75DWey+zRw4ojgRScEeprKcZheEnHZ6I+9L SECKlx+ Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 7 May 2017 10:50:35 +0200 A bit of data was put into a sequence by two separate function calls at two places. Print the same data by single function calls instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/thermal/tegra/soctherm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 7d2db23d71a3..c5871f9b6596 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -706,9 +706,7 @@ static int regs_show(struct seq_file *s, void *data) seq_printf(s, "PDIV: 0x%x\n", r); r = readl(ts->regs + SENSOR_HOTSPOT_OFF); - seq_printf(s, "HOTSPOT: 0x%x\n", r); - - seq_puts(s, "\n"); + seq_printf(s, "HOTSPOT: 0x%x\n\n", r); seq_puts(s, "-----SOC_THERM-----\n"); r = readl(ts->regs + SENSOR_TEMP1); @@ -809,9 +807,7 @@ static int regs_show(struct seq_file *s, void *data) } r = readl(ts->regs + THROT_GLOBAL_CFG); - seq_puts(s, "\n"); - seq_printf(s, "GLOBAL THROTTLE CONFIG: 0x%08x\n", r); - + seq_printf(s, "\nGLOBAL THROTTLE CONFIG: 0x%08x\n", r); seq_puts(s, "---------------------------------------------------\n"); r = readl(ts->regs + THROT_STATUS); state = REG_GET_MASK(r, THROT_STATUS_BREACH_MASK);