Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2565931rdb; Fri, 22 Sep 2023 02:19:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/uhcl2+UgAn5ZR7DhgBpZYdTLVgYGC1Fn6gzyn6mxsFmp4qPEQiECx9UveGTlQ2v0Pesk X-Received: by 2002:a05:6808:288f:b0:3a8:5ff0:6b52 with SMTP id eu15-20020a056808288f00b003a85ff06b52mr6924517oib.15.1695374371823; Fri, 22 Sep 2023 02:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695374371; cv=none; d=google.com; s=arc-20160816; b=Ng4W1arlcbvNbteXhUhQJKZ8/0XXthIj9lGymQBFqm2C4IIHYINytLAbCR+zbN1Cji yu6LKzHNHy9aGVZ+wx2HjhOwCsqRstWyQajbSY/g5a0Mzr1eXRndC4vxhaa3nsLKIy/h XGNkBLBW1eHozAawQve5CcTELAWdrLrLP14W81jKi8InE29R4bKgzSeQ46NSL4zev2PZ JbdbLeR362012v/Csf6zeOa610mo4nw+JMelsSHmrh0O+qubD6ERQlaE/DAicGXD3o1E dyi+StfORmEOjXlVeLssKHRpK2h8PNt+M4Pm+e/bcMnuaAO/KxgQ+IPK7jTZByaRTtfD QUpw== 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=JDQYDWWgfQeOlxAQHjzCv/qgftcjjdf885q/keFoT2o=; fh=kGnTVGINCMm7xrDmqwX/qRTdf7Wq5odxYgzr5C4cFAk=; b=Yy+qbxyc+940xOnDHd5+ubHA0AnFhMzyogFV8rrGAT94j6Hl28vh7G+Xl4tJ0OXO3h 0II93CyTNzy1dso0+sADUtD522zXqO7XJ6ONK6+PU45O1DM1Sp1FLZHwrWcP4gfvgVMk ZOeIyiwJxaXkdQ2kBK7VyO44AXfanNKvpsC2zgCVKwlLShikaAZC7/ed+mA5Y0SSPpgw srN6AbVOAyaU98d9DsRD8cxA9UXnwG2QJim5RtYeJ2a1SGbqyPoQDWdql8jfwrn6IhrC c0cGrYGrLYlKIdrAQAq4nPa1lMQwSisfu+4QudXhdZ8tNkaxNY2v7vCojnAN/jgM1pcm arSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dm2ozLtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y14-20020a056a00180e00b00690c92a8defsi3712514pfa.206.2023.09.22.02.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 02:19:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dm2ozLtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id B92138299920; Fri, 22 Sep 2023 02:08:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232879AbjIVJIG (ORCPT + 99 others); Fri, 22 Sep 2023 05:08:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbjIVJHz (ORCPT ); Fri, 22 Sep 2023 05:07:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BAC5197; Fri, 22 Sep 2023 02:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695373668; x=1726909668; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bdu41z44xg0Fpb+rhew4qBVoBtMMCUBJABN2/+5EZiI=; b=dm2ozLtKqJ0JkEouBiqDh8ZJpRfahXupL67sAyHRJaFAv1StZBswa/GW 5SBSLbpKr7aLwp+AMypsBH9OXwLwQ3EShzXWzTwospUtSiJ3z8QA7B5Bb faVB1s3yV+WTMbrgjzi3dDvsf1PvP3WsGuFhNMNu5dCOlRfMTSD9Wtft4 2Wu2mMKDirOLoaqwNN/97IiddQ/AgP2vzpENEOm6EdK2RjGvsUOe6xiuP BpDqHPh0ZwaccdeCxmN2fk9zeXHygKAG4lZAUX83OAqR7BiM8ZU687Q31 GvKu5r+LhD0iISA/lopKfVFNPWr8qliZbz6hgbZgbDwEs0e1CBvMbZ/GV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="378070925" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="378070925" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 02:07:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="837663993" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="837663993" Received: from bmatwiej-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.8.2]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 02:07:45 -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 v3 7/8] selftests/mm: Substitute attribute with a macro Date: Fri, 22 Sep 2023 11:06:43 +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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:08:05 -0700 (PDT) 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: - Add 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