From patchwork Mon Sep 4 12:44:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Wieczor-Retman X-Patchwork-Id: 13373839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B026AC71153 for ; Mon, 4 Sep 2023 12:45:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 144618D0003; Mon, 4 Sep 2023 08:45:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CD6E8D0001; Mon, 4 Sep 2023 08:45:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAFD28D0003; Mon, 4 Sep 2023 08:45:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D7FA58D0001 for ; Mon, 4 Sep 2023 08:45:29 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 97C8EC0684 for ; Mon, 4 Sep 2023 12:45:29 +0000 (UTC) X-FDA: 81198885978.10.6E1A3FB Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by imf30.hostedemail.com (Postfix) with ESMTP id 957108000E for ; Mon, 4 Sep 2023 12:45:27 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=VmIPrsvo; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf30.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693831527; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/Wnf/nlWmcfPbwSWs/TxkEtKdFvMrwenvcdZZAO68Ns=; b=NFvtxWdRypz2LkADgXE6Xp8iGsnho842uQjw9Ra4D7QcFf+bYbYPIKY2UnCRwmRLBSuXSX pxYZrw0Hhuz+DJfVY7yV7FqYxAZ2270eX6NgE6DplP2wsgUA5DWgLTWrGF/B71MxlyJaJD mOjOWHrLlMvN/KG5XupltKIy84XwpQI= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=VmIPrsvo; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf30.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693831527; a=rsa-sha256; cv=none; b=V2SMBavt1MJmq91QPAvDvENrhICsZPHCPcCIaz8aAR4aQ9pbJnSAwNNHeBNtFw9PFEVCmZ mMXqWREu/1JGB/aqH3MhVtzUCVRQ1WKm2sVP9aCUtWEljitE+QYui6+B68nJn3vnuWJFA0 33MVx/GrOt1MY7AbjWlx9FbsOiYn0p4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693831527; x=1725367527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tVZ45VVk9jiOwslIlVhrQyeA3gThQGKo4Ac1RQA0Wo4=; b=VmIPrsvo4TxWQnmZgGyxtuuFgSQ4q7xTa1cWRcbajOMeRVQ1BJDMuOhR C2MXRSCqxNPnWeLV39hRDxtrCHBBo9Zf3st1nVsOLYpyeXeEdGrBp6YFS K/59h1+I9SqkVD8PYuKfCxE/y2nIYJ8bzc+x6c7sHwaD+1ATYyy3xkSPb Mz0YboKKhUdGIi0lKO0tHEPgPlUZ40RT+m71EcbIOIDHyfZIUumI4f3p9 SGMoKRDPYwfaVz+UnfoRI9pROKayz9rDXmbeq7uSlyZJC9V7+97jJNrI4 jfUZEOJ83s4Y8yapAjmsukk69UK/YEstNxKl/jAQoygwbk7JzrYz4rYct Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="440555389" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="440555389" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 05:45:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="914497771" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="914497771" Received: from mfederki-mobl1.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.15.69]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 05:45:23 -0700 From: Wieczor-Retman Maciej To: Nhat Pham , Johannes Weiner , Shuah Khan Cc: ilpo.jarvinen@linux.intel.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/8] selftests/cachestat: Fix print_cachestat format Date: Mon, 4 Sep 2023 14:44:25 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 957108000E X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: dn8mbqp78gahh49fg7jmim3sftbea7hg X-HE-Tag: 1693831527-83355 X-HE-Meta: U2FsdGVkX1/btbz0mULwtODsyp/BRnKYcQCYmMSha8G4tkgy5C0uONJu5TTi3dcgS8ivbcft9pbvfMKXuzaUx++yCH0IpH8qovezON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rtnZcVSOa5TO4j20WA1y0Soiak3Df+ezHD X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The format specifier in printf() call expects long int variables and received long long int. Change format specifiers to long long int so they match passed variables. Acked-by: Nhat Pham Signed-off-by: Wieczor-Retman Maciej --- Changelog v2: - Added Acked-by tag (Nhat) tools/testing/selftests/cachestat/test_cachestat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c index a5a4ac8dcb76..7f3871eef409 100644 --- a/tools/testing/selftests/cachestat/test_cachestat.c +++ b/tools/testing/selftests/cachestat/test_cachestat.c @@ -23,7 +23,7 @@ static const char * const dev_files[] = { void print_cachestat(struct cachestat *cs) { ksft_print_msg( - "Using cachestat: Cached: %lu, Dirty: %lu, Writeback: %lu, Evicted: %lu, Recently Evicted: %lu\n", + "Using cachestat: Cached: %llu, Dirty: %llu, Writeback: %llu, Evicted: %llu, Recently Evicted: %llu\n", cs->nr_cache, cs->nr_dirty, cs->nr_writeback, cs->nr_evicted, cs->nr_recently_evicted); } From patchwork Mon Sep 4 12:44:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Wieczor-Retman X-Patchwork-Id: 13373840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8CCFC83F2C for ; Mon, 4 Sep 2023 12:45:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3184A8E0001; Mon, 4 Sep 2023 08:45:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A1D58D0001; Mon, 4 Sep 2023 08:45:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1428F8E0001; Mon, 4 Sep 2023 08:45:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 01EEB8D0001 for ; Mon, 4 Sep 2023 08:45:41 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C7513120699 for ; Mon, 4 Sep 2023 12:45:40 +0000 (UTC) X-FDA: 81198886440.28.A25DF3B Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by imf26.hostedemail.com (Postfix) with ESMTP id ADB20140006 for ; Mon, 4 Sep 2023 12:45:38 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="WuT8TSy/"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf26.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693831538; a=rsa-sha256; cv=none; b=f0Qmm/ddgOyP9l2OGmZR/3KC+RVC/QCYR5DaP3QfAhJ3z1irVgARjQGSvFpFFqHtQsud/V mD2JettU/J1MzUNTGPc3KWZDtXl2CLFXlgEvpOQsmX6OB2YFOcn7kyGEHRTl8rr0FHAoB5 VGsP/XkgONTnz9DMFy7NoeyvHYgWBVY= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="WuT8TSy/"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf26.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693831538; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=luHb8/JDvvSdp7+UPFJWTB30ZxZtIthKoWmoAwhRi4g=; b=uVjatRcCzioLPEWHdAdCYUmqRsbxrqmIM3lrZXBlT1f/DWNGvcLayYIJOgwP+fgB69gusy OGYsKNbYlwYmpEKXhvBrLlCGalQf2cVKzCVGA9HQUj8zssoXhQ+8cXEqcz+Ok//85nNj9v UJ2F+IFDzIQPsQwAmVBayO3Fyfb5amI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693831538; x=1725367538; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HI4lVmI1BviZYccM5IrIZHGszBCHZkniFynHIcYP17g=; b=WuT8TSy/FwsliFwHPxzoJ8NyAZsbIIlRbfneZJgcYyzeGgToHC0B/8xi oJ69pJKc/e5cdA06P4BLkY6Mn+HFQc5WRozcdTuYVn+rMq1Y5IuW8V5n8 AkONGL0FXP/kKzx/eIzkkJqpYam0Xvi9SGj1hDnVn7PI1q+ICaIwk91P2 hGOQm1uY3PXHnfX7Q4QUjn/nUtX6TNzXX4Ko0xSD7kXi0+nKLexjuezkM g47tDElVSVT1YH3a/R/3mKi7F8+KqsBIKYNRT0f3NoBDksvpTWyja0QS5 mpgXBDP2ODp3HPwpXwm0t9qayakDUhB/e1WbymPnpbAuJABblpYMILtHG w==; X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="440555433" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="440555433" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 05:45:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="914497849" X-IronPort-AV: E=Sophos;i="6.02,226,1688454000"; d="scan'208";a="914497849" Received: from mfederki-mobl1.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.15.69]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2023 05:45:35 -0700 From: Wieczor-Retman Maciej To: Andrew Morton , Shuah Khan Cc: ilpo.jarvinen@linux.intel.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/8] selftests/mm: Substitute attribute with a macro Date: Mon, 4 Sep 2023 14:44:30 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: ADB20140006 X-Stat-Signature: 71wnw1jkzzohhhswtgjjmrh9zf7r758w X-HE-Tag: 1693831538-438314 X-HE-Meta: U2FsdGVkX18DUHlzfAwI8n1s7vkLrUjOZVAD+YKkZnwGJYTUfdGMqQd0ZtuqKPmdY9iMw5nRnOewo5jPWhHfN4OoW7faNTQlHPLD1fOjDWqYImJi407gXX3CvKep2Eciz9ZQ8CsFhUmoQXxBAqNVeIF02svOp1xh/UlAXsR1YeWmRHw9o5XrVLdZCkKNmJWHR4YolVSwJ5nX2Il2DntlZJisyPz7+3jdYhSMFUGDG2csxUz4vm9drPjPSgAuQYKBnNg3pwCR+Su3znsO29qRDgmmSKdLD8e0NxlOYGs2Ru7U+RBzay5KGisW/ORzblnsU9PK3/ZU16u21FBiyODFW7QLi3eFxHYKEXEYl7RARD+UnL9usPeRgfk1QAnky0uch1qW92E++v4dgOvTRF2o2BR0321P2cuE3xbxWfVpp95QcR/+VGt4avjrcF7zVis9/wujjHkLaNRitc9vpv2oIJfO9aPu/60fXGHcF3EXHJjcGswBeUsTHE8HZy05XTn3UR0uqlXpzz0Po4TpH2PzGhz4tWM/FTz8QzZWM8rQsE9HcUGKBz3lHdF35H4ngvU5RmyrxbO4r0cGfQrunrWaCeQLKesWPv+GE4KX/SvOcmlTgFyeGyHX7rBBVEbv4FcQAvSRiuxHFUHtX9I6bZ3zsgWKXnchPjYJI0HYdUQbpBi8yLtPGp2OwFXfbm3Iik5e5TW0jkQqP5kUxuP0yryvK8/5HqD0k/i3KkR9XcnSzOPsqtkEBP+XAVjhpisHgLH4siE042HDVKVQ41KC63gIXITX91+MWuJBYNN0M9S8jkJRJKpZEE08mdeLL+eRa5HX6nLk8ONF20eIA2SqhnaEP4yHn2pnmFtbnXny6aJNyTtv+AmZ1hUc4m4deIlxy7JhVhz3xfQMAWB2/0agWR2rwzfmj0kHv3Ao6rRV8ebc7EfM30sBGvtRB9Mwsi2JOcpi8ukHhimvxZGOQgrpjue Cr4a6Vgk qFuhOexzxGf5GVWPU+Ii9LOVAAjccCzWM137x8TCIxYJA8IGwSe86+R1n3vnAqdB1Bv9/WUfatAdUW6oGN0smZZ3Euk3uxnDvxDDYTXzUmgpUwzJwDcn4ee6RuA32mXqUY9XODifYKKZo4wphntoUNHAbTA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The mm selftest uses the printf attribute in its full form. Since the header file that uses it also includes kselftests.h it can use the macro defined there. Use __printf() included with kselftests.h instead of the full attribute. Fix a wrong format specifier in ksft_print_msg(). Signed-off-by: Wieczor-Retman Maciej --- Changelog v2: - Added this patch to the series. tools/testing/selftests/mm/mremap_test.c | 2 +- tools/testing/selftests/mm/pkey-helpers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c index 5c3773de9f0f..1dbfcf6df255 100644 --- a/tools/testing/selftests/mm/mremap_test.c +++ b/tools/testing/selftests/mm/mremap_test.c @@ -338,7 +338,7 @@ static long long remap_region(struct config c, unsigned int threshold_mb, char c = (char) rand(); if (((char *) dest_addr)[i] != c) { - ksft_print_msg("Data after remap doesn't match at offset %d\n", + ksft_print_msg("Data after remap doesn't match at offset %llu\n", i); ksft_print_msg("Expected: %#x\t Got: %#x\n", c & 0xff, ((char *) dest_addr)[i] & 0xff); diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h index 92f3be3dd8e5..1af3156a9db8 100644 --- a/tools/testing/selftests/mm/pkey-helpers.h +++ b/tools/testing/selftests/mm/pkey-helpers.h @@ -34,7 +34,7 @@ extern int test_nr; extern int iteration_nr; #ifdef __GNUC__ -__attribute__((format(printf, 1, 2))) +__printf(1, 2) #endif static inline void sigsafe_printf(const char *format, ...) {