From patchwork Sun Jan 7 17:37:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512947 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 6758A13AD5; Sun, 7 Jan 2024 17:38:30 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="ridtSFfI"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="ampHmhh5" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id 99BAD6017E; Sun, 7 Jan 2024 18:38:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649108; bh=BIuDQXGfrKfQlcsSLLqPe3CMzmxB2CaH61qBgoQlgJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ridtSFfI/dZjdsN7u0mSF1vSHBkcuKxGTs18lgPIbEejWIu7r0KCgnJBv4DoAFP95 uAyM7X0BLF4uLd9P0aDhu6+b3x+NqV6OpJCd971YuaqQGq2O3t3y0Rqp5eYHm/O0Do QLgUrtNf+0F4TwNuV8rLjxKXW5K96d9uuHxS7Tl3JGjsJ630GSc2OtoRrbmMC+Abp+ 7iIOZOaoEC2IdCWmHBcPpNw6cqkOPjXoLbMSMQByI/cvwdAcg98i8OctxdeJzI+mTR ElMSJ4j+0Q8yNmDGlTzp5fN9xhndie/+wrjdLpThewePU4f6xe2TkcQqQS9FDF2cG1 ZWoQKQK0ioDWg== 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 KNdyY3a6zrtl; Sun, 7 Jan 2024 18:38:26 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 2907B60171; Sun, 7 Jan 2024 18:38:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649106; bh=BIuDQXGfrKfQlcsSLLqPe3CMzmxB2CaH61qBgoQlgJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ampHmhh5lx8L51zbAZ/CQdmqphuDF7HcUxWe1/v+dqvb0Q9cbnK80e+hmAblmGmDP zu2O5etiNPJPCrAZlva5qpMqbpNuS4mXXZrWNYXL4OBR8vbnTms5+VTHT4W/13Mm0r Ugx4x1oQ9KsieL813jaRApjXCbMKu+qzN5vggZ3xZfwafgeb9SJw17cenl+Zvz1LcT rgqs8VZUY4zN+/YKF/a0HRUr0Z9mRHbkpAEy2+CCUNhbNcTlb0kkGc/ftVgYRpJm39 tFOFSirkZ2ch8mdyaVq2m4mL79Lpzgg6kSFQrRz5Z1qtXY3cHazJuJhFQ7vgJ0S2kR tj9E/a9zT97mw== From: Mirsad Todorovac To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Mark Brown , linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Shuah Khan , Mirsad Todorovac Subject: [PATCH v2 1/4] kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg() Date: Sun, 7 Jan 2024 18:37:02 +0100 Message-Id: <20240107173704.937824-2-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-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Minor fix in the number of arguments to error reporting function in the test program as reported by GCC 13.2.0 warning. mixer-test.c: In function ‘find_controls’: mixer-test.c:169:44: warning: too many arguments for format [-Wformat-extra-args] 169 | ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The number of arguments in call to ksft_exit_fail_msg() doesn't correspond to the format specifiers, so this is adjusted resembling the sibling calls to the error function. Fixes: b1446bda56456 ("kselftest: alsa: Check for event generation when we write to controls") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown --- v1 -> v2: Changed the subject line as suggested to reflect the style of the subsystem. No change to the reviewed code. tools/testing/selftests/alsa/mixer-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c index 23df154fcdd7..208c2170c074 100644 --- a/tools/testing/selftests/alsa/mixer-test.c +++ b/tools/testing/selftests/alsa/mixer-test.c @@ -166,7 +166,7 @@ static void find_controls(void) err = snd_ctl_poll_descriptors(card_data->handle, &card_data->pollfd, 1); if (err != 1) { - ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n", + ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for card %d: %d\n", card, err); } From patchwork Sun Jan 7 17:37:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512948 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 D54A813FE1; Sun, 7 Jan 2024 17:38:50 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="rdfO6Ikq"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="M7moKdXN" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id 3321E6017F; Sun, 7 Jan 2024 18:38:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649129; bh=1/zuAT1xloxmRYetvIowBnxOA2NzXWwHHC8Xz+UI6Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rdfO6IkqmYtUf2f9UjhS+QE4ejabMAdfcDzvyH9vkInf5Tk/mFar7LXQmxDzoL1DA WDZgzNhBxG9PCle/9jsOtC5rtR7a7nKWdrzPfKEV8ir5sImTap62Qr7U0VgQX3KXXA 1wR1bkZgPbLRuNl1wBfG5uS/mciNpu0UdO0kT6Chrc5nUoJVZxTZspSmspZJNrdspo RyN8gl5Tkjnt4qrfx/xaWzK/YSn8CzpCga1leXmw5zsVk7KywbCNcjr4FhkAe2Wc3K ncH/nCFLpNUlG7fwsaWe9Cyn5qQ3vuMMjuoacnwT0FYw4I/QuTL8xGf3Z4b1Bk9k00 d6Bq1wnWjayBQ== 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 SD-uOkXnCArC; Sun, 7 Jan 2024 18:38:47 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id AB13360171; Sun, 7 Jan 2024 18:38:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649127; bh=1/zuAT1xloxmRYetvIowBnxOA2NzXWwHHC8Xz+UI6Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7moKdXNOCVMJ4+XjVAs1QGJ5uwyEFfbfqlDMdkofHwJUNbjoXsOm7Ea2cg0PpsoX GRgM43w0Upd343GOEULZ3SjjL4Vf+Lp//iQieHDnKFxJ65yyqu50TIC4/164uEcii9 DK0GrHewuYXipLJwypTS72Fv/DqBhJfgBouP6cAkwmIQkVW9uLjnr0dWdpDCcybBSt dtt/Qo0a3hy0xnzkL9tEy4EhaW7l3wlaav/3YAoXoJOShq+iKs7jeKitE/sriCex6g z18/bxjMZYmUUTZmCogo5bF3e6hpsa2jY2NcPcuDoiRMEuZfOcxaOjZ4PuevJY0ZYi YEdkNGEITk/JQ== From: Mirsad Todorovac To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Mark Brown , linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Shuah Khan , Mirsad Todorovac Subject: [PATCH v2 2/4] kselftest/alsa - mixer-test: Fix the print format specifier warning Date: Sun, 7 Jan 2024 18:37:04 +0100 Message-Id: <20240107173704.937824-3-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-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The GCC 13.2.0 compiler issued the following warning: mixer-test.c: In function ‘ctl_value_index_valid’: mixer-test.c:322:79: warning: format ‘%lld’ expects argument of type ‘long long int’, \ but argument 5 has type ‘long int’ [-Wformat=] 322 | ksft_print_msg("%s.%d value %lld more than maximum %lld\n", | ~~~^ | | | long long int | %ld 323 | ctl->name, index, int64_val, 324 | snd_ctl_elem_info_get_max(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long int Fixing the format specifier as advised by the compiler suggestion removes the warning. Fixes: 3f48b137d88e7 ("kselftest: alsa: Factor out check that values meet constraints") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown --- v1 -> v2: Changed the subject line as suggested to reflect the style of the subsystem. No change to the reviewed code. tools/testing/selftests/alsa/mixer-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c index 208c2170c074..df942149c6f6 100644 --- a/tools/testing/selftests/alsa/mixer-test.c +++ b/tools/testing/selftests/alsa/mixer-test.c @@ -319,7 +319,7 @@ static bool ctl_value_index_valid(struct ctl_data *ctl, } if (int64_val > snd_ctl_elem_info_get_max64(ctl->info)) { - ksft_print_msg("%s.%d value %lld more than maximum %lld\n", + ksft_print_msg("%s.%d value %lld more than maximum %ld\n", ctl->name, index, int64_val, snd_ctl_elem_info_get_max(ctl->info)); return false; From patchwork Sun Jan 7 17:37:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512949 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 24FEB13FE4; Sun, 7 Jan 2024 17:39:54 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="CC7OrlRv"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="B3r7gZEn" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id C9C556017E; Sun, 7 Jan 2024 18:39:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649192; bh=KFUUL5Ps5QlFLt+OptyootqlNt7GeHExu0YP0itshxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CC7OrlRv3ITqji7BqIsy5iOBM1ku6V1jVKi0e7Lq7/7R9XlwYmJmobF01fXEZ+0YU rv1a7lLiSo0+ptP6vHyAski+LgkwLxIoI/B1PfnvXGbSIbGzgmEAnTs/ibXds4d/VW KhfPHHkmq10WPuhMkx5yjp0vJ85LCQsCKMzpJNdRItys4fhuaUFhz1wZjza81FFJ9C 6hBP2EQQv5ztI9Rf+Psk3XQm6Pl+BlU2PUimtNGxtd9z4iuvkdLj/lT2S5HnvSmRVm P/ihxKY4Z0S45zDvzSr3D+67JJdXt+5kwtIcCBqoS+5Wvs4RVPmzT7mzCxMpfVjtzi CgyCUeo2Dbx1w== 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 VUVLCKoPm04N; Sun, 7 Jan 2024 18:39:50 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 3EF3860171; Sun, 7 Jan 2024 18:39:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704649190; bh=KFUUL5Ps5QlFLt+OptyootqlNt7GeHExu0YP0itshxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B3r7gZEnXuqYq50Ah0ov8lj5bEUVZyQnKCaI2LgGMJ9dvZzprGNgan9slwwQ6gQFl 3tMiyV4rE9JQs1n2tUjLoM3rLjv9FWIPhyb9qRD2m+g/a6s/Ho42y9ELv0Iy8V8TFI 472IpD1PfjU55yHXz9N18g9JKwWBS9SrRIYO8DRgLlgqfllWA9wvc3TyGp9KhEac16 GCQTVNcfxH9Amb8gQtTrmYFpCmWkmT6WTrvXX0WSnxvjw8C1YaUoANLoCWX2K7gs/E XlmMAfAR1jO1jpKpToMfI8r/F1WonIITfdP1afMecOA2FL4boxQ22PyWLsuClfhFb0 f0n19pyhbXe7A== From: Mirsad Todorovac To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Mark Brown , linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Shuah Khan , Mirsad Todorovac Subject: [PATCH v2 3/4] kselftest/alsa - mixer-test: Fix the print format specifier warning Date: Sun, 7 Jan 2024 18:37:06 +0100 Message-Id: <20240107173704.937824-4-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-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 GCC 13.2.0 compiler issued the following warning: mixer-test.c:350:80: warning: format ‘%ld’ expects argument of type ‘long int’, \ but argument 5 has type ‘unsigned int’ [-Wformat=] 350 | ksft_print_msg("%s.%d value %ld more than item count %ld\n", | ~~^ | | | long int | %d 351 | ctl->name, index, int_val, 352 | snd_ctl_elem_info_get_items(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned int Fixing the format specifier in call to ksft_print_msg() according to the compiler suggestion silences the warning. Fixes: 10f2f194663af ("kselftest: alsa: Validate values read from enumerations") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown --- v1 -> v2: Changed the subject line as suggested to reflect the style of the subsystem. Changed format from %d to %u as suggested. tools/testing/selftests/alsa/mixer-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c index df942149c6f6..1c04e5f638a0 100644 --- a/tools/testing/selftests/alsa/mixer-test.c +++ b/tools/testing/selftests/alsa/mixer-test.c @@ -347,7 +347,7 @@ static bool ctl_value_index_valid(struct ctl_data *ctl, } if (int_val >= snd_ctl_elem_info_get_items(ctl->info)) { - ksft_print_msg("%s.%d value %ld more than item count %ld\n", + ksft_print_msg("%s.%d value %ld more than item count %u\n", ctl->name, index, int_val, snd_ctl_elem_info_get_items(ctl->info)); return false; From patchwork Sun Jan 7 17:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512950 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 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" 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 To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Mark Brown , linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Shuah Khan , Mirsad Todorovac 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-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown --- 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(-) 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';