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: <4623bb17-1dd8-2038-e465-5fe3309e22ba@users.sourceforge.net>
Date:   Sun, 7 May 2017 11:51:47 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-tegra@...r.kernel.org, linux-pm@...r.kernel.org,
        Arnd Bergmann <arnd@...db.de>,
        Eduardo Valentin <edubezval@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mikko Perttunen <mperttunen@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Wei Ni <wni@...dia.com>, Zhang Rui <rui.zhang@...el.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/3] thermal: tegra: Combine two function calls into one in
 regs_show()

From: Markus Elfring <elfring@...rs.sourceforge.net>
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 <elfring@...rs.sourceforge.net>
---
 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);
-- 
2.12.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ