Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3189695ybc; Thu, 14 Nov 2019 05:27:31 -0800 (PST) X-Google-Smtp-Source: APXvYqz3cGFYssjck10R/zF2HWobNlkSHa4YcUpyvl+ZaKPjC4PgR44qgRDs29IMcx/TGVtqVVML X-Received: by 2002:a05:6402:3042:: with SMTP id bu2mr1233608edb.298.1573738051313; Thu, 14 Nov 2019 05:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738051; cv=none; d=google.com; s=arc-20160816; b=CbcW6L7J2lDfydEgD466RFr+ZIFdo+tl04cDsTtBFJdO3aTj4wgX5XQTKGMuUlS31a 0KHo8H8F+U+75U4o2eZ9+leAeRyoAUinCs5yHs1KDiNCjr35Lff6USS95bm36LCAgWtu spKFUnhFxfscwKRU4stH4EsCQc3T3IOPKQRlGS4BDEqVbyGSVFx5n9G7mXY7GyYhRV5F K+wLCG3GF4ryIcFcaW+tu3SdYNDrHrWulw04O+V3RUXhSn3EWahIaTAadwppI6CPBxqu Qs1gllhvGnZjtcO3rFdXvO0w/XGTCdCmvB+UPDd/Pw2BID1ZEYvNY9RY30AnEztdzKqy etGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=q25FqYYq1HlyGPjqgeEbhuqnD600bhraE2cbn15efDk=; b=AgZ4IJdeZC/bOAubcIcR34OFftadbD11TVUT6xqdvHEyrZgIR6TCzsPU7x0RmXvlkw C1UmIcoAfBMwqjqLDFcRStj2cNWEHWIOBgtfhyw0QJce0P7Zzk34rU2LrX5xZZCdgIlJ 2lKbb/XDbKXwLUwd9Fp9r31KeCmlwoRo+mIwcP47l9OWrHdG4Yebu1LnOLEl+iZ1lSKE RiR/NnYY60vnPUzbYG3qXhCqoHYGR4fg/+T6cnjzaLA/FnjS0QsbQHbR5E3mfFTOee4p 37sQOEcDzkvfX3KKpukAov5zAUsiM4KQ+a6lN+umwCmQ1OJPKKcqp8gEt2JrVJVsQDdJ RLtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Rds8wS/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si3290072ejv.278.2019.11.14.05.27.06; Thu, 14 Nov 2019 05:27:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Rds8wS/q"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbfKNNZ1 (ORCPT + 99 others); Thu, 14 Nov 2019 08:25:27 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35259 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfKNNZ1 (ORCPT ); Thu, 14 Nov 2019 08:25:27 -0500 Received: by mail-wm1-f68.google.com with SMTP id 8so5891264wmo.0 for ; Thu, 14 Nov 2019 05:25:26 -0800 (PST) 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-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=tJTotOiY/rIdeXFz/YmvJWfKDwlenZeUYo6waNAlZNqaC70jvPEwjm+rA61dcMQL5T mHQYRUk0BJxNzyMev32GEQtBwkEkXhgpZ/PxKzvECorjGSxJ7G1YBmntG1pgbGTTL/EK fByjy17xObkT6nbkb5kpWaS+b+0D6jfngB/BFYC8a7a/FCOmAo25DebY9eWTAtcFAtZo hHHsI4v2QsLEW6u66w3HaFU3UClFM76VHGE7jpg7QcoB1Xg2I/CCbrqwZCFiXmfACVHP JMwJWlABC0qiVvN8W3EpEjvnThWYWV5Vllm5HFGHGOgoXiBXs8bLQs8MFXroHMG6KVDw NhjA== X-Gm-Message-State: APjAAAUhsiqREv7jG9imiX4s/Ia3f8DyorLdGdleRUEruYlrva2L/a/w O4B/V76m7/Lo3SedFa2AtcQ= 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 Cc: heiko@sntech.de, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. * -- 2.17.1