Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1237092rdb; Sun, 7 Jan 2024 09:41:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0FiDH90agwFNfcekIaHOILQGKFUGFXSliuZhAGt/vBuN9BEq+TJ3aOxruXvjTvh+79ade X-Received: by 2002:a17:903:453:b0:1d3:f344:6b01 with SMTP id iw19-20020a170903045300b001d3f3446b01mr2624387plb.3.1704649277265; Sun, 07 Jan 2024 09:41:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704649277; cv=none; d=google.com; s=arc-20160816; b=TOmZ0RoTojgiUvzMmj2YTX0MEhHr6kbWHGnoyAfRs4viW0HP4rxBPerTtY8V1GglBW ZV3T97jzwLevxObckiZIi1jvfY/OM524rzUXABURt83N2ZHZsh79MmxLMIfTiiBJzNx/ YeAn+WsHcnnY0q4Ae91AQDQy2JjBwLTJI7YTe5MOI6nEONkwpFeAzSvK8TsDhq+YQbnv kFFMtoFyWsU34zw3QBBVE54eUr4lblQWfZhfOqEgFJ01yLIXpyCqFr0bceIF0VI75rjV Gd7P2OTaX7AbwsQ4lJhP6f7+BR/tUHwFlCELlxDPmGmuIDPNJXxyY9sgmS7XwlLel/Yi lSPA== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18934-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 sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p4-20020a170902e74400b001d49a084969si4868687plf.372.2024.01.07.09.41.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:41:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18934-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 141EDB21604 for ; Sun, 7 Jan 2024 17:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A7B313FE3; Sun, 7 Jan 2024 17:41:02 +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 To: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , 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-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 --- 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'; -- 2.40.1