Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1205563rdb; Sun, 7 Jan 2024 08:13:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEI6cHCPSlYYQ1f5DffbXszDfknES3JF3gpzB2y81ZydUI5y5vGuQ/Ou2WSz3m8EIyS5AH+ X-Received: by 2002:a05:6214:d04:b0:67f:3a1f:3d68 with SMTP id 4-20020a0562140d0400b0067f3a1f3d68mr2575836qvh.56.1704644022757; Sun, 07 Jan 2024 08:13:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704644022; cv=none; d=google.com; s=arc-20160816; b=ITUvwu6R6teuw2dtEvZMfumX2tRwG2y50zdNHi7xnq/9mp6OjXdIx3KiagiolgAmuY cCYc2e5nT0Lpstuj0gO6Bg4eb6z3D6tc62oIxQmfJ66PDZr0fvvBJfnG4FRnYP8rxVJQ 3AllKhX0rKnj3X/uYlMwnem9OZl6QOBxCHp/0wZR3VruyfeiQt4ANQr14hLEIeCyYaKT adZnfJVYioPw5HKUhUVjAyNzZMWoojrLrowpxcRfQDrHH2pcl6cmVJ0wxjjgsgONlsu9 1V42m/cw/yqCg1ZyZzOMv1MV+lEPHB1Y/0kDqNIEgzBsupmemNMUwJF6Dkb5//uxaew6 CO2A== 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=DNWha2C2B9XfuvVpu69FPsC1QmpulpZ4Dr24C0JoXMA=; fh=jivpROuCxMIk6EggKWsYT97/+IuWq7pFtCrwWzmom9o=; b=cpjhnMXFib5ZKFyTtcPm7F/QP734f7K2kaChczhOv+bvVQ4hy4xZt4dOBzochaPsrr 2bSr0IpbeVk2fdaRs8OTVdPjdN/HuXvUvazWpA5YX+tURBhiJv1dEBTuYrFkw98cCu8r XaJW9wB1Wnn1YawafGpLlPK+mRwJEeZUr0Ojc2Sf70xxTogNklxZnzmuKArO7T1O79ku 5840SE5gCQ0DXFxgYP/4ZJGoi1AiSdUch6axUJwUJ2p4a3Aox6dnKNyzsHJmg0rDJunk RxXthBWjqDK5IrDbAWSaI3kG9B9dTwoIFWXwUQOzwe68S1xgXDTM8alWOykTRFFsXULl PycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=Shbq+oJk; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=inMs222D; spf=pass (google.com: domain of linux-kernel+bounces-18908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b20-20020a0ccd14000000b0067f19454ea4si6242962qvm.159.2024.01.07.08.13.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 08:13:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=Shbq+oJk; dkim=pass header.i=@alu.unizg.hr header.s=mail header.b=inMs222D; spf=pass (google.com: domain of linux-kernel+bounces-18908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18908-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 823E21C20643 for ; Sun, 7 Jan 2024 16:13:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1909B13AE0; Sun, 7 Jan 2024 16:13:32 +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="Shbq+oJk"; dkim=pass (2048-bit key) header.d=alu.unizg.hr header.i=@alu.unizg.hr header.b="inMs222D" 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 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 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?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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'; -- 2.40.1