Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1377412ybt; Sat, 11 Jul 2020 08:15:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTEJNNXYsn3pbQGt/Xr7/AcYfiCXCAQPKovrjG8uIY+ZiBbttOxWJew0etrtYFuQPKU+cG X-Received: by 2002:a17:906:ae56:: with SMTP id lf22mr65138888ejb.59.1594480500031; Sat, 11 Jul 2020 08:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594480500; cv=none; d=google.com; s=arc-20160816; b=GpC5Vrw7ag0F6JGhrUQyUwZNBuII7+xq/41EpYU2pXlzZxg86DMuFtLMa9fjcpSu9Y XhKzJKTEoirZZC/fCqPpjfcnhuQqOWvc3nPBzFwIOjL0WXxxHFUlar6jhCDhbsysdGNw M+kZP6E2BYy7/Gg+YO+03ePpaDOdGD8okg3/O10Ck5xn7Io8n+gjMjM6bbWl4tlgE9L1 m6RD4PbqKvK941Mk32LomgJZpUjlv05Fe1m7jICIMEQ7e8LgPQr1x4a1W/YZ9fch58LJ c/Ctv8oEjboOmqKcfvPu2BHEhmi3xrOnhryp0ni3l0eMLOdGxnD3slF4PNiowh7QQCvL hwrg== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=lbJbJXyaa2RJSRZCkASSTZMtfB5x5A2cZspWwqiACVA=; b=ZVrc0CJNb4173Dw3SRtR3dbzuQCMIABgVhlCwItij9XMvzFctEi6JmwGyjjxX3p5qg ULeuJp8YiazX7XOfEkXdmKu/pi01GZyjXo8EGvOeK00F3fznjdvaDa+SCAHlssgxNs0W et0iUuKu8Mcap0Fv/EYf7cKK3u/i6EYtrJi+y2yfJRv+iDGxbYLTL6ExFmDTns6QptOC vKlUhLVM1kmydL30xW1h7PspQQg2vvpiwKPccftdYJkF2fQXsOAv5FeolACgrAmhr5Ew KAGGBoIGxfeon/uoIvH9phAsJcn41Omi1i41FgcKDOsjtAXhopDuUMnJJn8pYr41aJIK aAtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VrpLtn8B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l9si6115992edn.77.2020.07.11.08.14.36; Sat, 11 Jul 2020 08:15:00 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VrpLtn8B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728399AbgGKPLn (ORCPT + 99 others); Sat, 11 Jul 2020 11:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbgGKPLn (ORCPT ); Sat, 11 Jul 2020 11:11:43 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6F2CC08C5DD for ; Sat, 11 Jul 2020 08:11:42 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id mn17so3844333pjb.4 for ; Sat, 11 Jul 2020 08:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lbJbJXyaa2RJSRZCkASSTZMtfB5x5A2cZspWwqiACVA=; b=VrpLtn8BFfqScK+tfsGIQIM0I62BHK7OEuBdoY9pcFhvzT5ES86WFeUflbJhIgxglL WshaO2OUM0C2mTqYrXp2sqW0kqFZvb4CS3RkJ3Sig4YEDRprWE6SOV4U4BvjZ3DdPD7R I6dISToOqhIcGSxDjRRZ8gzPnrVk1mNWLDmKaXOM4INSdN6j82JACqZA1/g5ywnnHVTJ F5OJsx7Xf9u1Gidm0bvqOhmkh09hHlIFxSuxrt0yL7Vcm2uwdEI6/hMZK/vdiDscCkf3 hzORaculqZoLGkYPfURxYpGwEczH9j7DAKkClcgf/bKUukWVUgovy8GYCLpghG3BJBd4 Z23g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lbJbJXyaa2RJSRZCkASSTZMtfB5x5A2cZspWwqiACVA=; b=Jm2mTPAbLLYuIJGQ72WB0w8ExAoXdjGGn3EuaDQPDY1Y69sWAr07xXw0sLZdQVWF4w bhYMJA2slYGmKmhPVjVm0+W7Dzq0gna690YWCOaSLxcBuD0vq4WOrRuHtXBB0kdOuMOP fs+39KVQ4qV0CFQ+ylHXMOw1HvJRETlYYUVqJvUOxusIL8tkNNeMombARvd3e1YWxhSl 9uK28/AgP2jleGoMackoHu2Ch1FVuZt80+HsIjk/vsHJUI0SY6fnL7GOFkpwSrAFXwwB 2uourIvvDW7TjxpAKUnm0abiWsterQtZAhIXfLXcFY1uytcaKVsIJ0lmrEW0wAio+w72 vVDw== X-Gm-Message-State: AOAM531muiOEAKHaA5DPILLIneQLq5MTjzgZx/gnoJqnuPNWapA5Lg8m xFuj25O6Wc7XaoE/oeui6n8yJ/FoH7rc8Q== X-Received: by 2002:a17:90a:1d06:: with SMTP id c6mr11678465pjd.194.1594480302299; Sat, 11 Jul 2020 08:11:42 -0700 (PDT) Received: from blackclown ([103.88.82.158]) by smtp.gmail.com with ESMTPSA id u66sm9156189pfb.191.2020.07.11.08.11.39 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Jul 2020 08:11:41 -0700 (PDT) Date: Sat, 11 Jul 2020 20:41:26 +0530 From: Suraj Upadhyay To: Sam Ravnborg , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 0/4] drm: core: Convert logging to drm_* functions. Message-ID: <20200711151126.GA12262@blackclown> References: <20200710175643.GF17565@ravnborg.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <20200710175643.GF17565@ravnborg.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 10, 2020 at 07:56:43PM +0200, Sam Ravnborg wrote: > Hi Suraj. >=20 > On Tue, Jul 07, 2020 at 10:04:14PM +0530, Suraj Upadhyay wrote: > >=20 > > This patchset converts logging to drm_* functions in drm core. > >=20 > > 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(). >=20 > 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. >=20 > 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.or= g/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_ed= id). 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 situati= on a context. > 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. Thanks. > Sam >=20 > >=20 > > 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. > >=20 > > 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(-) > >=20 > > --=20 > > 2.17.1 > >=20 > >=20 >=20 >=20 >=20 > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel >=20 --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7AbCa0kOsMJ4cx0j+gRsbIfe744FAl8J1pYACgkQ+gRsbIfe 746Vlw/8CtZ9XbPZ/Iyno9amywRwx9keWlGzO8cypYgKaz46i/ez9jMqhkgsOvm8 EFv/TYk5rNnxe46XDSMM1NL+HhrXjZMBtu9eMLQNV/MlA8U/bgxLZVDo7BOizIk9 eBVDF9U8rvw3Y5HjUP6v0pDoHpKiR0r6/Zxa7AvGh6uFugIfCUU/qelBkFoAnlkA 3KHTnqgHZTlpdmMgmIwpasya1bPvm4TV60m5WaN+Gz1pWbqyAOqlroKOaHqoFRcs yWCqUw109yOQqHVFJ1SHFTAsBtUcrx3ndbSj4GiWsprQBI1OFBngxfFjprxgTD6a lyp2c8tWDm1kwJv8HHfFGyUG8uYaUfjxQw9bstkPdhp9z0YaAUOlpXj9uf/bQRIV 71M6febZ1+zEyEm+sVgbgxGwLz7GBc9Efp0tNryDXGfkZBXilxzi7MDEKm/M6SW7 OEXqls0XJS9kwLd8APdIokiWvM/3KJ9o65MPn6kvztcoXkoc8sxyUhKC8QmCMX7T ijdanU91MirbNlgF/mAnLXSHSDfm2lh3xUWHgAPkvOe/tIb9j16P+71yM9bZdmj1 fS3dpzlRrHGEFQTRvBRMwr5X4HyrF9YNCe6gn46TzW6GQmdFnG6F0rngd7p8vN/9 g/hAC8NcFwnS5eVhVecAUp33OkxIy4x26F0CuONdbP7GXHvhdew= =XNjR -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG--