Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp789801ybc; Tue, 12 Nov 2019 09:13:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzvJIvqw+uM37p5skUvzAMsoBvA/sfskjzB9oFlsikUgpKOMHzjAE6kdfI936l8xFUjqjEq X-Received: by 2002:a50:984b:: with SMTP id h11mr34687220edb.248.1573578800015; Tue, 12 Nov 2019 09:13:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573578800; cv=none; d=google.com; s=arc-20160816; b=h4cNSH8Bal9ju7atk+CmxKcWVlWEUtochD7LWragasj96n10YswnnsrZ+GyUyf5wJl Av172d5U+1Nhu/oFIRyQUFgmH7YwOzbh2rg14UJPLPmcQJj8oy1wo5QEoHG1B5jd5ZN+ 6gEd8Xs1xmpvh2ZViQjqTSEWPOOWFX4ZDeA9YyIclGXl6fPPRBp14zBwwU8LqqLr1K5c Y7/ZNB6hDDxEONxMAfX20uEAdJJZB9WNoVfO5/QyqMysu0wgCfM6fLj7nGG8Gtv+Y/t2 64yNKICD3zIEeaLTlfqdxyMhsPeAIRq5JaZ/Sf0jW8CnOLVN48FYdoNsGTZdl4tje3WJ Wvdw== 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=NLIj+Lfmy2sO5FzIDEPhMCfvqeveYZsiaTk7ukDQ5PRGEVHbmtEdVfOhR/N0NKBpAK 8wPP71Fw3PLp3vBTqPnC3OB8Cujw1DX2qw/ysx+Aq7wE0I/E1vZZ0w1cEywJj80xzoUb KdyEhPGDm/Fg23RQQk2zRdNA1Lfsz63ucbWv4UzGN71O8CfFRbxYx+ZzaFhhFcmiqrql DvIvLoCGqvrYgqyHzSaw18jdDExnW/IM6ZQ+Wv59MCc3PdjZaJZJiZvhpG+LF9wGzjDY 4ZpHl8ZJRUYg5Mxu/hSscxxwr84v3p25vy/cHdCscKUp9LirC2Y9nQj2ybdHAVvEw1nL RISQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DSi3bo6c; 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 8si380034ejc.104.2019.11.12.09.12.55; Tue, 12 Nov 2019 09:13:19 -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=DSi3bo6c; 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 S1727463AbfKLRJV (ORCPT + 99 others); Tue, 12 Nov 2019 12:09:21 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39645 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfKLRJV (ORCPT ); Tue, 12 Nov 2019 12:09:21 -0500 Received: by mail-wm1-f67.google.com with SMTP id t26so3779648wmi.4 for ; Tue, 12 Nov 2019 09:09:19 -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=DSi3bo6cDFdgW/C5P50IUyxuHVbJaIT1KQDQJxZkX6fp/LeiGw+F1rG3TDvh0ejvLL +syJXdzdFaFffRg7au/lmwpJEdUxQszlMT8S0Up5Vg1LSJvN8wf5L8MoRRGxUDoOS9PH iVfi8QICo/cylWoEXrNxkZ7VyUM6cZyeQFg0Pzh2/GoHIa+Giazla9tmWg23/3weCbNl CW14uWAm8jBHY3j0C2UGlQFhiWMWffPnJ4qHXg6NWdQuNl+Oe88OmSuvxMO7yAhqkVGb x16L6LSwcTuWS0Msty4MCBjXhsSnPLhgD9Genkzfg4gs0SpBy0gVXclGzSw/LC1UDeAI Cpqg== 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=EVhc5bY7vKF/+DpZAcRxz+Alg+0C7bJEGA5w81Sm/b2vTPy0cLXJ8UGoQ7Y3GYkcgs SPrcro+gov16swFgSDWWhiUMEfGZMoqyUnfpg4IIB1lH7ughDtyb4IjEvxMafvUhlZ90 lWCKjP49Rx5oIKfjl19GqW9Fw139qIH5msbubG2Rm2lhTZ2JUejbyJuSZTB9J5ce65lC 7069YGrKOuvkYRwCoUEypwlWwj4r4debQ4/iUS2Z6YkRg4u+u5ky2+tXVvZWAGCJzU6W mWYyUdM62WVdIEtUwqTnF07v9Z8C8YAmcP21+87T9mBmrEAcb1LDjZy1gaSIq3lInVuZ Hkcg== X-Gm-Message-State: APjAAAXPVQtycwsKb6bVaFQtx2p79cmlIXZjveQ6ueKgxrw6kzXdvuEK APAHCnak74sMrYaA4p8pHypF380LpSQ= X-Received: by 2002:a1c:7412:: with SMTP id p18mr4893680wmc.9.1573578558909; Tue, 12 Nov 2019 09:09:18 -0800 (PST) Received: from localhost.localdomain ([197.254.95.38]) by smtp.googlemail.com with ESMTPSA id b196sm4413071wmd.24.2019.11.12.09.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 09:09:18 -0800 (PST) From: Wambui Karuga To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/print: add DRM_DEV_WARN macro Date: Tue, 12 Nov 2019 20:09:09 +0300 Message-Id: <20191112170909.13733-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