From patchwork Mon Jan 6 17:23:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bharadiya X-Patchwork-Id: 11319721 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D233138D for ; Mon, 6 Jan 2020 17:28:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35A5F20731 for ; Mon, 6 Jan 2020 17:28:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35A5F20731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBED96E4EA; Mon, 6 Jan 2020 17:28:45 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 957856E4DE; Mon, 6 Jan 2020 17:28:44 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2020 09:28:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,403,1571727600"; d="scan'208,217";a="225496157" Received: from plaxmina-desktop.iind.intel.com ([10.106.124.119]) by fmsmga001.fm.intel.com with ESMTP; 06 Jan 2020 09:28:40 -0800 From: Pankaj Bharadiya To: rodrigo.vivi@intel.com, irlied@linux.ie, daniel@ffwll.ch, sudeep.dutt@intel.com, jani.nikula@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Mon, 6 Jan 2020 22:53:26 +0530 Message-Id: <20200106172326.32592-8-pankaj.laxminarayan.bharadiya@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200106172326.32592-1-pankaj.laxminarayan.bharadiya@intel.com> References: <20200106172326.32592-1-pankaj.laxminarayan.bharadiya@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [RFC 7/7] drm/i915: Make WARN* device specific for various cases. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Device specific WARN* calls include device information in the backtrace, so we know what device the warnings originate from. Covert all the calls of WARN* with device specific dev_WARN* variants in functions where any one of intel_pm, intel_encoder, i915_perf_stream or intel_crtc_state struct pointer is available. The conversion was done automatically with below coccinelle semantic patch. checkpatch errors/warnings are fixed manually @@ identifier func, T; @@ func(struct intel_vgpu *T,...) { <... ( -WARN( +dev_WARN(vgpu_to_dev(T), ...) | -WARN_ON( +dev_WARN_ON(vgpu_to_dev(T), ...) | -WARN_ONCE( +dev_WARN_ONCE(vgpu_to_dev(T), ...) | -WARN_ON_ONCE( +dev_WARN_ON_ONCE(vgpu_to_dev(T), ...) ) ...> } @@ identifier func, T; @@ func(struct intel_encoder *T,...) { <... ( -WARN( +dev_WARN(enc_to_dev(T), ...) | -WARN_ON( +dev_WARN_ON(enc_to_dev(T), ...) | -WARN_ONCE( +dev_WARN_ONCE(enc_to_dev(T), ...) | -WARN_ON_ONCE( +dev_WARN_ON_ONCE(enc_to_dev(T), ...) ) ...> } @@ identifier func, T; @@ func(struct i915_perf_stream *T,...) { <... ( -WARN( +dev_WARN(perf_stream_to_dev(T), ...) | -WARN_ON( +dev_WARN_ON(perf_stream_to_dev(T), ...) | -WARN_ONCE( +dev_WARN_ONCE(perf_stream_to_dev(T), ...) | -WARN_ON_ONCE( +dev_WARN_ON_ONCE(perf_stream_to_dev(T), ...) ) ...> } @@ identifier func, T; @@ func(struct intel_crtc_state *T,...) { <... ( -WARN( +dev_WARN(crtc_state_to_dev(T), ...) | -WARN_ON( +dev_WARN_ON(crtc_state_to_dev(T), ...) | -WARN_ONCE( +dev_WARN_ONCE(crtc_state_to_dev(T), ...) | -WARN_ON_ONCE( +dev_WARN_ON_ONCE(crtc_state_to_dev(T), ...) ) ...> } command: spatch --sp-file