From patchwork Mon Oct 9 10:30:41 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: 149933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp1771987vqo; Mon, 9 Oct 2023 03:32:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMs35yEtZHrcNrOFMzXgnU3xp6FCM5b7kdTrv2+o1H6POfZeg+rOuswYqEv517uA8JcjqU X-Received: by 2002:a17:90a:b015:b0:26b:c5b:bb44 with SMTP id x21-20020a17090ab01500b0026b0c5bbb44mr13790934pjq.13.1696847554371; Mon, 09 Oct 2023 03:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696847554; cv=none; d=google.com; s=arc-20160816; b=p1llJfL5qvcM7uH0u2E2WvpUDPxO3Brw05RaBFz3D50kcOzGixdHS69JzNYRIWiwkC jiOh26jJL9Yu5fKdwB6iLvoNEZT+ixx6ENIUeCsRAP8e7lPVzr6AW2jlsCmo1XpoB0gr LLjQWyS16Ok8B8ai6Ng8uONhL3RZG8JdRlLaPBWQW5VHZh6PnaMAvKG2JnbO+h9v0cIv WLd94dc9lD7WJ+Lk0WEpck550OPqf6g3P08XD62hFPHb+HiNaslg/z0e/ZUed0XegiiK TDOyzw2A9bsofX1z3dERflchcJWS3/ghDOVXi00zEKQK+KLgDQb2++UiUuUnIt2qLnAm +qiw== 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=zFe3KiM0PZDHJfATYmq0bnBkJ6C6pbYUoYQm41KQ3fA=; fh=kGnTVGINCMm7xrDmqwX/qRTdf7Wq5odxYgzr5C4cFAk=; b=ut87qzqt2r6K3FbnZKLHv2RGxExDjgaN4LP1d3H/xL5jmH9TT6hvckld38Di8Rym8F vyo4ykxT+8QfjnR6So3yPOq8QqiKVg8tGSAxVpLpLWBBkV/rCgCVUOuuNPcJy2/iUNgn W+CZgCOvFbwrMtiXvMEDvQ1IktcmUJa26x+G5/SKLAEsWUokevmdkZtKmgtg+3CpAMEc Sgf8eJbOR4lSAJCnGiM0jxVkNrJxxKpFM9loC+P0QAWokWaJR8yYPevPQfon3dm23sh5 WnN5jF/YGJkZRgL8ZOQH6bQ+vpzptli0OjSPWP2gzhTPBpDpmLuJnuPuG8mDesOJoO04 SLsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mD9m564D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id x3-20020a17090ab00300b0027b0acd55d2si11260781pjq.101.2023.10.09.03.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 03:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mD9m564D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4D4F080D7718; Mon, 9 Oct 2023 03:32:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345890AbjJIKcE (ORCPT + 18 others); Mon, 9 Oct 2023 06:32:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345888AbjJIKbu (ORCPT ); Mon, 9 Oct 2023 06:31:50 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C5409C; Mon, 9 Oct 2023 03:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696847505; x=1728383505; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VXxoZYWc1k9TebbKU7+nIiD46KUiapqhrZ8TkPNyZG4=; b=mD9m564DnVBZmiC/YkQt1k7PfqExGiimQHYnx6QveiIyRLq+4KaqXL3d H0KblwdqDmj7AxfnkuZRE8Uk2GGAGsmAAu7hq90MWEuuFztm5E+x6ZMMM eyRXbkTuHc2E58RQhmY0qQTn8BvHRLKqy86PzBr1jhoMuY9JiFXljxDsg zmMvR8bgyepm7/Wxku6RFiLedgHDT24Zg/wyQRJSwQIDGkiPtdElMFnY9 nlPz62RQL27i5iz5HHyuF6s1I5fFvzmgMyAXV1aTt/BEUSSMwbaZPlp+a nTKbN04ryDKvQWHnpiBwOFVYwaseNoytCSSqfNeFArU/EHP5f+K1ySPXk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10857"; a="363468470" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="363468470" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 03:31:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10857"; a="926718745" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="926718745" Received: from kkensic-mobl1.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.30.239]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 03:31:41 -0700 From: Maciej Wieczor-Retman 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 v4 7/8] selftests/mm: Substitute attribute with a macro Date: Mon, 9 Oct 2023 12:30:41 +0200 Message-ID: <288075f2e0d9c34e5789165f688b2fbbc212b56c.1696846568.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 03:32:32 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779273620949894606 X-GMAIL-MSGID: 1779273620949894606 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: Maciej Wieczor-Retman --- 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, ...) {