From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) (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 E910B57894 for ; Tue, 27 Feb 2024 23:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709076302; cv=none; b=Ho9hEIca/7W/8n6+OCuBLSpZa5OHRNAaUYaRa87XhPlzJA7bFBMeQ2FDdGwVRPVXYUhV0QTtem1c6uF1ttyBHV4zorJFTyo9J0CdG3+HvaDQLP6hqvyi9SEf32/S3rMfVVHnDp9mPM7Q6b/OHvVnLW9JyzZno+2I+ajmDnfM9lE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709076302; c=relaxed/simple; bh=HDwa7fbuH1aZDEzp5Ac6iY2RB5pkOpyq5qK/4yKHkbI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fg8HufLgdRR4/4iB4kFKhhWDzxs4BEXq7A8Nz33jNTbP1fxImLPdjbca7IHoik7MTOLHIvtgK/56vET45+D2EuXij5sICp5vtr++jvr/zPQ2Nq4878d5evXqz00g5zd/li/ULuYdTmf0M+8RvLBLRgp5qw+DRCRf+42td7F0ljY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Kh+uxOPi; arc=none smtp.client-ip=209.85.166.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Kh+uxOPi" Received: by mail-il1-f177.google.com with SMTP id e9e14a558f8ab-365b413549eso910215ab.1 for ; Tue, 27 Feb 2024 15:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1709076300; x=1709681100; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wvIY3k15tE0HcJm4Yzmaclwism7ZYGDgLaZ5F1IOoes=; b=Kh+uxOPig0hkA0IOU0u2kAKdbxe+m8QAosuBOGvLzIsQn66kAy+K4i+PRVs4JPHw07 fgQYU/A+NjtIeojqksBpXmIleVIbSvCV54M2CqvbAmyFFgKbMb3PcWAj4K9RBebBC8Z5 5ZuUTk0HfNBmPXJnxXd1gAHVfrn+MDDQ/ZAK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709076300; x=1709681100; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wvIY3k15tE0HcJm4Yzmaclwism7ZYGDgLaZ5F1IOoes=; b=c7lFd+vbb5Hzynmw9LxbCvEI79kllqME0pdCwp/D5WhN2fH9Yx11ugw0mbSWrSs/r/ Kx2lDw9i1OMAg++r/M5XzPftlQ/URRmqF98pPJFDPWopXQXmudnSvyCNj8KErJUiD0Ai VZC1PmBLGA1TiVBvKb4cX5bkKBB/t4eY7A7vwIbT77SD12YEf18ovkjw1uLtGoV245JC oaD69ZU2DfNBt/r59k01eZjo0QaNU95puYUNmc3QYiO0+yoZhWlzPRssDPPS0Ms6flCM KzoXs7Q/5/uJDiOrM1hkAWA7RgqdJk1PpDt6xDfmZdnbkfx/6Y1s56s5TvG5yFXwIz/q 2oxg== X-Forwarded-Encrypted: i=1; AJvYcCXRJeOl6HEhCe6TXGK/ENOLFFkqbNxZo3C+sUOhdIxALnRgxUD4G07G1l6MuFSj/3NtE8l4SS4MiCCOhG4uH+XF8CEtLePx X-Gm-Message-State: AOJu0Yw255jOFEQQEgG3ZB1YXMdW54omAKM2BdZsM5grprjg6dWcMp39 +bhSFEMOmfSO1xx0qWyJWVUwruqPblge6fOgHlL+oVmHBCTreOs1V7QRRlJIb0w= X-Google-Smtp-Source: AGHT+IH7h7vSS9kJq/Hsu1hvzmsVL1Hoh2ZLb1ktpG8OlizpzOEJEClNfjMsljDl+J9cw2Cp6ZyxBA== X-Received: by 2002:a05:6602:38d:b0:7c7:8933:2fec with SMTP id f13-20020a056602038d00b007c789332fecmr10945119iov.2.1709076300126; Tue, 27 Feb 2024 15:25:00 -0800 (PST) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id q10-20020a02cf0a000000b004743021012asm1964451jar.2.2024.02.27.15.24.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Feb 2024 15:24:59 -0800 (PST) Message-ID: Date: Tue, 27 Feb 2024 16:24:58 -0700 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests Content-Language: en-US To: David Gow Cc: Linus Torvalds , Guenter Roeck , Rae Moar , Matthew Auld , Arunpravin Paneer Selvam , =?UTF-8?Q?Christian_K=C3=B6nig?= , Kees Cook , =?UTF-8?Q?Ma=C3=ADra_Canal?= , Rodrigo Vivi , Matthew Brost , Willem de Bruijn , Florian Westphal , Cassio Neri , Javier Martinez Canillas , Arthur Grillo , 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, Shuah Khan , Justin Stitt References: <20240221092728.1281499-1-davidgow@google.com> <20240221092728.1281499-8-davidgow@google.com> <20240221212952.bqw4rdz2i2yf3now@google.com> From: Shuah Khan In-Reply-To: <20240221212952.bqw4rdz2i2yf3now@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/21/24 14:29, Justin Stitt wrote: > Hi, > > On Wed, Feb 21, 2024 at 05:27:20PM +0800, David Gow wrote: >> The drm_buddy_test's alloc_contiguous test used a u64 for the page size, >> which was then updated to be an 'unsigned long' to avoid 64-bit >> multiplication division helpers. >> >> However, the variable is logged by some KUNIT_ASSERT_EQ_MSG() using the >> '%d' or '%llu' format specifiers, the former of which is always wrong, >> and the latter is no longer correct now that ps is no longer a u64. Fix >> these to all use '%lu'. >> >> Also, drm_mm_test calls KUNIT_FAIL() with an empty string as the >> message. gcc warns if a printf format string is empty (apparently), so > > clang does too; under -Wformat-zero-length > >> give these some more detailed error messages, which should be more >> useful anyway. >> >> Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") >> Fixes: fca7526b7d89 ("drm/tests/drm_buddy: fix build failure on 32-bit targets") >> Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit") >> Signed-off-by: David Gow > > Reviewed-by: Justin Stitt David, Please send this on top of Linux 6.9-rc6 - this one doesn't apply as is due to conflict between this one and fca7526b7d89 I think if we can fix this here - we won't problems during pull request merge. thanks, -- Shuah