From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBEFCC4CEC9 for ; Fri, 13 Sep 2019 19:08:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8865206A5 for ; Fri, 13 Sep 2019 19:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388913AbfIMTIp (ORCPT ); Fri, 13 Sep 2019 15:08:45 -0400 Received: from smtprelay0136.hostedemail.com ([216.40.44.136]:48689 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388137AbfIMTIo (ORCPT ); Fri, 13 Sep 2019 15:08:44 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 9F01A83777ED; Fri, 13 Sep 2019 19:08:42 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: debt02_68f1b9ca37a41 X-Filterd-Recvd-Size: 1986 Received: from XPS-9350.home (unknown [47.151.152.152]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Fri, 13 Sep 2019 19:08:41 +0000 (UTC) Message-ID: <3028cb117886ccc40f160500bd712f005ff6d5f3.camel@perches.com> Subject: Re: [PATCH 4/4] coding-style: add explanation about pr_fmt macro From: Joe Perches To: =?ISO-8859-1?Q?Andr=E9?= Almeida , linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: corbet@lwn.net, axboe@kernel.dk, kernel@collabora.com, krisman@collabora.com Date: Fri, 13 Sep 2019 12:08:39 -0700 In-Reply-To: <20190913185746.337429-5-andrealmeid@collabora.com> References: <20190913185746.337429-1-andrealmeid@collabora.com> <20190913185746.337429-5-andrealmeid@collabora.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-09-13 at 15:57 -0300, André Almeida wrote: > The pr_fmt macro is useful to format log messages printed by pr_XXXX() > functions. Add text to explain the purpose of it, how to use and an > example. [] > diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst [] > @@ -819,7 +819,15 @@ which you should use to make sure messages are matched to the right device > and driver, and are tagged with the right level: dev_err(), dev_warn(), > dev_info(), and so forth. For messages that aren't associated with a > particular device, defines pr_notice(), pr_info(), > -pr_warn(), pr_err(), etc. > +pr_warn(), pr_err(), etc. It's possible to format pr_XXX() messages using the > +macro pr_fmt() to prevent rewriting the style of messages. It should be > +defined before including ``include/printk.h``, to avoid compiler warning about Please make this '#include ' printk.h should normally not be #included.