From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
Eduardo Valentin <edubezval@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mikko Perttunen <mperttunen@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Wei Ni <wni@nvidia.com>, Zhang Rui <rui.zhang@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] thermal: tegra: Combine two function calls into one in regs_show()
Date: Sun, 7 May 2017 11:51:47 +0200 [thread overview]
Message-ID: <4623bb17-1dd8-2038-e465-5fe3309e22ba@users.sourceforge.net> (raw)
In-Reply-To: <b0795133-ebb9-56b3-567d-b3773f298789@users.sourceforge.net>
From: Markus Elfring <elfring@users.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@users.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
next prev parent reply other threads:[~2017-05-07 23:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 9:50 [PATCH 0/3] thermal-Tegra: Fine-tuning for regs_show() SF Markus Elfring
2017-05-07 9:51 ` SF Markus Elfring [this message]
[not found] ` <b0795133-ebb9-56b3-567d-b3773f298789-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2017-05-07 9:52 ` [PATCH 2/3] thermal: tegra: Use seq_putc() in regs_show() SF Markus Elfring
2017-05-07 9:53 ` [PATCH 3/3] thermal: tegra: Combine two seq_printf() calls into one " SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4623bb17-1dd8-2038-e465-5fe3309e22ba@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=arnd@arndb.de \
--cc=edubezval@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=rui.zhang@intel.com \
--cc=thierry.reding@gmail.com \
--cc=wni@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).