Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp979322rdg; Fri, 11 Aug 2023 06:17:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHt2ylgBdLdCG6DNZWMuZr+3ktMHGRGizM2ssR4Suv2vLWOlFhqmt3PGBfvgeTEEJZ3/80A X-Received: by 2002:a17:902:d507:b0:1bb:7996:b269 with SMTP id b7-20020a170902d50700b001bb7996b269mr2466641plg.19.1691759822313; Fri, 11 Aug 2023 06:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691759822; cv=none; d=google.com; s=arc-20160816; b=MEEyA8ENhEFTbRCWsDDNmnseDO5XW8cd2NKu7/0cSfhzrLzHz176pJIqR4zW2uYnVY ExFCPaOuIFqJHN1faqEXVR6hBoTE1+aqVv83aT9dsVPLLJIXI8+++l2YRs3ZjSxznKyF qGsznmvcibPWcFC1Je8wlfIlg0Z4rfJTSD95HIo8MPrAAVAJSYwh9F67+yeOIgfqMFYm Wszvx3635vMTakcLtZ1xduF5v9ls9/4pNCkjS2Ph70U8Sh2I7PK1gqOX6sXxrPcakTga HA86s31Y5gbBqRGsJbxuT2U4HvxytPgi6PLj/xorxnJ3EV/qDeqjcBqAHhP7Hbs9ewfS ERNg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=QhA7PaD+QaqsMAf1mj+V0ou2tizRgtTHDyi3xSO8yEk=; fh=u5pkpIcsgZCh2zrRPzKK6rO5OoqggJ8wFHcKwlUKLxI=; b=wa8TLslTvZqFd7+6/y2IgjoqtSQR4CisMqWnvF9YWFWq2fHbAzfsDRezoRJMlmqnUa XqlQAfxTLcNysmYAeYdsEgdBddhTXgdCMU23oIfta8SG/j+bT+OCudokBFIUIkHiBkLg yo4irTYq5H/tqpvUYkNc/S3vtkYfO5XFgPPv5bHkJKfTCCCE0RnevoJrvr5Pxwq6WFmf EgJ30B1yckW2K5U8MLNka7JBc8q+gk3r3Q/4gq7M7CvPSUxA7m/sUtIgKuQ0fBQhWKm+ tCcNGfWnHGkn21Hy6p2W2Bc/MMS6u+pcf1237iYsr3JWuvBgvvY2lmey7g61JF4pGA93 jKHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n+D3DPng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a170903024800b001b89bd6fd59si3394133plh.215.2023.08.11.06.16.47; Fri, 11 Aug 2023 06:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n+D3DPng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234653AbjHKNJg (ORCPT + 99 others); Fri, 11 Aug 2023 09:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235733AbjHKNJZ (ORCPT ); Fri, 11 Aug 2023 09:09:25 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CD8444A1; Fri, 11 Aug 2023 06:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759329; x=1723295329; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jri9PQq8QGMkaA/nC2If/vjybGCLJgqagekcG6/jnMo=; b=n+D3DPnguTv6HSuLvxgl9oeIAmcGAKixG5JkjituLmsksg4rsrm4T1no WdhdByA0a6EexQEBWu8VJnq3sw9sjJDM58uJxz54H+1P1bn9OU8+hOvm6 syf41PaxeuZ+zlo5i39FiBbFF1IvuVZkbRRHQPUffTUGl4QoMtCVC33Aw /QNLjq0uaDVH5OUui+wz4raHoAS4NghrkTPsATiAIR0RlxrDvN+hXFoRC VQrYHgDJNVKRlnKPbLIGE+YlV1XX16giXQfF3c5NLV4ThxdcWbG6Tiueq 2xG6IEIr1d1P1CpbE1aj1gfmGe0JVytFbMFbKBczymJ9w4W9gbY83+aZq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="356634825" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="356634825" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:08:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="762192242" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="762192242" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 11 Aug 2023 06:08:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D0FE81D9; Fri, 11 Aug 2023 16:13:35 +0300 (EEST) From: Andy Shevchenko To: Hans de Goede , Shyam Sundar S K , Muhammad Usama Anjum , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Gross , Andy Shevchenko Subject: [PATCH v1 1/1] platform/x86/amd/pmf: Use str_on_off() helper Date: Fri, 11 Aug 2023 16:13:30 +0300 Message-Id: <20230811131330.71263-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have a common helper to represent a boolean value as "on"/"off" string. Use it for the sake of the unified style. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/amd/pmf/cnqf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/cnqf.c b/drivers/platform/x86/amd/pmf/cnqf.c index 539b186e9027..bc8899e15c91 100644 --- a/drivers/platform/x86/amd/pmf/cnqf.c +++ b/drivers/platform/x86/amd/pmf/cnqf.c @@ -8,6 +8,7 @@ * Author: Shyam Sundar S K */ +#include #include #include "pmf.h" @@ -399,7 +400,7 @@ static ssize_t cnqf_enable_store(struct device *dev, amd_pmf_set_sps_power_limits(pdev); } - dev_dbg(pdev->dev, "Received CnQF %s\n", input ? "on" : "off"); + dev_dbg(pdev->dev, "Received CnQF %s\n", str_on_off(input)); return count; } @@ -409,7 +410,7 @@ static ssize_t cnqf_enable_show(struct device *dev, { struct amd_pmf_dev *pdev = dev_get_drvdata(dev); - return sysfs_emit(buf, "%s\n", pdev->cnqf_enabled ? "on" : "off"); + return sysfs_emit(buf, "%s\n", str_on_off(pdev->cnqf_enabled)); } static DEVICE_ATTR_RW(cnqf_enable); -- 2.40.0.1.gaa8946217a0b