From patchwork Sun Jan 7 15:12:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512921 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 112F413AC7; Sun, 7 Jan 2024 15:13:28 +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="YRB3Faw+"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="edSH/fKF" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id 421FD6017E; Sun, 7 Jan 2024 16:13:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640407; bh=oa+XGhT/ayVSmnqOJ4svklRVu6puchkWx2tSViCPAS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YRB3Faw+O6GsNsP6bB2nDodpQKpY1uC9U4AxmEHJO9t0R5Ep6SVnURkWB251g+1Hf Al/yM8dv9PiC96K1K9ILE+EnFoq1pPLdCdMPJ5ViaNB3Mj6snPUuGVNy9S5k+N3s23 fXQV41x+4KPybN41jAX8QeyINETviRwqzDh/a7AmBbSdwkzfcCGdWzU3YY2DXEoFIE GQy0arEo1DlOaxaCB0cpZEA49KdgxyfCYJDplTYzV03eeXzgBi8/K7BqJeOpXILIpn zVeorPGixB9ZTBBb5s0wB/kKKhQXaXfmXXhGbfNO8kJNV+4XGuyfuDLSVgy+/4lQtc rTRVxnLPN+g4g== 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 uMOS7E8uQ4Pl; Sun, 7 Jan 2024 16:13:25 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 9574560171; Sun, 7 Jan 2024 16:13:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640405; bh=oa+XGhT/ayVSmnqOJ4svklRVu6puchkWx2tSViCPAS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=edSH/fKF0D8WIDroa8qVX5azrRTOjjWl1kBs7rt2G6X+pKfVHIQ7w7zGBEJijsIVD wHw0QCqxUmGkNlCAw5khVasse7f3s89/4IIfmAU08fK/LMfAe0bBaxlf/FJWQYa3dq hOI3J+I/lW4syt2cs4f/xKMwnPsCkUp5Myfto3iu4gp5OPfZ/L1+M8Rngtp9YDsQcR OgtgFzkkJbtf/xOk+KouvMyl1GHy9VmLgXdlZoPurzrGi2F4M/pF0WBwfzGLFzk41s TDAui9Bjh/tP9QTojInacxl/mjowI5bROC81EtBeBZS9wSD2ri+fXEb3N3JSwQ0dqh TJRyIYPbCHjpw== 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 v1 1/4] kselftest: alsa: fix the number of parameters to ksft_exit_fail_msg() Date: Sun, 7 Jan 2024 16:12:16 +0100 Message-Id: <20240107151218.933806-2-mirsad.todorovac@alu.unizg.hr> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240107151218.933806-1-mirsad.todorovac@alu.unizg.hr> References: <20240107151218.933806-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 Fix the number of arguments to error reporting function in the test program as reported in the 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 to mimic 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 --- 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 15:12:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512922 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 DDEF313AD2; Sun, 7 Jan 2024 15:13:43 +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="f0cwrRRu"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="ZDvf/uO9" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id 6506B6017E; Sun, 7 Jan 2024 16:13:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640422; bh=tV5d4KMryDA2jbxoJ8ukdvDSFSPVJmRQYS2/DbGCtsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0cwrRRuK2wXA6OfJaJc7dYOMFFU6DB5DsDKlnOShlBrqwlnKGkGYf4kg/PmHxc7Z kbsY8Q7iWkrVyyO+azHanJk87KsEp53YiUjmSQxAVJH4qyzbE7etBBLPUKBF6h3FNv 7Y3gQAWXL7DVUKv9nrUYQ6LZpc4vPhi7jaAxOMVgVtbDVcTEI8qgHaS2i+3hBs7YKa +kYv1rw6AldYOBkb4c72VagJSZpdKKKizJssfSM/YaKc+RdsALhXJ63he40k1RrN/X NF7ApBut5FcMs3fx8/Qhv2N2uA6hWVkmVrtzHX3OVvWhKaM8yFIIuhxvLYfE1u6b1R YB3tRVP0laDoA== 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 9HvpUSw8gkaQ; Sun, 7 Jan 2024 16:13:40 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id EAD9560171; Sun, 7 Jan 2024 16:13:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640420; bh=tV5d4KMryDA2jbxoJ8ukdvDSFSPVJmRQYS2/DbGCtsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZDvf/uO9vYfwm5JGMaF2/dGCtCSeDY/kdVhrKSDj4ZepIY2ONCMmpTg+LqKNEUjpH R54yDpz0OzVHN7A7+oFXk0IR9yhUBtV020o2dqkzMeU9A+kFqhqCelVeWxGg1DDTcn M/gm6SzWhc1E0FX7o7drTE4j292G2BQyAIKipGdrnR6UjjDaK3kTqpDcqo7C61GuzE ewUI0D0VP312veICLXbnUAU/NlQCNKNuQodVvXVTM7L/+sgy0n1pYhDkebriRa8N9H 9akLxUg/zptD93ShWT8x0if4WEKSTrDQ3eIQbgeJo1KOmovE26PJwM0MDBQa/9EjQ4 Q5kAXnQ5Vg3Pw== 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 v1 2/4] kselftest: alsa: Fix the printf format specifier in call to ksft_print_msg() Date: Sun, 7 Jan 2024 16:12:18 +0100 Message-Id: <20240107151218.933806-3-mirsad.todorovac@alu.unizg.hr> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240107151218.933806-1-mirsad.todorovac@alu.unizg.hr> References: <20240107151218.933806-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 --- 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 15:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512923 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 8B42413AC3; Sun, 7 Jan 2024 15:13: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="K3lWZT7r"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="meAJJHVy" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id DEFE66017E; Sun, 7 Jan 2024 16:13:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640432; bh=UQMDbuI7hDMHLOqvTe8W5mN0lKSzuLSjkDfcH/BL+qU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K3lWZT7rZ6eExSqrlRb5/4PAZEvJ247D6e+xfyE0PxOrhpbTxH6oIhWbl1ttTX0ju MoHcbTVcFsY5DBRpHX0uxbOwi8IP3Hw4yscS7qJjqvpGlJk+O9abvYc3X/HJWkjzjm KrSzZ1X2sMjvi3FJ22yCZldnDWFybzHI+Db2wYLRCkTw89Uc/gk1U89G0Y9JxJg0wU QRAfZQ7a3l2NP/0IWuWqt3DbU4WtWBPtwe1nPnsw6ODpPbTh02xElHSbMfx5VjtiXE CoPbglB82xk/Sn3mQBoAIK0i2s/VeOpKnJmVutL0V/yYI0jL4wwmoZb4qq3FfpBa2w sCKiZbt8lJX1Q== 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 dMbbvhzBhNU3; Sun, 7 Jan 2024 16:13:50 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 602D260171; Sun, 7 Jan 2024 16:13:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704640430; bh=UQMDbuI7hDMHLOqvTe8W5mN0lKSzuLSjkDfcH/BL+qU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=meAJJHVyehXP/Ai4sQQqf/VyhWjBz5BIXpTzSZSF3fWKo/kNZr0+DnJl2e8j/IGTX i0im6A6Ei0kJEo5mjJX/+NPEQpngRDA+pPEOWk4UeVGZ+DAbnZFtU6ldSr3uhqNb4m h8sGZoV7P46MrBZmyRIAIC5OKg6r10dFo9JUU6E9pHtK7gdJ0p1sJoyJ6kV5Aa9z10 1/UGt9v6OESKZ0Q3ysFHApeR/xKCP6XQGOm8uH0DgvZLNqXQVEJZl0P4sOxRPcY8XK eoK1jhk0zqd+v47UOPpkgn2VpcWgpHwzSX05fLISGJ8rucweNPzW6SvjVO9fxIR0nP UqMjgRPwA9yFA== 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 v1 3/4] ksellftest: alsa: Fix the printf format specifier to unsigned int Date: Sun, 7 Jan 2024 16:12:20 +0100 Message-Id: <20240107151218.933806-4-mirsad.todorovac@alu.unizg.hr> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240107151218.933806-1-mirsad.todorovac@alu.unizg.hr> References: <20240107151218.933806-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 --- 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..e3708cc52db7 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 %d\n", ctl->name, index, int_val, snd_ctl_elem_info_get_items(ctl->info)); return false; From patchwork Sun Jan 7 16:07:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mirsad Todorovac X-Patchwork-Id: 13512926 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 7118A13AD5; Sun, 7 Jan 2024 16:13:25 +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="Shbq+oJk"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="inMs222D" Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id B30526017E; Sun, 7 Jan 2024 17:13:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704644003; bh=Sqyazqf+I3sxa6oIV+CQ1c1xogqVDFsZgo/HDXl6h4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Shbq+oJkdaYUMvteotVpTwXoPWBX2425VrlSyVaXaPgd9BsPuyfMBcbuzGbsQPA7p +neXvvTTtcZgF3N1V8zS0E0IEzclj8cWRwhgGwbNpBFrurnMhAmBMGkgN23gtq2iHJ W5/JykWzH71tMr3vqiLc2g1jWefONlnnoBQQTukXIR2gqmWM17HlVbz2Tmzzw4GPHw dHn3P6/BRwN25FiKq6IS+bHd1kaKN8kyA2PP2/Qnl9JY3O+gLTwJMxK7SREbVacFRa n9YBGZM3GLnQZ2/A0AIHHqcl6+VW+1NR0t+4paiQ3/6wDz7SWwvUZdaQTAyAgxYC7E fsevD64XuOPDw== 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 paAB-XWW8jKS; Sun, 7 Jan 2024 17:13:21 +0100 (CET) Received: from defiant.. (unknown [95.168.121.73]) by domac.alu.hr (Postfix) with ESMTPSA id 15F2A60171; Sun, 7 Jan 2024 17:13:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1704644001; bh=Sqyazqf+I3sxa6oIV+CQ1c1xogqVDFsZgo/HDXl6h4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=inMs222DImzyXeTwjDLg1WKq+EdlfWqipP5C3iQDhW9vmioZ9aonARAmYUnc9tB3b l6L6DzDmTlKqjmTJoyvzoDNNGo1vqSRuL9UcZ6qUN3npw4MAkKiKFgb42oMf1L9Q4l HzP4tBL2arZMG7ThOM8uDUsTVdiYubx4PRFtTlvY/yeP69bExH7MEjz02tEugHXzf8 +w48AkBrZx2qszw+bFCCCc46tnVdcRPJW6I3yMAJNwq4/TdNf3K7HlT1ziCaP2s7w8 Qm2XRiJU8/Vy/xLbIFSJexX03sO28x7VzBn+evRR9M3cf4KqhmWQFWFjnUyxyxgixp DHWZD3s6ljz8w== From: Mirsad Todorovac To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Mark Brown , Shuah Khan , Mirsad Todorovac Subject: [PATCH v1 4/4] selftests: alsa: Fix the exit error message parameter in sysfs_get() Date: Sun, 7 Jan 2024 17:07:48 +0100 Message-Id: <20240107160747.934470-1-mirsad.todorovac@alu.unizg.hr> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240107151218.933806-1-mirsad.todorovac@alu.unizg.hr> References: 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 --- 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';