Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1230945ybv; Thu, 6 Feb 2020 00:03:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxvc2UKxY5xVATN4Qz0I+AG6ZvOdXknH5CT78pCD68TGuQqYjBfIK5xfTWNGLNjONyL2L7E X-Received: by 2002:aca:503:: with SMTP id 3mr6225377oif.106.1580976205969; Thu, 06 Feb 2020 00:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580976205; cv=none; d=google.com; s=arc-20160816; b=vKuvKlVvbP0cH8TE53RM5iQYmqt+4aFzQPWbBzkWayUlT3S41ADDOqiHguAWMsxVeN 2iRVoapkpXnr9M8UEHofhxMNjjlvD4shQe1rrALr3DywxyZMe397gzZjSfHZ085qCKYc sA472lrAo5jpvk5FpvOe9HFCE/RKusQ3jqB12+ZG+z9JArJakh9j27QpBkt2ADnx4nt+ NA05T/9uXt3vNdoZWELEbxYpC5wSg66Yzw+z3Qj1w93qhQwFQ34WS/OzCQr/bMEhEuJ3 jgReQ5ipDpO8wIBrzGAlUZ8a4hbsVNMRwmQN7uZfRa7lGSpSfqI/r1qmoR+L2AU0Nk3y BFRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GF+GwZVlFfWX394NfNiHt+gnPUWs7Vyd/x0Y4+mn0tM=; b=cMHf/FgNCrdPr18QLKqoAq6kj3r4OVTlsY6oz0aqL5xaH1es6cESnh+pOamDqyS3rt EOt1kjlYOjUsD0u3wwZDqy6JYkCg9FT1AmoVWnBy3QucHJAjijLSNVlHRlrZicE0B04F Hx4KpCvj/Er9kkZI3CMLDrk+1aLR/q27ETw4lr6vHCfnKot1ZAAL8POQaKLLWFhOa6hP Ox21uEPRRzLzKiNvkH92Guw/9sV9YLEFeOoPw3HDYcZLIV++p4ZmICPZlSKxUlp0edGk 7UdGYSi4Kl/vxz8E3y/fzjVYkS0DNtWFJrFGDTxn34OB7OfTViHLKG83EuVyVdUkqz1j 0wRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QNthv9lv; 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 e8si1603527oie.96.2020.02.06.00.03.13; Thu, 06 Feb 2020 00:03:25 -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=QNthv9lv; 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 S1728388AbgBFIA5 (ORCPT + 99 others); Thu, 6 Feb 2020 03:00:57 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34652 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728055AbgBFIAz (ORCPT ); Thu, 6 Feb 2020 03:00:55 -0500 Received: by mail-wr1-f66.google.com with SMTP id t2so5951736wrr.1 for ; Thu, 06 Feb 2020 00:00:53 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=GF+GwZVlFfWX394NfNiHt+gnPUWs7Vyd/x0Y4+mn0tM=; b=QNthv9lvjk8WgJGMBvtOmYYtJUxJnDQpIorUEni4zx8ayZy4etFIqyv/EZtpIQUZz8 nc+ERxwsG2hIh9P3q3GfEA4225MBtji50hmxTH2GJmHdSxOOB52epxJyUZ4mNsOSIjxo bDqAaFXKGU8gtm5UJBY23N0/Bt04AD36zS+h6wYcIqXuRjE15zg3u2zWIWV17FfCoGwO lTGJGhK8FlXKm6v56yqiY4Uh6Iyh9EcU1K0DXm9OElGgq+YqlG7SHLQL8JoAvOHj6V4K NdcBG2wKX237+yyyUDVjDB84EQkbicdHGUQSheOJErHlJDfQA4hOPZZtkY+f8Ql/vA6e G8fg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=GF+GwZVlFfWX394NfNiHt+gnPUWs7Vyd/x0Y4+mn0tM=; b=DONXo0SNkpJpAtCXNpWP4rRbXQHWCRjEohgir2xI/yURHZ0j9CGVGMGdEehyTU1PVv NBlDXyFKYjcDelDNP4fSYFhRsDHiN+5IAp0qh57aYHD+TinObe9f49BAHGGkE1cKVeu7 B/GR01CQcINYiXEAuSQK3nx4vJearIqJ+DuEGfhzxtcTSKESmPFlMLe2DkkBneE8XUg8 kkP1W4DqPrftTN2QDJ4QqgwDtFgu0oJ25m8l6XmomOrEgqzpG1IX+ieJotdsqcWVwV4r 54+t8RuYc0t8p9w7Y01YrQVbtpw9/3srbxGr1UVZhrwXcNVnhq2j3R8qSnZnMKtoWQZQ czuQ== X-Gm-Message-State: APjAAAXFYXchqZ9JC5PMKHqAV9VRReLu60P89GEShbMl1nPsBa58FWmj QoinhTG8oNrG9YmIheGorGc= X-Received: by 2002:adf:ea0f:: with SMTP id q15mr2362010wrm.356.1580976053144; Thu, 06 Feb 2020 00:00:53 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id u8sm2635132wmm.15.2020.02.06.00.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 00:00:52 -0800 (PST) From: Wambui Karuga To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch Cc: sean@poorly.run, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/12] drm/i915/combo_phy: convert to struct drm_device logging macros. Date: Thu, 6 Feb 2020 11:00:09 +0300 Message-Id: <20200206080014.13759-9-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200206080014.13759-1-wambui.karugax@gmail.com> References: <20200206080014.13759-1-wambui.karugax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Conversion of the printk based drm logging macros to the struct drm_device based logging macros in i915/display/intel_combo_phy.c. This transformation was achieved using the following coccinelle script that matches based on the existence of a drm_i915_private device pointer: @@ identifier fn, T; @@ fn(...,struct drm_i915_private *T,...) { <+... ( -DRM_INFO( +drm_info(&T->drm, ...) | -DRM_ERROR( +drm_err(&T->drm, ...) | -DRM_WARN( +drm_warn(&T->drm, ...) | -DRM_DEBUG( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_DRIVER( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_ATOMIC( +drm_dbg_atomic(&T->drm, ...) ) ...+> } @@ identifier fn, T; @@ fn(...) { ... struct drm_i915_private *T = ...; <+... ( -DRM_INFO( +drm_info(&T->drm, ...) | -DRM_ERROR( +drm_err(&T->drm, ...) | -DRM_WARN( +drm_warn(&T->drm, ...) | -DRM_DEBUG( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_DRIVER( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_ATOMIC( +drm_dbg_atomic(&T->drm, ...) ) ...+> } This converts DRM_DEBUG/DRM_DEBUG_DRIVER to drm_dbg(). New checkpatch warnings were addressed manually. References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html Signed-off-by: Wambui Karuga --- .../gpu/drm/i915/display/intel_combo_phy.c | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c index dc5525ee8dee..9ff05ec12115 100644 --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c @@ -97,10 +97,11 @@ static bool check_phy_reg(struct drm_i915_private *dev_priv, u32 val = intel_de_read(dev_priv, reg); if ((val & mask) != expected_val) { - DRM_DEBUG_DRIVER("Combo PHY %c reg %08x state mismatch: " - "current %08x mask %08x expected %08x\n", - phy_name(phy), - reg.reg, val, mask, expected_val); + drm_dbg(&dev_priv->drm, + "Combo PHY %c reg %08x state mismatch: " + "current %08x mask %08x expected %08x\n", + phy_name(phy), + reg.reg, val, mask, expected_val); return false; } @@ -172,7 +173,8 @@ static void cnl_combo_phys_uninit(struct drm_i915_private *dev_priv) u32 val; if (!cnl_combo_phy_verify_state(dev_priv)) - DRM_WARN("Combo PHY HW state changed unexpectedly.\n"); + drm_warn(&dev_priv->drm, + "Combo PHY HW state changed unexpectedly.\n"); val = intel_de_read(dev_priv, CHICKEN_MISC_2); val |= CNL_COMP_PWR_DOWN; @@ -212,7 +214,8 @@ static bool ehl_vbt_ddi_d_present(struct drm_i915_private *i915) * in the log and let the internal display win. */ if (ddi_d_present) - DRM_ERROR("VBT claims to have both internal and external displays on PHY A. Configuring for internal.\n"); + drm_err(&i915->drm, + "VBT claims to have both internal and external displays on PHY A. Configuring for internal.\n"); return false; } @@ -308,8 +311,9 @@ static void icl_combo_phys_init(struct drm_i915_private *dev_priv) u32 val; if (icl_combo_phy_verify_state(dev_priv, phy)) { - DRM_DEBUG_DRIVER("Combo PHY %c already enabled, won't reprogram it.\n", - phy_name(phy)); + drm_dbg(&dev_priv->drm, + "Combo PHY %c already enabled, won't reprogram it.\n", + phy_name(phy)); continue; } @@ -368,7 +372,8 @@ static void icl_combo_phys_uninit(struct drm_i915_private *dev_priv) if (phy == PHY_A && !icl_combo_phy_verify_state(dev_priv, phy)) - DRM_WARN("Combo PHY %c HW state changed unexpectedly\n", + drm_warn(&dev_priv->drm, + "Combo PHY %c HW state changed unexpectedly\n", phy_name(phy)); /* -- 2.25.0