Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1398167ybc; Tue, 12 Nov 2019 20:39:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzOv6l96sr8cRyeerEq6c1M3x0/EKFfnVBeqmpBB4mX76708iPlLXV8xSGIe4uSdOASBQiC X-Received: by 2002:aa7:c65a:: with SMTP id z26mr1459657edr.261.1573619977684; Tue, 12 Nov 2019 20:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573619977; cv=none; d=google.com; s=arc-20160816; b=hh52qiHTbOZLWqzFhK5a1P1QR39IszIEThawz/cpZ7IbN9Q8PaVeihkZfKiqpGm5FK f8fsL1dQ3wWWUhtJoFpZtY/yv029NKRfNXDv6MRtwYHWhVBqgfL0H6Ec4iaWusnjGEff +6p4eDU2P/JmwHtiaj4J4fEoLvTsEB6fUYu5DnT1a+1TdqMl1DbJponkZte9G+Rg8fAi pp4UXVQDJG8fhX3J2HmbCpt5m6CYemhTHjI3emi/jAtfBMTjs5YQrhQ3e/ClnTtvo9Yr g/hS4CJGR8rNyCpXWpuHi2GAuBTc+AZ5ln3qFoCubSuDlAPijbjIB2v2BgUkpQxxgBTH mNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=6Rb656liMW5iqgFRm8uCYcs0BBDjpFH5RMQxLc43FYg=; b=Jgnz2xBxoTujjXe+yfhqYkNlAFdZaD2tBlqFCK12IhyCdvAbJrZjkVo6Vo+ZV1uGdu qloimeTD9jBvpT8Gxn3iV/8d4maZO39UZjl0Ei/fqG8uDCBafhJkZJggwkdb+tsl3QdJ URGc3nhQhe6kbYGmfeUvX35yblBngMXuBYcyUWjL0uSYPUc8hsypqzEbNhOOylBEdUaC bD/kVePZeRQDRbE7G02i8kqXcyO49Gg+b9KjxogSrKPlv1LCW/OzI2DQM/SWtDf+f3GH YJGckWh+nZtqPjctxwLzhGDej2XsH9XXXsVndz/jdtBh2YcSySgpT4oUiBYFAB9yjIiQ N/OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MZHIdB58; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c29si611599edb.223.2019.11.12.20.39.12; Tue, 12 Nov 2019 20:39:37 -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=fail header.i=@gmail.com header.s=20161025 header.b=MZHIdB58; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727149AbfKMEiX (ORCPT + 99 others); Tue, 12 Nov 2019 23:38:23 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40170 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbfKMEiW (ORCPT ); Tue, 12 Nov 2019 23:38:22 -0500 Received: by mail-wr1-f67.google.com with SMTP id i10so688717wrs.7 for ; Tue, 12 Nov 2019 20:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=6Rb656liMW5iqgFRm8uCYcs0BBDjpFH5RMQxLc43FYg=; b=MZHIdB583lS1DUJ5f2Yk9eJgKd1TaKCH7MP2vBYjr53qWrEglioVmlCfFNu8r/Leix joVMrtCtCuIsPrGbtuk5QNiOrtaoqsFXxVBYJQ/Mt212sWIuOTPsS+VZ20l4TiZjnhPC lLspqlbgHrQ0Kj7eu+uMZAl2+ogz//tg7iV/sMl9lgHrfj5nQ3N1+E1Tis2y0/q8n9IN mTwKjJc9HIV7oMYzWROYF5krcFKCsyh+anaNc0EUs6cAGKECZ1k+LwoN2ukEnAkd5NOb q6+ValHnC3ou62E/Gz4TarLDdG2EwhRezd+61L3GoA5m+AeL+a1Gq46Vo1kksZQMtjKg eQtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version; bh=6Rb656liMW5iqgFRm8uCYcs0BBDjpFH5RMQxLc43FYg=; b=c79WRF8p2kjc8QXGLFI9pH0DSrpADfnZG2+kNPbwOElVVSMt/u4YyOtMcEut4Dy0jl 2QWqTtYB+S2VGUpQn+0ZshQolLsz2MAf/jrrHMA8ohz0gUAAZRE0wG9JINU0rjn1f0cs mHMID4RP+BWMGgyfEoysPX3+Z3CJ/LO/4ndWSVP588kgFYkCGz/xjNq1v5ZVv4Wov7iW Ft7H+pJg/M7s2qmsXAUjeSHhZWO6t/hhUplvM/IUIIYtsK719IHIweqfxLlTL/VZtkNe +e4w76ZOpzn5lmRTf7AX1MuJOxWXvAguHn7xKqhVdDgOcTbRGXpeklyfrHcp7yoeIAH+ LtUA== X-Gm-Message-State: APjAAAWNMH8i2PhdIUx24jraT5y+mTn5ZsVtie2BXtd9GsOnvQf34YGo 8LZVsNKzAxuddRBQZ+8UXv1YoGCiP8g= X-Received: by 2002:adf:c401:: with SMTP id v1mr691909wrf.375.1573619900605; Tue, 12 Nov 2019 20:38:20 -0800 (PST) Received: from wambui.local ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id p4sm1322221wrx.71.2019.11.12.20.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 20:38:19 -0800 (PST) From: Wambui Karuga X-Google-Original-From: Wambui Karuga Date: Wed, 13 Nov 2019 07:38:00 +0300 (EAT) To: Wambui Karuga , maarten.lankhorst@linux.intel.com, mripard@kernel.org, sean@poorly.run, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org cc: daniel@ffwll.ch Subject: Re: [PATCH] drm/print: add DRM_DEV_WARN macro In-Reply-To: <20191112182705.GL23790@phenom.ffwll.local> Message-ID: References: <20191112170909.13733-1-wambui.karugax@gmail.com> <20191112182705.GL23790@phenom.ffwll.local> User-Agent: Alpine 2.21.99999 (LNX 375 2019-10-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Nov 2019, Daniel Vetter wrote: > On Tue, Nov 12, 2019 at 08:09:09PM +0300, Wambui Karuga wrote: >> 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 > > Can you pls include this in the patch to add the first user with rockchip? > Otherwise always a bit awkward when we add functions without callers. > Okay, I'll send that as well. Thought it'd be better to get this accepted first. wambui > lgtm otherwise. > -Daniel > >> --- >> 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 >> > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch >