From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 F131F45BEB for ; Wed, 21 Feb 2024 09:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507719; cv=none; b=W+UI2pfwSZDRY/sBYIHPejgDUrk4S3RaPgqDKubvONTwoZBh1HBwS8XnafawueBsnmB7TgPivVJKO0xJlu+3QQoTC6O+yBTadnl+Zb8p8BHG9uO+G6xXf5Lzpf3Fzk0RexXRr7BTMdug/aTRsbUiWuEttl6Mbtud9pLXCJDr65o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507719; c=relaxed/simple; bh=w3euWTwzMuy4B32i9R1sF8QJYNBjDCrCALXsWQpTZrQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=n//gDWWzk58af9EgpIJ1D9+gpApNhyxqfQqmXeEVHXDoNQ1NLuJ8PMeDMnxGlKEbxyEToOFH86OZZ3PyCxX1Ye3sxi+/9Bd0Ttnf8w9q6IE8GumHbAmUI3EX4Pjyw1jOUis5H4i0L1p911cNThRSqJc60VJ5DWIHIOJc5T5eLAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--davidgow.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vOwtwY9T; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--davidgow.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vOwtwY9T" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6082ad43ca1so50808247b3.2 for ; Wed, 21 Feb 2024 01:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708507717; x=1709112517; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=nYdfpz73mSSQOJip1+ZL+ticY/JfIGD+cYhY46XA/58=; b=vOwtwY9THzRu8jN1BfHjuDKN1Vos5s0uKgwfs1S+tsZ60qBH0oisg9p8CN7UdykxeL KUhm1pdTTFtoi7qIZYc47tRWnqpRvjwi/E3KJsCmYj/nNP1FIrSY4oG7Y2RS2euAEVfG 7VG3jClqxR6tJqf1OgD0dTyha7OE7mruVDuz7e1I/Bea6Af8pswjP8eOX1mxTmq7o3sX TWgYO6DxjEyxhn1lNwWlCOdQ4bwwgADv9KgQlDHuWO0C4TJZGNfSnLTu03K5KYGWvUlm NMuwIyxGA19Z1PJ8a/WYeRuWV0yePTA9Wuy+jwMWFFsI+dGLsiInpDlNdvM8e4kEqryo 3yXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708507717; x=1709112517; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nYdfpz73mSSQOJip1+ZL+ticY/JfIGD+cYhY46XA/58=; b=ERlNLS41+UCRQmmfT8CYfrqWyNsBxN4w9RyDJ5Smx3fjm89NDf89OtABXNKWvW0MQ5 YGa1L75+U8/ULjqVu+JPAqQhaZf/hCHyFlUdcMNpjjTul+wsz0SLnK6drz5H+mq1NnwO bcPUxGtCEcHSZzc+GDo/j7JX8B6qbwz+ozK5/lOTMRUdZKnu8gvB2dJvBs67AyjvlduN n45/Z/13cR+mGRnoEoYlnfe4ZcM8ZFehhN3Ja3frAMi8QGdWMmzJPG7kcCqnA7TEjZtn 4c0xTHG1iQSn6Tbcej+B2T/11rYj3TY1YNPfWlzBp6juTyhUyq6e6g0NI8Is2gVqouod xihQ== X-Forwarded-Encrypted: i=1; AJvYcCVL2IZdaI7da9iz+vQyL9pNnTRmsQ6ZACKtRTEf3IIAXVFjtbYH91hAbIOwg6T8Fcz9wZK4180cwT8mZO+Y0upRiZC5VB5dAAkRtluZ X-Gm-Message-State: AOJu0YxlRiNlcui28QyqCOi1k4ho57kYx0fTWKIKoH33NVeuwPzhlG3S MWQtFTT2tWUx8nyY+EJjZ0cVRiqW48knZzkZTsOZbHDj7EAlBtfgOC6dLOc+pgw5IZjJl8Gh4pK gllAQx6bz0Q== X-Google-Smtp-Source: AGHT+IFa/fu29ZmsVki9pPhB5PrTsNvq7jb5hiZUPefFb8PbN6D0cYOdutojAKCl/4VlBY7r3iK54hwJmjuHsQ== X-Received: from slicestar.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:20a1]) (user=davidgow job=sendgmr) by 2002:a0d:d685:0:b0:607:7564:a830 with SMTP id y127-20020a0dd685000000b006077564a830mr3019910ywd.0.1708507717035; Wed, 21 Feb 2024 01:28:37 -0800 (PST) Date: Wed, 21 Feb 2024 17:27:21 +0800 In-Reply-To: <20240221092728.1281499-1-davidgow@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240221092728.1281499-1-davidgow@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240221092728.1281499-9-davidgow@google.com> Subject: [PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test From: David Gow To: Linus Torvalds , Shuah Khan , Guenter Roeck , Rae Moar , Matthew Auld , Arunpravin Paneer Selvam , "=?UTF-8?q?Christian=20K=C3=B6nig?=" , Kees Cook , "=?UTF-8?q?Ma=C3=ADra=20Canal?=" , Rodrigo Vivi , Matthew Brost , Willem de Bruijn , Florian Westphal , Cassio Neri , Javier Martinez Canillas , Arthur Grillo Cc: David Gow , Brendan Higgins , Daniel Latypov , Stephen Boyd , David Airlie , Maxime Ripard , "David S . Miller" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org, linux-rtc@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-hardening@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" KUNIT_FAIL() is used to fail the xe_migrate test when an error occurs. However, there's a mismatch in the format specifier: '%li' is used to log 'err', which is an 'int'. Use '%i' instead of '%li', and for the case where we're printing an error pointer, just use '%pe', instead of extracting the error code manually with PTR_ERR(). (This also results in a nicer output when the error code is known.) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: David Gow --- drivers/gpu/drm/xe/tests/xe_migrate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c index a6523df0f1d3..c347e2c29f81 100644 --- a/drivers/gpu/drm/xe/tests/xe_migrate.c +++ b/drivers/gpu/drm/xe/tests/xe_migrate.c @@ -114,21 +114,21 @@ static void test_copy(struct xe_migrate *m, struct xe_bo *bo, region | XE_BO_NEEDS_CPU_ACCESS); if (IS_ERR(remote)) { - KUNIT_FAIL(test, "Failed to allocate remote bo for %s: %li\n", - str, PTR_ERR(remote)); + KUNIT_FAIL(test, "Failed to allocate remote bo for %s: %pe\n", + str, remote); return; } err = xe_bo_validate(remote, NULL, false); if (err) { - KUNIT_FAIL(test, "Failed to validate system bo for %s: %li\n", + KUNIT_FAIL(test, "Failed to validate system bo for %s: %i\n", str, err); goto out_unlock; } err = xe_bo_vmap(remote); if (err) { - KUNIT_FAIL(test, "Failed to vmap system bo for %s: %li\n", + KUNIT_FAIL(test, "Failed to vmap system bo for %s: %i\n", str, err); goto out_unlock; } -- 2.44.0.rc0.258.g7320e95886-goog