From patchwork Mon Dec 9 18:56:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13900229 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 4C077E7717D for ; Mon, 9 Dec 2024 18:56:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEE748D00A0; Mon, 9 Dec 2024 13:56:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C9EE08D0058; Mon, 9 Dec 2024 13:56:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B67A38D00A0; Mon, 9 Dec 2024 13:56:45 -0500 (EST) 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 95E428D0058 for ; Mon, 9 Dec 2024 13:56:45 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 42AA1C09CB for ; Mon, 9 Dec 2024 18:56:45 +0000 (UTC) X-FDA: 82876326540.24.5814E94 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf18.hostedemail.com (Postfix) with ESMTP id CDAD01C0012 for ; Mon, 9 Dec 2024 18:56:33 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=hsozfRMz; dmarc=pass (policy=none) header.from=collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf18.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1733770583; a=rsa-sha256; cv=pass; b=VaYSL2abOP/4FZHL7fhQgq/ivxr1niOKEEmcH8dlOi/ND4nDHQG+O92K8U28nhs5VMM43a evd3hvIGjckl1xnOhDLbNAIdaen55CB6XsSKeZTJcqv4OiCZS7BJZiSufR+l0Za5Y116Yc SNKb7m7YHa7rPesZxQ6xqbMb/9E45aI= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=hsozfRMz; dmarc=pass (policy=none) header.from=collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf18.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733770583; 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=/Qv2og47kVG8c0xQF+Q2piw26jz1RE6nH/VURIZHB9U=; b=TdByzrhO3jtj9HZzkYdj5K/ruX6mb/jCnNwYmeu32z131iMXCccDuodsc4dLjI7JjTpOV0 eTvTV9n02XFoHwu1FVw2WiLTeUKBhPQGcx2XEO/uY//LvT1JxS1TuO9oxTooGAnotc+RAY RP9Jz+yUMBH6IhOzkrudO+hHVoBjrGw= ARC-Seal: i=1; a=rsa-sha256; t=1733770588; cv=none; d=zohomail.com; s=zohoarc; b=BH1uN4PNbgO2EdoTYC+DWceD5kkupIwlLyYjeNybiRzMbJg2dwWY6374yn17xPx93VfOsxP00ItYIP1SdZ8A+1sdDdTEANNmPet8Wo+NKdsGydgrM33DsxIJ+JUaOd8459RYu410iWq6HMo/C/RgMSYScTTKsOJDqXrQd7KnAY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733770588; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=/Qv2og47kVG8c0xQF+Q2piw26jz1RE6nH/VURIZHB9U=; b=m24NXzuNBxWQASS9nQIl3zB7p9+GMrbdq1V7xQ7pwHvUPjeDS1O11ek18V59J0yvI5rvlzGF4JC/cg0EmWpkp1vg3exK121D74UNnYGPqERqG0J/JpGDc8P4S0wYSg19/+wWXZw+5t17d+3E1x3w2geEw+FjJBeDLQqGmdkik9I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1733770588; s=zohomail; d=collabora.com; i=usama.anjum@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=/Qv2og47kVG8c0xQF+Q2piw26jz1RE6nH/VURIZHB9U=; b=hsozfRMzsNmgww3EpXvmZ74cjdAxxuzkEY6jVQsUKmRRU2FUgwEiRsOYFr4ccrAZ c4FNYl/MZapxI+zHlQOCc6Cn/Pf5YKglvOZ55epMNdTOaweM0lZsuDwxWpD5Q2rIIaf KMHT8RcgD9od9TQRHSqFFre14sSIrtDMzuyjwgfU= Received: by mx.zohomail.com with SMTPS id 1733770586925426.83591125268447; Mon, 9 Dec 2024 10:56:26 -0800 (PST) From: Muhammad Usama Anjum To: Andrew Morton , Shuah Khan , Ryan Roberts , David Hildenbrand , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Muhammad Usama Anjum , kernel@collabora.com Subject: [PATCH 1/4] selftests/mm: thp_settings: remove const from return type Date: Mon, 9 Dec 2024 23:56:21 +0500 Message-Id: <20241209185624.2245158-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241209185624.2245158-1-usama.anjum@collabora.com> References: <20241209185624.2245158-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External X-Stat-Signature: 4uecfcxw7ucbxkfmzwigw1nef3pd4naf X-Rspam-User: X-Rspamd-Queue-Id: CDAD01C0012 X-Rspamd-Server: rspam08 X-HE-Tag: 1733770593-156081 X-HE-Meta: U2FsdGVkX1/AvUcT7k0SGqLcyBlpXx8QECUcxRb7yRHIspBEPmA8jIF1s0+P7AKjrqUi5ciLbH1n02e/7U+Q2YO/kAeyw/gT/Ba2fkObk7OPnQwJRhDt5LhBQNLCiA6SSeW70HzyM7M18xhG+OQ6KNZnOMHy+xYet0Fi0L1HTRwwSgtUq1uBLeez9oJ6hW0cxDElLLiFjw72r+5wuglUgCxBa692g8hdrRDi6BQTH/Edtxx/Kh1dIIukGexXDdp/7m+jwEjyYwiM8OypY4LpJrdTbt4oqpJc8bykTFWka5Q2YgrT5r4NDGOnpBivZPM0hxb4GZiknffG/K2wFL3udRUz6n9yTDnoCcThGGJf5dbNBy4guPDxF8c53eDsCAgaEOJGu+04lmBbQ88XP96ZPE+ktHBemFyTJJZE27dUvVuvNAcw92R4TqLtvUK8j/oGeaECcFmGNXLVfRg1zcj8XInP4/JRIg0TxCTnH3nLgTgccLJBprX2QlIql/ZykRsLEuHe4Ioyfy7OmgRQvv+vieqZmkyZ2Ovj+00IVkEVmFuXulyYC5uf1Lbw0KyR55DyEpwJpUd2Abxhjn3NpDPsx8YulzZB9zvZhn183eQ0rhJxWJDafR/NgOFaZy64uFouYio9le925T3Vs1G1i3wVVR9qqHW5LFO5ot1EnIlYYK5tse7Mpi4hlBCLpcA07aF583QsW7D5Z8ASO6l1xwi6VRrgEg8ObGrVen/YD6vYAe4Eq+5dyDBqUu5gjRJ3LqMmCM5uDJ+Ltnrt4IF6+E9JFtyEwRQ7Im/VkjwIdeupMnnf/X11Kd1MzJ93pMQbZxgwrVlNiZXia5d22Vdshfp9r+OuCo+1y1V4ZebN5P9P5ZgoaEuhj07g7JIHjyF3tLsiVmKOST5Km4GW8p9Xo/sBz7MEYtCST/4VpSi3cxjHJAOW5rmUmzdBQy5XxqghHVjf0j7rz839cW6h4/7nqWE VI6U7Rp+ 6cMVnKG9XqJHFPDrd0iqVShCfZmAgY78cWjxn6/FCRxSAfO4dFiaGdyVndNRg/EFEdCfgfa8MkYka7jHwwNJHiBdi0IIurT2JYEHnBoi8bzuwN78N4pBBRFRTCbeUxncBrfA235IKV03M0UuvN3uGiyPXneni0PD2jlKil6TbNHz27XhkLHjdjUcnVp1chyymPy3suAM2LrUyQHnNxgoAG5b0GHhLOXD9KC5NR8WxascHhnsgtYds0A0SQE0pDXKjS9igXK+/Xh7FySeiV41gGUiuoAOGnIFTmF/JosE+tL2OGJmJAkCT1pLNcTzmW1noPG6WojbrsFADsCYtFqdwYzESI1362N6PAhK0X2ft+9zoswJaADsEQOGmug== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000281, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Remove cost from the return type as it is ignored anyways and generates the warning: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Signed-off-by: Muhammad Usama Anjum --- Optional fixes tag. Fixes: 00679a183ac6 ("selftests/mm: factor out thp settings management") Add fixes tag to last patch which had created these files instead of original patch which added these. --- tools/testing/selftests/mm/thp_settings.c | 4 ++-- tools/testing/selftests/mm/thp_settings.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/mm/thp_settings.c b/tools/testing/selftests/mm/thp_settings.c index 577eaab6266fd..ad872af1c81aa 100644 --- a/tools/testing/selftests/mm/thp_settings.c +++ b/tools/testing/selftests/mm/thp_settings.c @@ -87,7 +87,7 @@ int write_file(const char *path, const char *buf, size_t buflen) return (unsigned int) numwritten; } -const unsigned long read_num(const char *path) +unsigned long read_num(const char *path) { char buf[21]; @@ -172,7 +172,7 @@ void thp_write_string(const char *name, const char *val) } } -const unsigned long thp_read_num(const char *name) +unsigned long thp_read_num(const char *name) { char path[PATH_MAX]; int ret; diff --git a/tools/testing/selftests/mm/thp_settings.h b/tools/testing/selftests/mm/thp_settings.h index 876235a23460c..fc131d23d5930 100644 --- a/tools/testing/selftests/mm/thp_settings.h +++ b/tools/testing/selftests/mm/thp_settings.h @@ -64,12 +64,12 @@ struct thp_settings { int read_file(const char *path, char *buf, size_t buflen); int write_file(const char *path, const char *buf, size_t buflen); -const unsigned long read_num(const char *path); +unsigned long read_num(const char *path); void write_num(const char *path, unsigned long num); int thp_read_string(const char *name, const char * const strings[]); void thp_write_string(const char *name, const char *val); -const unsigned long thp_read_num(const char *name); +unsigned long thp_read_num(const char *name); void thp_write_num(const char *name, unsigned long num); void thp_write_settings(struct thp_settings *settings);