From patchwork Fri Nov 3 18:23:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13444879 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 1A9C0C4167D for ; Fri, 3 Nov 2023 18:24:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9195E8D00CA; Fri, 3 Nov 2023 14:24:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A1B78D000C; Fri, 3 Nov 2023 14:24:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71BD98D00CA; Fri, 3 Nov 2023 14:24:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 636F68D000C for ; Fri, 3 Nov 2023 14:24:16 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3A9FCB667B for ; Fri, 3 Nov 2023 18:24:16 +0000 (UTC) X-FDA: 81417467712.02.F559809 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by imf27.hostedemail.com (Postfix) with ESMTP id 6D1B640021 for ; Fri, 3 Nov 2023 18:24:14 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=UK+rwuDo; dmarc=pass (policy=quarantine) header.from=collabora.com; spf=pass (imf27.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.172 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699035854; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hAE+a4ACT/an02OZdBXuK7TRxpywMjVTF7/fi71XLo0=; b=jLFT5aJy1Pcg+EsvrUrLZesRMA53REERq3h63GIvlHRD+NJ/GvqX4/C2lhn2uV0UyfWftU JVH5YEdGFB520CPyyT59/xQFKUej7Wy2tDtAF969/B5936zG98NNnAZIfHbTMAtOaqlh1U d9xy40fcZ5UtieAYieHTOh/zTrXweVo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=UK+rwuDo; dmarc=pass (policy=quarantine) header.from=collabora.com; spf=pass (imf27.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.172 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699035854; a=rsa-sha256; cv=none; b=sGyCl675SU6H1hkw3iPODYBxDGRTimGNmVvKjZqsVZ1rlcyn+nXFYuWPD5x9V+K1X2MPMc gm5gMyK9oQqCWYyq1mR4t6oYyU1e9wvG7uq6Az5tP5DeVL5rco6SJ7eZ9dcoddW3lmSkLD qe54F+PWBAGEPOn3SmNr/5LhHSz+GOw= Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1B42766073FA; Fri, 3 Nov 2023 18:24:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1699035853; bh=zZ6D4S//ld77lgzABD77wPrEQjiD6EF4YGN4GV6oW3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UK+rwuDoLmLNFBxK4lEbQO01Bq3NHepvIVRwzLmuijGgo4M8iwfsElqUx9DMG3HHd h6FB5QUSjyVBUJy373ftc4aYNJESqrnQg8iQuq74rbJPWbFmbKx1GTtcLz2rM+NkRo PIatxO/V1jTO8bngRtJSU1gZlXiB12rV44xmI32EkUbcFLuUINcxjZVxvUhLCOiIOk 6nDMmd4Cq0W6mz75AQxv3775F5C/xIueom1Hl72Y9KYzQT5eeVfvhJWxWEoe1AS1O5 sWwSl1sjk6up9is9zekIvWxNDipaK7E2Vqu99lJ/xMWHhs2Ju68v8Up8cpWYy2J/ch DTkI6KAaclD4g== From: Muhammad Usama Anjum To: Andrew Morton , Shuah Khan , Muhammad Usama Anjum Cc: kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] selftests: mm: fix some build warnings Date: Fri, 3 Nov 2023 23:23:42 +0500 Message-ID: <20231103182343.2874015-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231103182343.2874015-1-usama.anjum@collabora.com> References: <20231103182343.2874015-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 6D1B640021 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 7yz6qxb9hdbw61dnxm4ybrmhp4bs1zn6 X-HE-Tag: 1699035854-439949 X-HE-Meta: U2FsdGVkX1/qvBGfeEoER/UdCGTJMa1k3eTgH/xvfPwV+EC/wJlDRtm5P0tfTi77TM7DD662oilyEIV742xdQQft95Uh++5rKafmgMxWblhTYllxZJgnG3BCArofzeZFJHiIWLf5KwNXmKpjK61HehLNcEiZ4IwrK+HSXg2AJq7X7ZSBuKgK/ZGPlKZwjtiImr8fBYlolJ9o5r345wFvIMldzSnZXgOHRGgjI1X2RQLqZGODjsCY4ZA6rPcDB0PotuueKGEOSmtg/AzbGs65anDUoomVqnluj1Z8+a3sa5iGenZe1lRUjxZ4+zHI2tb9y5yGwd6iIrkKak1BN7ESNgmgbW5BH8O99+OP3mQtiDeX1Oz9J2Br/dXNNGH5w1qNWNPVFeAKJENM++VDBtnyQ7coeEwsoZ2X2TPH6kPvo0IGQJ7UY6Kb208LknTR4oZc4oIjIxDtR6SDrvU/u7SbdWBI0dpyxGPfRQCa6/3B77RDC9PQK6JkbO1mwIxkXbUfU22KzzXn8ckh5xo/K+NLz4qFWeL7i67mFNxVw2/0BIs8AJGtjG+QNXKDLH6nH4xGDXJiaAqGwgoIQbSy+RS/fL3aGxY2iQvmMx+0FwyG0cQj0Ceu+1Fkhg8t3k9tn5kNnFXREILCacFKthiETeUxLjY9OmR/rWuSq0ubWZbIpNDjSP0GEUK9cPSONdd9CnXAbijBuc/th3YsPZZOvwYUdCq4W1WC/bgN29w4o534D5c/VYSpm5AxmftXpi1+nMqw0SM8bkMXGaguJ6drd0S5SNmVooySg7qaNlqtJeK5QpbYVaNSSbPlQaIkewI6aeBFg5D5rkMMSIOMscWSqRraFj3VnJrfnUnyaDfrI0dDxz0soyYZZd0p/k9j77gdxIYGgSUliZ0+cEQSeLl2dFpmAe00wwojjBEuDn3BYYxv9ZS/rhW93sBETxxMJ7j1RECLAN0hDbxk3rWpLOtMkrV XvYDTlRR vaGXF0ChrZFzf0kPtsaaaKOWcxQrZuJGVHklbl4GPPGhLK/1fICLPs1K53FtUcpntFV6EopDSBC5Bw/FC+Pxs8l4Gijcogpk5AKWcSYFPPqV3AISPlGsybXxgEsEdoxMAx7qYPgXefYdMw03VNMXwnYqMqk/gtXsWaus4aBw6qRAgVAksFSMFytZ5kpHFVqrdf5HGI9dYk2i4LEu48PpiI932U7vokC9gUQiRLUSKWux2v1fkNMJFlnMlHx1l0xme203G 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: List-Subscribe: List-Unsubscribe: Fix build warnings: pagemap_ioctl.c:1154:38: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=] pagemap_ioctl.c:1162:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] pagemap_ioctl.c:1192:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] pagemap_ioctl.c:1600:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] pagemap_ioctl.c:1628:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests") Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/pagemap_ioctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c index f8685a2ea07e6..befab43719bad 100644 --- a/tools/testing/selftests/mm/pagemap_ioctl.c +++ b/tools/testing/selftests/mm/pagemap_ioctl.c @@ -1151,7 +1151,7 @@ int sanity_tests(void) /* 9. Memory mapped file */ fd = open(__FILE__, O_RDONLY); if (fd < 0) - ksft_exit_fail_msg("%s Memory mapped file\n"); + ksft_exit_fail_msg("%s Memory mapped file\n", __func__); ret = stat(__FILE__, &sbuf); if (ret < 0) @@ -1159,7 +1159,7 @@ int sanity_tests(void) fmem = mmap(NULL, sbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %ld %s\n", errno, strerror(errno)); + ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); tmp_buf = malloc(sbuf.st_size); memcpy(tmp_buf, fmem, sbuf.st_size); @@ -1189,7 +1189,7 @@ int sanity_tests(void) fmem = mmap(NULL, buf_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %ld %s\n", errno, strerror(errno)); + ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); wp_init(fmem, buf_size); wp_addr_range(fmem, buf_size); @@ -1596,7 +1596,7 @@ int main(void) fmem = mmap(NULL, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %ld %s\n", errno, strerror(errno)); + ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); wp_init(fmem, sbuf.st_size); wp_addr_range(fmem, sbuf.st_size); @@ -1624,7 +1624,7 @@ int main(void) fmem = mmap(NULL, buf_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %ld %s\n", errno, strerror(errno)); + ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); wp_init(fmem, buf_size); wp_addr_range(fmem, buf_size);