Message ID | 20240107173704.937824-5-mirsad.todorovac@alu.unizg.hr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp638170dyq; Sun, 7 Jan 2024 09:41:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtem7ee4CMSnaLVSkst26vuNQRheVYuF12swZA4mLztuclt7G3hr5gvDhEkX7giRg1hwDD X-Received: by 2002:a50:c081:0:b0:557:1d99:9e05 with SMTP id k1-20020a50c081000000b005571d999e05mr1195996edf.70.1704649280565; Sun, 07 Jan 2024 09:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704649280; cv=none; d=google.com; s=arc-20160816; b=Wi0DCnSpUv0lW8N2bVseNMX8gcZOpz9JCbRgOAZXCtmBeMd8B+5c3wgTmHVzLELfv/ YsD55R48YzwhYMUIGFvUJHc+7vS3pEu82/eO1rwy6cIpxh6kwob6xOVgP35e7c5ZpJMb 8WyBlGLsTUnimKJrgCr6Th/ik7twFCz6VaPZrBRc2ulntISruMJGgloO5S8FHgXB86ee jzE80wKBXYMx6AWOadgA/o+8wLJ4Z3PCG359rABZptzBEfZF1Mhx9NAsVe6SAufKLe+5 JNmAn/s2nMHwF1Xftik4gew6JoVrJsxtJb5y3Jwx0NFuIE0pUXA4YzXTzy5MZB7Hi6aj 5nEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=UOkqZTxK8BPHghupdi9oSd8y7VJ8gl6Nf6nEL83VmYM=; fh=8rlZcc3w8h+5OhDlEMfudHXh3g6Yp/rTapFoisVAVgA=; b=ECPn8L19Bt9kgBStR6dbB267iklZhdG+Kcso0Bzwgah1A/GU/UpzoJXRNB/vPHwryA Gj9jJ8mblobgaL/UshmxYWiUbNgQ4t8qhLX5CAW0zCXMrwuLd2wClQm5+C7VR04Q2EzA 2F1a7IRZokm2LfaJOXvYt7rqS6pQ+g4x0VwhVNH2Pw0XUtojYQD8hfulKQxs0Yu3MpD1 G/2fT6zJ4MJ17TUSiYggFMljVS33P/hjYSG3n3cXy9k3B6vZX2PuHiB7uH1FulRu5OCP VmqxzZ0Li4AC8eoATGp+CvCxuNHUZQeEPEyJxkfUGEqwTzIaaBOM6AldKaEg3HRvNXfj 3dyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=QG2FbZjD; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=eGGexq+Z; spf=pass (google.com: domain of linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e2-20020a50a682000000b00553aa95d2afsi2588463edc.635.2024.01.07.09.41.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:41:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=QG2FbZjD; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=eGGexq+Z; spf=pass (google.com: domain of linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18934-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2F7BD1F215D1 for <ouuuleilei@gmail.com>; Sun, 7 Jan 2024 17:41:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4C7013FFA; Sun, 7 Jan 2024 17:41:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="QG2FbZjD"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="eGGexq+Z" X-Original-To: linux-kernel@vger.kernel.org Received: from domac.alu.hr (domac.alu.unizg.hr [161.53.235.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AC9713AE1; Sun, 7 Jan 2024 17:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alu.unizg.hr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alu.unizg.hr Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id C488C6017E; Sun, 7 Jan 2024 18:40:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649257; bh=frM8T6jNy/tqSSRy15Pifi8RjLUEJa3v5iv+TAtHhMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QG2FbZjDQ2ybQ8lsbeIs0/R8VoHzNTqfdZMQ2fxG9poOC+VAL4dlD9OqWPFspHGHA KtmmoCr6AsQnjj26P9GjkaVV6bApNq7C7QZ8dpQ/QI9ZK2hNtpw8dgt8/Wpsn3ezdg obxBBuw4asWuvAapwWD7TMnwO5QR2lPupQdAcpdX90aSxy91c+M8mTWB3NuycAvYnW WiX5rz/NInGWZMjK+ZXcERGa4hhSP/5sljgdXP9/gkFNcMfxP6PpBcrZo+SsA2nSCV 2hq6AHYgEgtGeOqiODEXnST8ZHvv7P2fBgkr1JFIkaQq9JZGpzMeExTaS6JsecPeAW fmI4OmWl5EMHA== X-Virus-Scanned: Debian amavisd-new at domac.alu.hr Received: from domac.alu.hr ([127.0.0.1]) by localhost (domac.alu.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eRrcdnHGKZ_g; Sun, 7 Jan 2024 18:40:55 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 08C8460171; Sun, 7 Jan 2024 18:40:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649255; bh=frM8T6jNy/tqSSRy15Pifi8RjLUEJa3v5iv+TAtHhMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGGexq+Z4UYqK7zyoyr1N5E9I/lPrWDSsDwFTvIUrVrjv59xnzf0uxH+yyeYLpv6L LKnwuxNAFzTKcWbOXsPNXXcXY0958rCQM6CXOOoTxW3mfU8nJzEdolYfBu/5wohGHf s5ZlPX/ILMrV0KznYBudziwzo6a11Fu/J5GB/e2WUuZsYBxtI4UtvqR/fV3gfbOybi k3V/0QaR5vHLgyWRAvvoqXAeojDvESXNjxqqasJyzuZlkY6egk12YGfDEOaPuvvEoc ZJiH4VUBAmV5HO4Eg8Y1tYCT0vbh1zf3iyUPh3+jmOVc5r6w7aFIbG56DKwYkt/y/i a5/INL1L6imfA== From: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>, Mark Brown <broonie@kernel.org>, linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Shuah Khan <shuah@kernel.org>, Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> Subject: [PATCH v2 4/4] kselftest/alsa - conf: Stringify the printed errno in sysfs_get() Date: Sun, 7 Jan 2024 18:37:08 +0100 Message-Id: <20240107173704.937824-5-mirsad.todorovac@alu.unizg.hr> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240107173704.937824-1-mirsad.todorovac@alu.unizg.hr> References: <20240107173704.937824-1-mirsad.todorovac@alu.unizg.hr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787454324062863004 X-GMAIL-MSGID: 1787454324062863004 |
Series |
kselftest: alsa: Fix a couple of format specifiers and function parameters
|
|
Commit Message
Mirsad Todorovac
Jan. 7, 2024, 5:37 p.m. UTC
GCC 13.2.0 reported the warning of the print format specifier:
conf.c: In function ‘sysfs_get’:
conf.c:181:72: warning: format ‘%s’ expects argument of type ‘char *’, \
but argument 3 has type ‘int’ [-Wformat=]
181 | ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n",
| ~^
| |
| char *
| %d
The fix passes strerror(errno) as it was intended, like in the sibling error
exit message.
Fixes: aba51cd0949ae ("selftests: alsa - add PCM test")
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-sound@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
---
v1 -> v2:
Changed the subject line as suggested to reflect the style of the subsystem.
No change to the code.
tools/testing/selftests/alsa/conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sun, Jan 07, 2024 at 06:37:08PM +0100, Mirsad Todorovac wrote: > GCC 13.2.0 reported the warning of the print format specifier: Acked-by: Mark Brown <broonie@kernel.org>
On 1/8/2024 6:37 PM, Mark Brown wrote: > On Sun, Jan 07, 2024 at 06:37:08PM +0100, Mirsad Todorovac wrote: >> GCC 13.2.0 reported the warning of the print format specifier: > > Acked-by: Mark Brown <broonie@kernel.org> Thank you very much for the review. I guess now patchwork will do the rest required. Thanks, Mirsad
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c index 00925eb8d9f4..89e3656a042d 100644 --- a/tools/testing/selftests/alsa/conf.c +++ b/tools/testing/selftests/alsa/conf.c @@ -179,7 +179,7 @@ static char *sysfs_get(const char *sysfs_root, const char *id) close(fd); if (len < 0) ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n", - path, errno); + path, strerror(errno)); while (len > 0 && path[len-1] == '\n') len--; path[len] = '\0';