Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1495924ybl; Thu, 30 Jan 2020 00:35:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzMBEpxwfb0KGsiXk0HsLHU+FOCC7v3Lrh5c2VOrxZE+0AsIKsyl5UUQKJNTduInTDm9UXP X-Received: by 2002:a05:6830:1d5b:: with SMTP id p27mr2548455oth.263.1580373310190; Thu, 30 Jan 2020 00:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580373310; cv=none; d=google.com; s=arc-20160816; b=xX6WV/93ODvT/2w15NX42sbqTeHgQIwlEsIqd/sMi6SRi3OMprG2k8DqV4KelPvASB ZFiac9GNmXwM27OEyNidsvJ8Rz3Nby9ySHQv/9VR+YYi8GShPIS5Qs14J1jxuRdJ5pbF bai6xu2+KXytE/5u4aEmR2l4/UH0Yki8yuZSW6+edrppm2HUqDrruW3YG460vvG2Aw+A AsXNutlzHcAnNzGfp4vhQ/cL4xLG979a1F5MVukBuvE92UitPlw+gF+Zo4tsXMTVCJMS MaGJYfrmsCVGvLTQK0xKNlS8FjV40iWgW21TBlbrJ5hRUPoFHEPD4FQ1VCLfHZUk7zSS hqLQ== 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=TsYYlR0H8+3dQ4sHbB6QwaVOLKz9hOJEYsIrLuaV02I=; b=1GKLdVROyrX+Q/hUMJIRwwS44yQM0RScRsfObhTOMJHxDupFVej4hda1gWZ6QRssGb DwvPU9EDBHzdq5tSOlho1x+py53H/Vbwtx4GKNesCyI0sJF+LsuXQaSOSvP/lnTtIidJ 0XLvwFDsSIiZu78n6/P4waHzMJpfu/n26iKE14J5IxOWiEVeypN6RCGepbUntM0kT4xL mnOdTUJk4YlWlBMnbs18/QB8rLaLW2EgNk1IURsTRRcbfXPibMpeac/IW/XaEeffB1+I c2lHezbjYRTJYfS2dpJb0HGOONcegbgG4rB2M5spUod/rPI3yThCh/amDo0J0PCsHN2i 988Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OV0g5ehL; 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 25si2348587oiz.230.2020.01.30.00.34.58; Thu, 30 Jan 2020 00:35:10 -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=OV0g5ehL; 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 S1727364AbgA3IdT (ORCPT + 99 others); Thu, 30 Jan 2020 03:33:19 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46490 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbgA3IdR (ORCPT ); Thu, 30 Jan 2020 03:33:17 -0500 Received: by mail-wr1-f66.google.com with SMTP id z7so2851002wrl.13 for ; Thu, 30 Jan 2020 00:33:15 -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=TsYYlR0H8+3dQ4sHbB6QwaVOLKz9hOJEYsIrLuaV02I=; b=OV0g5ehLnpgelN3GOQsCVZjGTwF9RvG8qj9YaJzrgjzLWhmgvhTnjDYvRiy+/mjGBY ys1K/H16dPB1rt2dUSxMAr7+kbs28MqWHMlhtlnVmReFa/UFt+d3y2F7fZiRnimRN5WG 5fdSgegAuFokTU0SlkOSRThamFYGFSCNjBPKhXZ0KF99HE7ZTBMIScCYGBct5HZvtyWc vuGzVcAw2NO45gLXJnLf5JigB0aDe56DqQb8/qi/I//y47YVkZHnJ9P5M8mKAKmHZFJN OqM45//pyWyU+eC+HwfNGL5WHUR/+1J8OW4i5iFS9cUdfjibxhHxtGrUJbHtZF+Fzkjt Z1Tw== 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=TsYYlR0H8+3dQ4sHbB6QwaVOLKz9hOJEYsIrLuaV02I=; b=DeGnRmDR2kyqSzm6EvYDKFq9Rj+WppsBwaH5ZyS4MfvmNuQSO4I0dDwFhRChgJozQV F0+WIwEj5wRZtiBBf8Z4PE3Z9PcSbM9v00D1Y/3LutdVoiEwrWtKTeYWaWUf0T+RPWWX oAjyNPL+KSuW1ekdqgrt06MyrsNL8h8F8zZHTErz4Ple0Oc8DgZzixSOnWlG9z6EGT/o NjS2e3lu5GebYt4XDOALR5Ewa4Yu75k4MFtcKgfY9630tMb5YujXzSvW1MFgFHyG4JOP xY9uYAtdL5Wiro9oPkppG1tdjuJQA5HeI8y/eDoMqfV1Lw/RxDBHBisHF3jTUITxTVT+ ON0Q== X-Gm-Message-State: APjAAAWMYx6msaKzvja3epSyda+DFPk/PEOLbZF2FWhxm7xC4Xu8o173 i7szQkXnkBLVKAUjkysYKBu24b+zSt0= X-Received: by 2002:a5d:4446:: with SMTP id x6mr3977081wrr.312.1580373195006; Thu, 30 Jan 2020 00:33:15 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id i11sm6363678wrs.10.2020.01.30.00.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2020 00:33:14 -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 11/12] drm/i915/pipe_crc: automatic conversion to drm_device based logging macros. Date: Thu, 30 Jan 2020 11:32:28 +0300 Message-Id: <20200130083229.12889-12-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130083229.12889-1-wambui.karugax@gmail.com> References: <20200130083229.12889-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 various instances of the printk based logging macros to the new struct drm_device based logging macros in i915/display/intel_pipe_crc.c using the following coccinelle script that transforms 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_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_DRIVER( +drm_dbg(&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_DRIVER( +drm_dbg(&T->drm, ...) | -DRM_DEBUG_KMS( +drm_dbg_kms(&T->drm, ...) | -DRM_DEBUG_ATOMIC( +drm_dbg_atomic(&T->drm, ...) ) ...+> } Checkpatch warnings were addressed manually. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c index b83062201212..d071a1604590 100644 --- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c +++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c @@ -570,7 +570,7 @@ int intel_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name, enum intel_pipe_crc_source source; if (display_crc_ctl_parse_source(source_name, &source) < 0) { - DRM_DEBUG_DRIVER("unknown source %s\n", source_name); + drm_dbg(&dev_priv->drm, "unknown source %s\n", source_name); return -EINVAL; } @@ -595,14 +595,15 @@ int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name) bool enable; if (display_crc_ctl_parse_source(source_name, &source) < 0) { - DRM_DEBUG_DRIVER("unknown source %s\n", source_name); + drm_dbg(&dev_priv->drm, "unknown source %s\n", source_name); return -EINVAL; } power_domain = POWER_DOMAIN_PIPE(crtc->index); wakeref = intel_display_power_get_if_enabled(dev_priv, power_domain); if (!wakeref) { - DRM_DEBUG_KMS("Trying to capture CRC while pipe is off\n"); + drm_dbg_kms(&dev_priv->drm, + "Trying to capture CRC while pipe is off\n"); return -EIO; } -- 2.25.0