From nobody Tue Oct 7 09:59:55 2025 Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45C6F27467B; Thu, 10 Jul 2025 13:50:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.204.34.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752155407; cv=none; b=enAOVa9AVf3RhH5U1UdLljgqNZLUWQOJXBdFnqRyhFWA5vhv+/7JRtXsz9v3bkZUZLEL1o42A1/H0GSwJH1+gXUQ2Blsnt7pbk98wzgYx5HF6W4bymlfz5owrLBc+UbWe0V5sVWgSYb7vHdVJFeoLie4VINt9FsKKHtcGso1pco= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752155407; c=relaxed/simple; bh=SUWRZ9dxXGm6+zx/mzro3m8Nr7n+JkOPnhEWZD0cam4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jCYKqnEywXp0JBegHkzVDnIfb2IATOjlcLRQBAIvgEGqIX9YEw6b80cVr3/kXpIY+8gh6OTGLHQh/m+BNglZcItZZKM+twGnvgGhfQ+UnC+25IDoJEhWmSFBjPjCMr2W9MmB3qUFNOavD2lOAJZAGOQ4s+1sxgYHLF+qgKPzlAA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=jrc78443; arc=none smtp.client-ip=54.204.34.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="jrc78443" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1752155352; bh=eER373CBKVzjZU12vPfZqu6v9KD+kKd8SlW6nlnHSPM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=jrc78443Mz4tHwjHVtUWntmpM82FBBwwHUxk6kSDZDC9ZiMWMfC0mJ8B6cQ2IJeTa QMXAD7kyjEvgkC6/P/BQtgT+uWYvy94iH+5l0nz5TPeydTtpuHJNsXM1YLDLcLpZkB KkaUkV4JC3nQooWSsDwSN6vW/F8HdrXURS42n38U= X-QQ-mid: zesmtpip2t1752155310tec24b4f1 X-QQ-Originating-IP: y3pfuQqVdTiPsuUM2wAolixPa+zMpnrZCdXw+LqGsSI= Received: from avenger-e500 ( [localhost]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 10 Jul 2025 21:48:28 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 6548783299079273511 EX-QQ-RecipientCnt: 9 From: WangYuli To: wangyuli@uniontech.com Cc: akpm@linux-foundation.org, chelsyratnawat2001@gmail.com, guanwentao@uniontech.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, niecheng1@uniontech.cm, shuah@kernel.org, zhanjun@uniontech.com Subject: [PATCH] selftests/thermal: Remove duplicate newlines in perror calls Date: Thu, 10 Jul 2025 21:47:51 +0800 Message-ID: X-Mailer: git-send-email 2.50.0 In-Reply-To: <6338CD0E839B770B+20250710130412.284531-1-wangyuli@uniontech.com> References: <6338CD0E839B770B+20250710130412.284531-1-wangyuli@uniontech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpip:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a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JUW2RRhAgGsWGQXKDt1DQW5/ox+zo= X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= X-QQ-RECHKSPAM: 0 Content-Type: text/plain; charset="utf-8" The perror() function automatically appends a newline character, so the explicit '\n' in the format strings is redundant and results in duplicate newlines in the output. Remove the redundant '\n' characters from perror() calls in workload_hint_test.c to fix the formatting. Signed-off-by: WangYuli --- .../intel/workload_hint/workload_hint_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/thermal/intel/workload_hint/workload_h= int_test.c b/tools/testing/selftests/thermal/intel/workload_hint/workload_h= int_test.c index bda006af8b1b..ba58589a1145 100644 --- a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_tes= t.c +++ b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_tes= t.c @@ -32,12 +32,12 @@ void workload_hint_exit(int signum) =20 fd =3D open(WORKLOAD_ENABLE_ATTRIBUTE, O_RDWR); if (fd < 0) { - perror("Unable to open workload type feature enable file\n"); + perror("Unable to open workload type feature enable file"); exit(1); } =20 if (write(fd, "0\n", 2) < 0) { - perror("Can't disable workload hints\n"); + perror("Can't disable workload hints"); exit(1); } =20 @@ -70,12 +70,12 @@ int main(int argc, char **argv) sprintf(delay_str, "%s\n", argv[1]); fd =3D open(WORKLOAD_NOTIFICATION_DELAY_ATTRIBUTE, O_RDWR); if (fd < 0) { - perror("Unable to open workload notification delay\n"); + perror("Unable to open workload notification delay"); exit(1); } =20 if (write(fd, delay_str, strlen(delay_str)) < 0) { - perror("Can't set delay\n"); + perror("Can't set delay"); exit(1); } =20 @@ -92,12 +92,12 @@ int main(int argc, char **argv) /* Enable feature via sysfs knob */ fd =3D open(WORKLOAD_ENABLE_ATTRIBUTE, O_RDWR); if (fd < 0) { - perror("Unable to open workload type feature enable file\n"); + perror("Unable to open workload type feature enable file"); exit(1); } =20 if (write(fd, "1\n", 2) < 0) { - perror("Can't enable workload hints\n"); + perror("Can't enable workload hints"); exit(1); } =20 @@ -108,7 +108,7 @@ int main(int argc, char **argv) while (1) { fd =3D open(WORKLOAD_TYPE_INDEX_ATTRIBUTE, O_RDONLY); if (fd < 0) { - perror("Unable to open workload type file\n"); + perror("Unable to open workload type file"); exit(1); } =20 --=20 2.50.0