Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4976109pxb; Mon, 15 Feb 2021 06:27:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwV7JXeHefUaA9GkoBBM0wjQ3eMnL2gl7CRa5sODMmNb2wICv52suE4dOdemILC7Lu4htrp X-Received: by 2002:a05:6402:10c3:: with SMTP id p3mr15845581edu.67.1613399236173; Mon, 15 Feb 2021 06:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613399236; cv=none; d=google.com; s=arc-20160816; b=AFYAtsCty8LL7PWWC8yLVgGVQtmnGbgw6oA27RkOdyzWdDclB1V+bzW2a9jsgsiTE9 slZua9hzD+dFQlH0jMuoNrkxwQla2k5q32n+//4CBalYrGpCyOFr+o3NaBhqna4qokMz twERZlKgwQnpCUtXtHpz2XUIJPVY2KCgwMmDcvAOPl0w6vhdh4mmOlxltw1i2lmOkyy1 HS9xlAdD0aNwC0MBU9sTQ83xpzObg61uMEpEz+GgXMHsRoLSIzH3bKScBbD5tL07G9e3 inMfnuXRmKekbXZcXWQTeKll3wyCopPISNqRWip0CiXja7B0zLkxEa6BrzPFeNvL7hHW 5I0A== 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 :ironport-sdr:ironport-sdr; bh=47mmK2gtuWltEHCn7gLggSABQGjZYTFLPZsxziswZts=; b=KuG7i30uHtFXirZAq7oVyVncYVzBGJ/In5PO8bfny2r6hbaPZ9CFScUG3RyYfFLsDj +49eZdNjI1001eHcqXZrKU8zJ47w6uCW8MXVZxU0CniPdcW5nccPne3yteNh+T3q8ViA fb1nWoY1ID9IbwAJa3ZAxGY+ujdttU7UlEMValp1P5+jJNB4D4jnEsERlwwPc44h2Iw3 Jn5PUz/l1lML8JWqKAmGM+fu5xVp/xO3VSUKdONsToWeQGCfK7JB0qBChkKSAeV/WCu/ Xe6yihApQg4jlqYoTuBetInCMwhexcn0CFCZ4peh2ZN+Kr5lY7BDa/hrYF+zTW1X6q/j 9Zmw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 ch1si12327230edb.239.2021.02.15.06.26.52; Mon, 15 Feb 2021 06:27:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbhBOOYR (ORCPT + 99 others); Mon, 15 Feb 2021 09:24:17 -0500 Received: from mga09.intel.com ([134.134.136.24]:15036 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbhBOOXx (ORCPT ); Mon, 15 Feb 2021 09:23:53 -0500 IronPort-SDR: pMgS1aanTxG0BuzUDT2Due8M+FBsLOTf9qAd5MWVDhBiEakcCQjIQrk9M+x6+cDhM+G0v2tZz8 6PAJMJWbT8MQ== X-IronPort-AV: E=McAfee;i="6000,8403,9895"; a="182823520" X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="182823520" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2021 06:22:06 -0800 IronPort-SDR: gjS+uCy1RooYV8N9lYHIdqLJT2peNhOwkX157krPVoc1icBBrMwSRfcbzevRHxh9+vpd1sj8YJ veRJtpYMOhPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,180,1610438400"; d="scan'208";a="580191385" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 15 Feb 2021 06:21:56 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9E9A8220; Mon, 15 Feb 2021 16:21:55 +0200 (EET) From: Andy Shevchenko To: Alex Deucher , Mikita Lipski , Eryk Brol , Chris Wilson , "David S. Miller" , Rahul Lakkireddy , Francis Laniel , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, netdev@vger.kernel.org Cc: Harry Wentland , Leo Li , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Raju Rangoju , Jakub Kicinski , Andy Shevchenko Subject: [PATCH v1 3/3] string: Move enableddisabled() helper under string.h hood Date: Mon, 15 Feb 2021 16:21:37 +0200 Message-Id: <20210215142137.64476-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210215142137.64476-1-andriy.shevchenko@linux.intel.com> References: <20210215142137.64476-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have already an implementation and a lot of code that can benefit of the enableddisabled() helper. Move it under string.h hood. Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/i915/i915_utils.h | 5 ----- include/linux/string.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h index d2ac357896d4..b05d72b4dd93 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h @@ -409,11 +409,6 @@ wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms) #define MBps(x) KBps(1000 * (x)) #define GBps(x) ((u64)1000 * MBps((x))) -static inline const char *enableddisabled(bool v) -{ - return v ? "enabled" : "disabled"; -} - void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint); static inline void __add_taint_for_CI(unsigned int taint) { diff --git a/include/linux/string.h b/include/linux/string.h index 2a0589e945d9..25f055aa4c31 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -318,4 +318,9 @@ static inline const char *onoff(bool on) return on ? "on" : "off"; } +static inline const char *enableddisabled(bool enabled) +{ + return enabled ? "enabled" : "disabled"; +} + #endif /* _LINUX_STRING_H_ */ -- 2.30.0