Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5472157pxb; Wed, 26 Jan 2022 12:49:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxLdr1updA6EUzPeo9Ng4FvyYCPq3GooP/lSjwMAHpAjNG9BbvdFkHId8a5BYH8OzL9mFX X-Received: by 2002:a17:903:18b:: with SMTP id z11mr127263plg.59.1643230164013; Wed, 26 Jan 2022 12:49:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643230164; cv=none; d=google.com; s=arc-20160816; b=Qghul7gxjvYs+EDMKYAoMX9KBdzKTByvP3qD1f9JCIvu5A/MEEnECSZW6kR4ZKdsCh 2DVarGCkiHya1GzAQJDYS6xTqBgIQqJRET++Fa6bXrmLbYH2X/mzYC0P7bo8OFkSxvzX VnREpsSPPTQg3mnaP7EkInhCm1MnqODt5Uq6c4Z5EhdF9HJ7bsaUIPJ2NurFdcZNVdxr rx605qMXPNBRJDWvkC8TmwuOqt9qsSzNqsKS0FyxKbUn5H1T+NubR4NJ5C/PdTv3H38Q KgFEmVB6FOS50w+jV5mfSqJogv733b4/ekKTkBPLtJAfSQ9oFS0lFTTiSBuMUzc/bS1/ LFvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wijjCFA/OmF4J6p0KAb9XSIOPZBqqX8bHQw/RCuCrqk=; b=H3XEJw6EVDljpDUVS1567cCtVnr60UasHhJAkLPSTO87lqxHDk4JrNApIE1BeaK3di RSIJX/GWFkBWFtkt1ar+Zf7psW1+bziH1DZHS2cjWK/uNF16d5OtiJX/9tQFKUYNP8yU zpWNN3bWOfuZ/zFyG1v13g9WAFYay4KUPX+ZJQlJKpzkb7u6x/pMXScBj4yTNr7pUUfD PgCgG3FXCyHWv4lfuYgXx3J2uKFLE50k7NQw6KfKeNlw8AxpCCi+LyfX3K2vD/W8FH6n Ga1bTLMTD5X42j1JaRCds9ZRx1JAfEFABiG+sM3nucSwLQHeqQ9xPfHG7KPy/CC0U4gf kfaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NT1x2iTM; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 135si294612pgc.430.2022.01.26.12.49.11; Wed, 26 Jan 2022 12:49:23 -0800 (PST) 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=@intel.com header.s=Intel header.b=NT1x2iTM; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239463AbiAZJkB (ORCPT + 99 others); Wed, 26 Jan 2022 04:40:01 -0500 Received: from mga05.intel.com ([192.55.52.43]:9277 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239260AbiAZJjf (ORCPT ); Wed, 26 Jan 2022 04:39:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643189975; x=1674725975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=85iCTNId4lPzWBpzYMS8JCGZJAAJPSmPWs4cBOEUnho=; b=NT1x2iTM0XAZDcIHfAUE9l9dZytFLiCL/cj9NsOwLiDi+s21uwMjM0z+ ZCx15S7GDAHlMwII7BJl0XqRwYM5cFHaKUz4dBr7S2IRGirSUbkx8zxMk +kTvLs213S8jZYmtIYQkiHnIab0QsZwiNs/8WK4W/YnU8ON/bCEhJS4hB TOUv3L270cJ01CJP7Pdh6jmmG4qDA/Zo49b304HyXzm4EjRmPnYPw0kl8 6bTi3KISu9JeBRbsEI9iBwic3dXyJZpHyAT0Io8zT9zhOxXe7QSXti5Jg V+oXt+v3GjY1DqwWZworPY9hStNxMvAs4O2lrICCEWs5ks/xn6LGJdB50 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="332869384" X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="332869384" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 01:39:30 -0800 X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="477433100" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.202]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 01:39:30 -0800 From: Lucas De Marchi To: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-security-module@vger.kernel.org, nouveau@lists.freedesktop.org, netdev@vger.kernel.org Cc: Alex Deucher , Andrew Morton , Andy Shevchenko , Andy Shevchenko , Ben Skeggs , =?UTF-8?q?Christian=20K=C3=B6nig?= , Chris Wilson , Daniel Vetter , David Airlie , "David S. Miller" , Emma Anholt , Francis Laniel , Greg Kroah-Hartman , Harry Wentland , Jakub Kicinski , Jani Nikula , Joonas Lahtinen , Julia Lawall , Kentaro Takeda , Leo Li , Petr Mladek , Rahul Lakkireddy , Raju Rangoju , Rasmus Villemoes , Rodrigo Vivi , Sakari Ailus , Sergey Senozhatsky , Steven Rostedt , Vishal Kulkarni Subject: [PATCH v2 07/11] drm/amd/display: Use str_yes_no() Date: Wed, 26 Jan 2022 01:39:47 -0800 Message-Id: <20220126093951.1470898-8-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220126093951.1470898-1-lucas.demarchi@intel.com> References: <20220126093951.1470898-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the local yesno() implementation and adopt the str_yes_no() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 26719efa5396..5ff1076b9130 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -23,6 +23,7 @@ * */ +#include #include #include "dc.h" @@ -49,11 +50,6 @@ struct dmub_debugfs_trace_entry { uint32_t param1; }; -static inline const char *yesno(bool v) -{ - return v ? "yes" : "no"; -} - /* parse_write_buffer_into_params - Helper function to parse debugfs write buffer into an array * * Function takes in attributes passed to debugfs write entry @@ -853,12 +849,12 @@ static int psr_capability_show(struct seq_file *m, void *data) if (!(link->connector_signal & SIGNAL_TYPE_EDP)) return -ENODEV; - seq_printf(m, "Sink support: %s", yesno(link->dpcd_caps.psr_caps.psr_version != 0)); + seq_printf(m, "Sink support: %s", str_yes_no(link->dpcd_caps.psr_caps.psr_version != 0)); if (link->dpcd_caps.psr_caps.psr_version) seq_printf(m, " [0x%02x]", link->dpcd_caps.psr_caps.psr_version); seq_puts(m, "\n"); - seq_printf(m, "Driver support: %s", yesno(link->psr_settings.psr_feature_enabled)); + seq_printf(m, "Driver support: %s", str_yes_no(link->psr_settings.psr_feature_enabled)); if (link->psr_settings.psr_version) seq_printf(m, " [0x%02x]", link->psr_settings.psr_version); seq_puts(m, "\n"); @@ -1207,8 +1203,8 @@ static int dp_dsc_fec_support_show(struct seq_file *m, void *data) drm_modeset_drop_locks(&ctx); drm_modeset_acquire_fini(&ctx); - seq_printf(m, "FEC_Sink_Support: %s\n", yesno(is_fec_supported)); - seq_printf(m, "DSC_Sink_Support: %s\n", yesno(is_dsc_supported)); + seq_printf(m, "FEC_Sink_Support: %s\n", str_yes_no(is_fec_supported)); + seq_printf(m, "DSC_Sink_Support: %s\n", str_yes_no(is_dsc_supported)); return ret; } -- 2.34.1