Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp444791pxb; Thu, 9 Sep 2021 04:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOHHSCygHUmDh204ORUX7X2lOjbUQJFrcY68BxTfw+90O4+Gk1NAvR6ILTAAUVSnyI34gP X-Received: by 2002:a92:650c:: with SMTP id z12mr2095268ilb.87.1631187929161; Thu, 09 Sep 2021 04:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187929; cv=none; d=google.com; s=arc-20160816; b=lBZ9zywsQCIUaphLSa8ATWakiAYoUAxUBcQG2mV750stoI+V92srEcCDoB/19x5gY/ iaHFXMbm0MB7YTOPX9NwK6X/n0HJXIE2CqtwVJtanhrBamNtrKueoWRuXtPIF689M6Tb qO+ant2ddcoWpXIp0mLVZ2LVI1QMqvIQBm8QKLZ43zcMkdhIWAwRlerQO7vI5ULULuTm 0xaAx9RcBINy+EfRMJxNTVHqabP9qeKzpl43A9HcGJB6LE3Bs51Adkil2E7zYNpiPfDW Z0ljtMS1YbHbLpsw/L7GWgbM8v2FfhXWf3VB0qTLSUD08T7sudIfs89QePMkAnJB6UdY gXAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oUwtDWTJIkcIT1ymUzL7TfXTSErpoLC9nT7ig3f0eTw=; b=ZDzXB7gMho5XJMCXqHJtmEcPYBmxhWpEDw0yKp02wZN84OfOqH1sDSx6FCQNbbVjo0 fZEF+tiHzsjGVejqV84jvbsz5rxNBh7idKAM7OykQsjzhvsoNCJcwxn0eTGMmiYw5nMB La0fcmrfB+JGb4MSWibKmvwtw69mXuMEBuSjgFMqz0ft1MlbN3Lk9USSKZlCIL7ey8Q+ 4HsuPsd1x9SRQ/xFNqQKfXJ2rHXQfxDBpmD3Lk+zeNMSZ62eSNt38CPnbnX0YduDOZ8R HxXeUweJIZ8IrP4y1nOu1HbDPDuUBVznRp6VYGfwaWomYoL1ICU+l7jxDf3kyDnlH7DJ tHAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HgVgTtXu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si1369360jaa.74.2021.09.09.04.45.17; Thu, 09 Sep 2021 04:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HgVgTtXu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239362AbhIILpq (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:45698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238776AbhIILnr (ORCPT ); Thu, 9 Sep 2021 07:43:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 976596120A; Thu, 9 Sep 2021 11:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187731; bh=2K+jeZhi6NWGxwSm3736qe8/WFfuxqbpxEPeczVvA9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HgVgTtXujJrfVKhY1r/8i8A88QhNJ1yT6L1BdrUvXdAafVjQLzqnxfsCBkCRNAq12 ooizrwlHkzD918CHbdU5BMgICEjmmiss1kTbCU3lTOP9ytRuyeyLUb0UNW+Uu8Bfkw wHSrt6lsYfT0bgULwC+otYnicc2e5sGI9GbaC3jw3+V2V2EW7yAxknWNVp4pCz2HhZ EUvA59Ix50wJltHdTVb5XjmczKqVDGCRM9GcCdUtpBmujx27po/Ko4dWvFXrx5ejJX jWM2SNnjWs2ESz9f93TIZ5RSDpza6p2TtpDPIh9GwB2LvClFt+KpQnIszrG7dFhZmf ltVRFFYatewhw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shuah Khan , Greg Kroah-Hartman , Sasha Levin , linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 051/252] selftests: firmware: Fix ignored return val of asprintf() warn Date: Thu, 9 Sep 2021 07:37:45 -0400 Message-Id: <20210909114106.141462-51-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan [ Upstream commit fe968ca2cac91888310b143a483123c84906e3fc ] Fix the following ingonred return val of asprintf() warn during build: cc -Wall -O2 fw_namespace.c -o ../tools/testing/selftests/firmware/fw_namespace fw_namespace.c: In function ‘main’: fw_namespace.c:132:2: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 132 | asprintf(&fw_path, "/lib/firmware/%s", fw_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20210708031827.51293-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- tools/testing/selftests/firmware/fw_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/firmware/fw_namespace.c b/tools/testing/selftests/firmware/fw_namespace.c index 0e393cb5f42d..4c6f0cd83c5b 100644 --- a/tools/testing/selftests/firmware/fw_namespace.c +++ b/tools/testing/selftests/firmware/fw_namespace.c @@ -129,7 +129,8 @@ int main(int argc, char **argv) die("mounting tmpfs to /lib/firmware failed\n"); sys_path = argv[1]; - asprintf(&fw_path, "/lib/firmware/%s", fw_name); + if (asprintf(&fw_path, "/lib/firmware/%s", fw_name) < 0) + die("error: failed to build full fw_path\n"); setup_fw(fw_path); -- 2.30.2