Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp655640rdg; Wed, 11 Oct 2023 01:26:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFV2+Q3jrI/tskNaPHKqGsXQcOYcoiNcMJD5R8ZbEqTrE87E8HEgCwJSYOr7vxnLIowjPVj X-Received: by 2002:a05:6870:f703:b0:1d5:5d57:bde5 with SMTP id ej3-20020a056870f70300b001d55d57bde5mr22962772oab.56.1697012784549; Wed, 11 Oct 2023 01:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697012784; cv=none; d=google.com; s=arc-20160816; b=Fezabe3gBmvi08yJ/Jb0+pxSEfETrlP47/U15C0csmLLpI4MRt3z8/sH+7IYdjI5Vf fvs6VgC67mHRtEWi42QuHE2H5TcGcZpVy4dpRydDB3JWn3R+v4KEhQqKw1dnYAC9gCuJ AMPkEt8kCzS23OMVSCJpwfqmhFPxMi2N03s+y0swMbNm9Y98AHw9lLT1pVccBX+s1c/e EfThiK2Ffx6hSJw3bVMBwtOWbS7shVpW4KUNUHGsP+J1VUrFsuJy5lQJ+XsqBMvGFj3c Tr4hPEjCOrM4qAtIOticeEZ7q2cGwWKTsfJZvCAszX5VceyD9XA2N4nUAnLlwPlzkrUT 3p8w== 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=X9JYoodc0Xjzxs+aaZjWGy/Xapgany1Tp7ucdddu1trzal+ZAQq9AIvrso9uJIIMI9 F+uIbp3KCFj60hgpAKf6K2xTGoavo4W0WAM990MnRfpu0KkbhuypgrM2H3drStucgXgx aUNrCKj4etx087X8eFn7tVPBCetekrxDO4il9OYcWUC3rV7aQvUsR7coqX9KJflWboE+ /xWZ8KsubhFiO9JSdeXyhQ8Vy8oVqpuy687L4d1Kft4DtcpFWdoFXy8auFoFZzSaZq+k T/t1tA9kW0DfavJfPHsN79ycWca4DYYbaA32hBhYkhdy67ZRmi2C5kiePyL4aMg1OUwN DXMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gU30vLPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h11-20020a65480b000000b00578f7063adasi13404543pgs.33.2023.10.11.01.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gU30vLPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 B1FF380879D5; Wed, 11 Oct 2023 01:26:17 -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 S1345391AbjJKIZe (ORCPT + 99 others); Wed, 11 Oct 2023 04:25:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345619AbjJKIZX (ORCPT ); Wed, 11 Oct 2023 04:25:23 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C67F11D; Wed, 11 Oct 2023 01:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697012720; x=1728548720; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VXxoZYWc1k9TebbKU7+nIiD46KUiapqhrZ8TkPNyZG4=; b=gU30vLPbDmGiTPRB0Okz4GuTExMfwLMmmul6u8YypUsckG1M3klFdfnO mjpDjggmtRJbLIX3RvwMF3Vm29brsW6JUlR0qabnPbFQpkwjkFIalvT8j DEgKU65ywsDF3DMQlIY7Pij0tvJo839rmWmFwT2Thmumnu2XfZLU7v4T9 d1BuGd+ztHY/ZSHBU9aVeUL9X8qmKhCCFjSk13LzkBz5AGBVXvMEPMOeg pKjui7jNqw4El94OJsD7ZCs/WdofR0O4lzxfy7nhiEXkbVajnxv+HwUL5 tZS6kvv6omnMJLtobpwqH0rnTgukNRdd5T9w5FQXd7BGHEK/XB7BNET/n Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="3200903" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="3200903" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 01:25:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="730411781" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="730411781" Received: from bmatwiej-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.17.119]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 01:25:03 -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 v5 7/8] selftests/mm: Substitute attribute with a macro Date: Wed, 11 Oct 2023 10:24:03 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, URIBL_BLOCKED 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]); Wed, 11 Oct 2023 01:26:18 -0700 (PDT) X-Spam-Level: ** 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, ...) { -- 2.42.0