From patchwork Fri Sep 20 01:35:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 2914771 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEEBF9F1F1 for ; Fri, 20 Sep 2013 01:45:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18B2B203E9 for ; Fri, 20 Sep 2013 01:45:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1595E203E1 for ; Fri, 20 Sep 2013 01:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067Ab3ITBpI (ORCPT ); Thu, 19 Sep 2013 21:45:08 -0400 Received: from smtprelay0071.hostedemail.com ([216.40.44.71]:37176 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751965Ab3ITBpH (ORCPT ); Thu, 19 Sep 2013 21:45:07 -0400 X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Sep 2013 21:45:07 EDT Received: from smtprelay.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtpgrave02.hostedemail.com (Postfix) with ESMTP id 1072B5BC0 for ; Fri, 20 Sep 2013 01:36:39 +0000 (UTC) Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 4DA959ED48; Fri, 20 Sep 2013 01:35:58 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::, RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3868:4321:5007:6261:10004:10026:10848:11658:11914:12517:12519:12555:13311:13357, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: knee80_8b41d4779f728 X-Filterd-Recvd-Size: 1847 Received: from localhost.localdomain (pool-96-251-49-11.lsanca.fios.verizon.net [96.251.49.11]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Fri, 20 Sep 2013 01:35:56 +0000 (UTC) From: Joe Perches To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] framebuffer: Add fb_ convenience logging macros Date: Thu, 19 Sep 2013 18:35:54 -0700 Message-Id: <0926c7a34ac51c4cbb67debd0d883f41891e75d9.1379640011.git.joe@perches.com> X-Mailer: git-send-email 1.8.1.2.459.gbcd45b4.dirty Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add fb_ convenience macros for emitting the "fb%d: ", struct fb_info->node value. Neatens and shortens the code a bit. Signed-off-by: Joe Perches --- include/linux/fb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/fb.h b/include/linux/fb.h index ffac70a..70c4836 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -792,4 +792,16 @@ extern int fb_find_mode(struct fb_var_screeninfo *var, const struct fb_videomode *default_mode, unsigned int default_bpp); +/* Convenience logging macros */ +#define fb_err(fb_info, fmt, ...) \ + pr_err("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) +#define fb_notice(info, fmt, ...) \ + pr_notice("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) +#define fb_warn(fb_info, fmt, ...) \ + pr_warn("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) +#define fb_info(fb_info, fmt, ...) \ + pr_info("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) +#define fb_dbg(fb_info, fmt, ...) \ + pr_debug("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) + #endif /* _LINUX_FB_H */