Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1480476ybh; Thu, 16 Jul 2020 13:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRGU5aU8ISDXyre4mLY5RoBvLmZdfP8nlKch0gXmur6nKB2bowjab00n3yBLlT0LVtCZz/ X-Received: by 2002:a17:907:11db:: with SMTP id va27mr5688157ejb.175.1594930968572; Thu, 16 Jul 2020 13:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594930968; cv=none; d=google.com; s=arc-20160816; b=puwL/tCGwp2L4pGzMFtJ+pGZ6IlAeeXbejHQFdKb8OyHu2u+2oh9NEvDbM0tU4+y6p QrpE7bkBbeRDFQnA+2zzxrNHcs0OlE+Hkxbh9msT55PTO0DPOTOQsdBuHbyPKoSlHeCc 6EqvN5mHcTsUh7lLWhYS47G1VZ5SPTJdjwZVmgoVeEHulRqJy0Vg15fWLX3m1IeBAs9o vJlj1LhA3XWhu2LfhuuIgysVkKhkIcVYvcFSdWb/mFnQbdPK2bMfz7TDjYQ42ta2a0eH zNwt1IR11f/MgcZe6pqB7auPSLc7rslYvC67gYMpN4kiGKX/M0gLlPppvY/iGa49RmvL 98PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wmY4mKp8cQgMZoBbv4tQZhuwcgXvNn0fejDcJ/7EL6s=; b=NZY68ofM7kWyEkN1RKVCyyrv5K+xCa3/j2N/W2hrwJTiQz9oMJBtQ13qvaOV5uxr5m GmwhYaT9iHT8B4syVv/jkbLglQkpo2UJgkguVjpBK2zD0j5yQqUnHrFoM1lq8jjTbFgw MJ1GGx8iIICbuGJJR200Ds0InEujeqjdFDCAaR/v9KqZuU7kSbOIEwoDN/3x0B86nb8u bG/X7xpz2muTOeCbsJzayQ99xM1yS8NBemRwib6tNjjKsmmi+5zPvrWmYCt7ubhb50tp rR+qC7Ru6UWR69XLCnCQqkdqxmNlXf1VJjcsj91umr0W7ZID9V0D0fIRX7bXniw5I1vw nJCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 1si3840359ejo.509.2020.07.16.13.22.25; Thu, 16 Jul 2020 13:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729507AbgGPUTb (ORCPT + 99 others); Thu, 16 Jul 2020 16:19:31 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:50612 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbgGPUTb (ORCPT ); Thu, 16 Jul 2020 16:19:31 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 1D3A520039; Thu, 16 Jul 2020 22:19:28 +0200 (CEST) Date: Thu, 16 Jul 2020 22:19:26 +0200 From: Sam Ravnborg To: Suraj Upadhyay Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 0/4] drm: core: Convert logging to drm_* functions. Message-ID: <20200716201926.GE2254583@ravnborg.org> References: <20200710175643.GF17565@ravnborg.org> <20200711151126.GA12262@blackclown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200711151126.GA12262@blackclown> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=f+hm+t6M c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=e5mUnYsNAAAA:8 a=M7-yi6CMk_IXB4dErxsA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Suraj. On Sat, Jul 11, 2020 at 08:41:26PM +0530, Suraj Upadhyay wrote: > On Fri, Jul 10, 2020 at 07:56:43PM +0200, Sam Ravnborg wrote: > > Hi Suraj. > > > > On Tue, Jul 07, 2020 at 10:04:14PM +0530, Suraj Upadhyay wrote: > > > > > > This patchset converts logging to drm_* functions in drm core. > > > > > > The following functions have been converted to their respective > > > DRM alternatives : > > > dev_info() --> drm_info() > > > dev_err() --> drm_err() > > > dev_warn() --> drm_warn() > > > dev_err_once() --> drm_err_once(). > > > > I would prefer that DRM_* logging in the same files are converted in the > > same patch. So we have one logging conversion patch for each file you > > touches and that we do not need to re-vist the files later to change > > another set of logging functions. > > Agreed. > > > If possible WARN_* should also be converted to drm_WARN_* > > If patch is too large, then split them up but again lets have all > > logging updated when we touch a file. > > > > Care to take a look at this approach? > > > > Hii, > The problem with WARN_* macros is that they are used without any > drm device context. For example [this use here](https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/drm_edid.c#n1667) in drm_edid.c, > doesn't have a drm device context and only has one argument (namely !raw_edid). > There are many more such use cases. > > And also there were cases where dev_* logging functions didn't have any > drm_device context. > > I would be very glad, if we came up with a possible solution to this > problem. I think we should develop drm_* logging APIs which could print > contextless logs (which would possibly be midlyering) or give every situation a context. This was discussed in the past. For now the focus is migrating existing logging to the new drm_ based logging. Preferably using coccinelle. when we are more or less covered there we can discuss if we will add more logging functions. > > > Also please consider if coccinelle can make this job easier. > > There is a lot of files... > > I totally agree with you. I will remember this next time. > > But here, in this patchset I have tried to convert all possible > cases of conversion, i.e. I have changed logging wherever there was a > drm_device context. Please note this in the changelog when you resend. I delete your original patches so they are gone now from my mail-box. Yeah, could dig them up somewhere, but it is easier to let you resend them and then we can have an updated changelog too. Sam > > Thanks. > > > Sam > > > > > > > > Suraj Upadhyay (4): > > > drm: mipi-dsi: Convert logging to drm_* functions. > > > drm: mipi-dbi: Convert logging to drm_* functions. > > > drm: edid: Convert logging to drm_* functions. > > > drm: fb-helper: Convert logging to drm_* functions. > > > > > > drivers/gpu/drm/drm_edid.c | 7 +++---- > > > drivers/gpu/drm/drm_fb_helper.c | 2 +- > > > drivers/gpu/drm/drm_mipi_dbi.c | 4 ++-- > > > drivers/gpu/drm/drm_mipi_dsi.c | 15 +++++++-------- > > > 4 files changed, 13 insertions(+), 15 deletions(-) > > > > > > -- > > > 2.17.1 > > > > > > > > > > > > > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel