From patchwork Mon Sep 25 09:45:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wajdeczko X-Patchwork-Id: 9969517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D4E80602CB for ; Mon, 25 Sep 2017 09:46:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C74581FF60 for ; Mon, 25 Sep 2017 09:46:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC0CC204BD; Mon, 25 Sep 2017 09:46:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4D1411FF60 for ; Mon, 25 Sep 2017 09:46:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8621E6E1D9; Mon, 25 Sep 2017 09:46:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id E29E16E1D9 for ; Mon, 25 Sep 2017 09:46:05 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2017 02:46:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,435,1500966000"; d="scan'208";a="903552005" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2017 02:46:02 -0700 Received: from mwajdecz-MOBL1.ger.corp.intel.com (mwajdecz-mobl1.ger.corp.intel.com [172.28.174.150]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id v8P9k1FM001719; Mon, 25 Sep 2017 10:46:01 +0100 From: Michal Wajdeczko To: intel-gfx@lists.freedesktop.org Date: Mon, 25 Sep 2017 09:45:48 +0000 Message-Id: <20170925094551.15052-1-michal.wajdeczko@intel.com> X-Mailer: git-send-email 2.10.1.windows.1 In-Reply-To: <20170922142726.44532-1-michal.wajdeczko@intel.com> References: <20170922142726.44532-1-michal.wajdeczko@intel.com> Cc: Jani Nikula Subject: [Intel-gfx] [PATCH v2 1/3] drm/i915: Make I915_PARAMS_FOR_EACH macro more flexible X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We should not add trailing ; after each member allow other than statements-style uses of this helper macro. While here s/func/param for clarity. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Nikula Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_params.h | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index a2cbb47..0116bb9 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -27,50 +27,50 @@ #include /* for __read_mostly */ -#define I915_PARAMS_FOR_EACH(func) \ - func(char *, vbt_firmware); \ - func(int, modeset); \ - func(int, panel_ignore_lid); \ - func(int, semaphores); \ - func(int, lvds_channel_mode); \ - func(int, panel_use_ssc); \ - func(int, vbt_sdvo_panel_type); \ - func(int, enable_rc6); \ - func(int, enable_dc); \ - func(int, enable_fbc); \ - func(int, enable_ppgtt); \ - func(int, enable_execlists); \ - func(int, enable_psr); \ - func(int, disable_power_well); \ - func(int, enable_ips); \ - func(int, invert_brightness); \ - func(int, enable_guc_loading); \ - func(int, enable_guc_submission); \ - func(int, guc_log_level); \ - func(char *, guc_firmware_path); \ - func(char *, huc_firmware_path); \ - func(int, use_mmio_flip); \ - func(int, mmio_debug); \ - func(int, edp_vswing); \ - func(int, reset); \ - func(unsigned int, inject_load_failure); \ +#define I915_PARAMS_FOR_EACH(param) \ + param(char *, vbt_firmware) \ + param(int, modeset) \ + param(int, panel_ignore_lid) \ + param(int, semaphores) \ + param(int, lvds_channel_mode) \ + param(int, panel_use_ssc) \ + param(int, vbt_sdvo_panel_type) \ + param(int, enable_rc6) \ + param(int, enable_dc) \ + param(int, enable_fbc) \ + param(int, enable_ppgtt) \ + param(int, enable_execlists) \ + param(int, enable_psr) \ + param(int, disable_power_well) \ + param(int, enable_ips) \ + param(int, invert_brightness) \ + param(int, enable_guc_loading) \ + param(int, enable_guc_submission) \ + param(int, guc_log_level) \ + param(char *, guc_firmware_path) \ + param(char *, huc_firmware_path) \ + param(int, use_mmio_flip) \ + param(int, mmio_debug) \ + param(int, edp_vswing) \ + param(int, reset) \ + param(unsigned int, inject_load_failure) \ /* leave bools at the end to not create holes */ \ - func(bool, alpha_support); \ - func(bool, enable_cmd_parser); \ - func(bool, enable_hangcheck); \ - func(bool, fastboot); \ - func(bool, prefault_disable); \ - func(bool, load_detect_test); \ - func(bool, force_reset_modeset_test); \ - func(bool, error_capture); \ - func(bool, disable_display); \ - func(bool, verbose_state_checks); \ - func(bool, nuclear_pageflip); \ - func(bool, enable_dp_mst); \ - func(bool, enable_dpcd_backlight); \ - func(bool, enable_gvt) + param(bool, alpha_support) \ + param(bool, enable_cmd_parser) \ + param(bool, enable_hangcheck) \ + param(bool, fastboot) \ + param(bool, prefault_disable) \ + param(bool, load_detect_test) \ + param(bool, force_reset_modeset_test) \ + param(bool, error_capture) \ + param(bool, disable_display) \ + param(bool, verbose_state_checks) \ + param(bool, nuclear_pageflip) \ + param(bool, enable_dp_mst) \ + param(bool, enable_dpcd_backlight) \ + param(bool, enable_gvt) -#define MEMBER(T, member) T member +#define MEMBER(T, member) T member; struct i915_params { I915_PARAMS_FOR_EACH(MEMBER); };