From patchwork Tue Sep 26 05:20:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13398666 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2073E8181B for ; Tue, 26 Sep 2023 05:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mcCt24AraGOT4/6XftExUBDYH0e1h2kiwAM01qJxjMs=; b=yLhj4uPB+IYY6t R3DqzesJ/JWucpg0yjElpbysf0oG2oVUjhhsHM3hDIepTlTxaxjLQqdBzrSaMpkxLoBzy2jG8/7LD 7DyttqqlIyZvls9jCoHmbTwE9ltFu8wcHs/Cwdy/e8ToxZ16ZikYBdL4PApAt3bzmhYTFQpQNnjeK QqtBWvLOX+P8/K1YeTDSVGkzlzZ5qGwY6EyJVRwUX1AD81ZwvHACebiacV9rcj7ap5/w48Nm/QGoj h2eQqNHEF/HMLyBr7+T/6rh/63q1IW8zf/4/tjEQEtOoKVojxeJk3MH7+9GQCqoWZFvxKKS/ZSavh H5kllsnE2S/fCoc/XnqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ql0Uo-00FbvS-1V; Tue, 26 Sep 2023 05:20:30 +0000 Received: from mgamail.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ql0Uk-00Fbt4-38 for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 05:20:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695705626; x=1727241626; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HobNRGqJUHXjsUELG2MflqrUmiEdsI1lLhoWfVAN/p8=; b=V7cxBevCOb7ovZvRvpTEUkzVLGUscg5ldQAIiZ+N5+9GTPK0p1oU9S0b 2i5yflFgywFIuSxBl21H/GOmuI238csDlyfFcOezt8TjzpR3h7vBnau+q EFs1kofAArBz4GKFoDuGd9RnQY5W9rlPfDEcN8i5YS0tW/zlcgjWSbfHf TiynzDO5QaNyW75J9o82754yuW+uEsJcBNojLgnYyKDSgpDqXRQNFHk9i NQsV4NQLvapyfgOXC1H9S0eN54Vr1wQPVvfPUkXw9Bm1UZ2H4ufY733xU kc+sHsFyEKME9GczSLjCqoh++/ZBxwZVRHbtnROS94ldi8t99Ur+9FBzi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="360865678" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="360865678" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 22:20:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="748689667" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="748689667" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2023 22:20:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DE9E387; Tue, 26 Sep 2023 08:20:18 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Yury Norov , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Bartosz Golaszewski , Andy Shevchenko , Rasmus Villemoes , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v1 1/5] lib/test_bitmap: Excape space symbols when printing input string Date: Tue, 26 Sep 2023 08:20:03 +0300 Message-Id: <20230926052007.3917389-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> References: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_222027_028555_572105F8 X-CRM114-Status: GOOD ( 15.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org test_bitmap_printlist() prints the input string which contains a new line character. Instead of stripping it, escape that kind of characters, so developer will see the actual input string that has been used. Without this change the new line splits the string to two, and the first one is not guaranteed to be followed by the first part immediatelly. Signed-off-by: Andy Shevchenko --- lib/test_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index f2ea9f30c7c5..1f2dc7fef17f 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -523,7 +523,7 @@ static void __init test_bitmap_printlist(void) goto out; } - pr_err("bitmap_print_to_pagebuf: input is '%s', Time: %llu\n", buf, time); + pr_err("bitmap_print_to_pagebuf: input is '%*pEs', Time: %llu\n", ret, buf, time); out: kfree(buf); kfree(bmap);