Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp873356ybc; Tue, 12 Nov 2019 10:30:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwpX8228QyzFdVJag9tzy+cjmVO9TJfF5UWQtJN+8so5ajO/KeZA0tkCAAezsqVuA15CsiH X-Received: by 2002:a17:906:6011:: with SMTP id o17mr28674052ejj.172.1573583421381; Tue, 12 Nov 2019 10:30:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573583421; cv=none; d=google.com; s=arc-20160816; b=vCKKM2EvlEra/Quqkwjq+G23wphDIPLI5RNZuzWVr5+fuoqgeMLg9hm2l58oHuXivF Z5Skc1t8xSGVOKovsO2oRgEqTyJ/RJuVjPKEy1iwbxbT0Q8rnYqIYHGhUP6s4jz6Dp/U TT6EEgL9hGyEaFUe/vWlmYkpuycIOI0zVH9VNvQT8nxx8KVMFKzrTBQCJYsGZPJ+N3Yn DTTxjPj3JuKw9U3lj4vwTD2JCeD09Irj2ecy8768PX4Ocyqrl7CQj4e28hg7+r8LQ0Uv GHeF9z4+b1lYQZN6jnf0h/fLo8ylhDueQhvCefExB04RyYLOCCmZpmbl43XI0MvIXYv6 irXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=+1crLA0CDKaHQwRJPotAhe5OcKExhLg2j+GgM+2/R+w=; b=A/bu7wwVMt/GlNRUpBOFMW3suJ0EQlkC6AXZoS+2S0cHzYmM17y4TKqlNe2s532bGz r6HeFvJQltQ+BQeh8c0ucDOoEVqUBZxzRGnWadwxdwHqSA+4paNFfVs/joHiJLdAucgs 4wtEMoT5S/D+52PI9Oigz+WveMMwVuDqCAaXd/9fYElASfROH0DGgfv7Xi7c3T+l2yCy 8P2IOVh9vgsiRuYbhAKMGeqsqIz0k2bWe0l3ayDuEUkpeitDGFvevaVeIBnPM5mUoC3g mJD8z82N23Yk6lHabWp77lttx1KjH15DdYXkF3cVYyaw6KfmVCB8u3w4W8brLVrtBbhd g5vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=WOTe4Rk+; 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 gr10si493115ejb.414.2019.11.12.10.29.56; Tue, 12 Nov 2019 10:30:21 -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=@ffwll.ch header.s=google header.b=WOTe4Rk+; 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 S1727021AbfKLS1K (ORCPT + 99 others); Tue, 12 Nov 2019 13:27:10 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43526 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbfKLS1K (ORCPT ); Tue, 12 Nov 2019 13:27:10 -0500 Received: by mail-wr1-f66.google.com with SMTP id n1so19619637wra.10 for ; Tue, 12 Nov 2019 10:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+1crLA0CDKaHQwRJPotAhe5OcKExhLg2j+GgM+2/R+w=; b=WOTe4Rk++ZKTe5OkVwhtp2PBDWd64FRPeMbBRl6vaLQK18RMPEdPfYp1O3CW8xOoY9 Uf6XLg3iOFbWpfV6RgKHYqs+4Q1kv18AyOlSw7nERne80NjZneMrQHdcN76U6zjQI4RW baX285iYeAGi75nrGFHBLd22pKNgZQ55b3fSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=+1crLA0CDKaHQwRJPotAhe5OcKExhLg2j+GgM+2/R+w=; b=hwFaDkiwpQmOOLGwDKXO6mbplsaGRFx/7sRX7rVx4/04ieJOWCySashFAudtv4Nafk t50ASI8amrB04vc7coib6HQB1yb81rTTW4oWegTX3yFD+UfgeJHa9kFupk+VI4e5jbUU R/5fbAhMNuaJ2WJ2pSgq9X6ixXANFBZbMhX6k+PdiH8xha1nxEEaU3ckxx8inYhEQhs6 ljauHgU398HoMcQCXgHuYdbNIaGuLa7SujkN5gmjn8Fca8D00JXYDEthBCUoZRL0UlZi rJklYBM566uFL567JsMVMuSQ4456IyIaWHH9g6yOl1KPhaToK2/aFUexX8JJAlaQejz9 pXuQ== X-Gm-Message-State: APjAAAXQcUMwn0SdrdNEqZjjHxnRbjInLdX18OOvaKZ1p02YdCUNhlKB QzwofoU/2ZvyP5i1zaEjAmeULg== X-Received: by 2002:adf:ed4e:: with SMTP id u14mr27912754wro.132.1573583228225; Tue, 12 Nov 2019 10:27:08 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id d202sm3980158wmd.47.2019.11.12.10.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 10:27:07 -0800 (PST) Date: Tue, 12 Nov 2019 19:27:05 +0100 From: Daniel Vetter To: Wambui Karuga Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/print: add DRM_DEV_WARN macro Message-ID: <20191112182705.GL23790@phenom.ffwll.local> Mail-Followup-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 References: <20191112170909.13733-1-wambui.karugax@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191112170909.13733-1-wambui.karugax@gmail.com> X-Operating-System: Linux phenom 5.2.0-3-amd64 User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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