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+YKkZnwGJYTUfdGMqQd0ZtuqKPmdY9iMw5nRnOewo5jPWhHfN4OoW7faNTQlHPLD1fO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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, ...) {