From patchwork Thu Nov 14 13:25:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wambui Karuga X-Patchwork-Id: 11245319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A722159A for ; Fri, 15 Nov 2019 08:05:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6283B2073B for ; Fri, 15 Nov 2019 08:05:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6283B2073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD8276E0CF; Fri, 15 Nov 2019 08:05:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F6C56E2F9 for ; Thu, 14 Nov 2019 13:25:26 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id t26so5892998wmi.4 for ; Thu, 14 Nov 2019 05:25:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=q25FqYYq1HlyGPjqgeEbhuqnD600bhraE2cbn15efDk=; b=XV73ivsjjw/lFVgnNcL+CrtlLvPRIoUmPsDtGpruk46KT3u9enrF9gW86DzAl6lz8n UCtfJQ92Q9PUIIdRtVsclUmjv9c1SseqbjQ+QdmCEu2pBLlyldn3TSfPvmklRd+GkEP9 Y4jXFPzdOBBouy9+8q4qgOeIq2T8PiM9ZvyvcBxNyJFVAt0+3Py4KkDF+RZvAuzJy0L9 Y6hi9P/P/LVRu1qP+hO4ymgMs/02WSU6R7PgdUComanueE0aJp1XtRQAUVws01TGqB0v MMPUIizVSs3jrATNr3dXL6nF64e5+ok9kG/qD4v79FHaRYuIRPKXGkg3Oe7Z1aF7mRLm 4DjA== X-Gm-Message-State: APjAAAWnorByeOZsGmpR4QXD9Qehk1pmOqBIOCc+gN9LqcE7Glb6km4y +kj8P1HXxZw/AFu0f7h6Oxg= X-Google-Smtp-Source: APXvYqxDxppIeOPFqQWV1zapmmqSUALzzrPUav1RgTbEN138v5mV58ouZdmPPao15Uvzkn43K/TCWg== X-Received: by 2002:a1c:e386:: with SMTP id a128mr8279022wmh.52.1573737925338; Thu, 14 Nov 2019 05:25:25 -0800 (PST) Received: from localhost.localdomain ([197.254.95.38]) by smtp.googlemail.com with ESMTPSA id l4sm5897905wme.4.2019.11.14.05.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 05:25:24 -0800 (PST) From: Wambui Karuga To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, hjc@rock-chips.com Subject: [PATCH 1/2] drm/print: add DRM_DEV_WARN macro Date: Thu, 14 Nov 2019 16:25:19 +0300 Message-Id: <20191114132520.7323-1-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Fri, 15 Nov 2019 08:05:26 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=q25FqYYq1HlyGPjqgeEbhuqnD600bhraE2cbn15efDk=; b=Rds8wS/qzXNcvC3Yd9f/9XdyvTQZ3Uht/UdVssSaiVWMebYp+LefE9/zU1mQKhPYcG rqPaBRv9FIUj1gh70+cLk7DG/OrEI9Zf+eFRgqaRCH+dZam7uZLaGPgmIGf4MQz6UeNy BtAq2oFoy958LNz9eMEe0z+wc4DgSymvgksD4Oh9j846cWK2FiE2j66n2K13H+fgH8Y1 P5Qss2xAvPiMNCGzltZv3vh8w0Kgclob0u9jLh9M2yumRm2YjnEDIOc+njNf16DNfWuP nWHjjdqV1qnlKajPHaqXymwBjZ3sKCpaT6Kd70M99pjohJRP0RP0Pf2lcpfp4LdLUw3i VPQQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add the DRM_DEV_WARN helper macro for printing warnings that use device pointers in their log output format. DRM_DEV_WARN can replace the use of dev_warn in such cases. Signed-off-by: Wambui Karuga --- include/drm/drm_print.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 5b8049992c24..6ddf91c0cb29 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -329,6 +329,15 @@ void drm_err(const char *format, ...); #define DRM_WARN_ONCE(fmt, ...) \ _DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__) +/** + * Warning output. + * + * @dev: device pointer + * @fmt: printf() like format string. + */ +#define DRM_DEV_WARN(dev, fmt, ...) \ + drm_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__) + /** * Error output. *