From patchwork Fri Nov 25 19:09:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13056233 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A38E5C46467 for ; Fri, 25 Nov 2022 19:10:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbiKYTKR (ORCPT ); Fri, 25 Nov 2022 14:10:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbiKYTKP (ORCPT ); Fri, 25 Nov 2022 14:10:15 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C95D55C9D; Fri, 25 Nov 2022 11:10:12 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1669403409; bh=g/SxQQpcICtujmdjN+34deYm/7mbOuynAwNDgxwnZRI=; h=From:To:Cc:Subject:Date:From; b=Bq/Y7NRturTvjRkhWN5xLm7MCA+plFgO7mBnfnJEPJqytptvWZS4NpKEGtEeb8L5+ r8xCRXvbU6Nu5ZWOlx2tS47vqY8egIroPDXME/m8Z/T7PXtN6kBpN9+IKnrZYZTIeA Z/7P3wObBzTderaOTTi5RUATuLPaFHAXUaY1AOmA= To: "Rafael J. Wysocki" , Pavel Machek , Len Brown , linux-pm@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Andy Whitcroft , Joe Perches Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , linux-kernel@vger.kernel.org, Steven Rostedt , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH v2 0/3] printk: introduce new macros pr__cont() Date: Fri, 25 Nov 2022 20:09:45 +0100 Message-Id: <20221125190948.2062-1-linux@weissschuh.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1669403373; l=1346; i=linux@weissschuh.net; s=20211113; h=from:subject; bh=g/SxQQpcICtujmdjN+34deYm/7mbOuynAwNDgxwnZRI=; b=cJBM5DFWiGF9QnAVkNtozi6pqByCpuEASnEYQnyrCxmVjHyA1kV5rp0QeDjmRHHqmQ3N1OgkRmMt ipaSdfSSCfm0BDAhn8ROkPjNvwylA/wZdinAiayUOOKci5E9L3nQ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=9LP6KM4vD/8CwHW7nouRBhWLyQLcK1MkP6aTZbzUlj4= Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This series adds new printk wrapper macros pr__cont(). These create continuation messages with an explicit level. Explicit levels are useful when a continuation message is split from its main message. Without the explicit level KERN_DEFAULT ("warn" by default) is used which can lead to stray partial log messages when filtering by level. Also checkpatch is modified to recommend the new macros over plain pr_cont(). Lastly the new macros are used in kernel/power/process.c as this file uses continuation messages during system suspend-resume which creates a high likelyhood of interspersed messages. Changelog: This was original a single patch but was expanded into a series. v1: https://lore.kernel.org/lkml/20221121050946.3540-1-linux@weissschuh.net/ v1 -> v2: * Introduce new pr__cont() macros in printk.h * Add checkpatch.pl validation Thomas Weißschuh (3): printk: introduce new macros pr__cont() checkpatch: handle new pr__cont macros power: process: use explicit levels for printk continuations include/linux/printk.h | 23 +++++++++++++++++++++++ kernel/power/process.c | 18 +++++++++--------- scripts/checkpatch.pl | 10 ++++++++-- 3 files changed, 40 insertions(+), 11 deletions(-) base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536