Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1007385rdg; Fri, 11 Aug 2023 07:05:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZp2Qlnpa3CR4RneiIJWtKVH9woD6oxMnYrWnFxoKGvIVTLXblfvnKbN0s74OfEkDOAycL X-Received: by 2002:a17:902:aa41:b0:1bb:b91b:2b3c with SMTP id c1-20020a170902aa4100b001bbb91b2b3cmr1526377plr.34.1691762743223; Fri, 11 Aug 2023 07:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762743; cv=none; d=google.com; s=arc-20160816; b=bpoAPGDLwBor9X7nZRSSq+CbPyRmnxbE6iD+D4TRYAQYBlx0MjVvM9ctll+20bpSfa +JXfjay1I2XJJAMfe2Nwpn/a+aL4gabbAj1XA2iKS+nt70jJOs5W9Sc3051Yr4xThEHE 8UaFriYgF1Y3uPkVWfZHh4b+XlwUDUlw9pvFg9ZJd9U7APju5RtEbqq8CKuvM+sC6Z16 P5q+4k1OQJuP2T9Ng/zDDsPP6ooFQMKLl9dAco0QYi0Hvl1/DT5PpS2jTxwJnUBZuCoQ avJp8j4ziQItN1Ew9DcPLAOxcfB9hB0bFlh7oEMI6PJDNbJIyUNVpPkpfbsOSokeQcL3 Lylg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=+t8s3Mhy/IZLizvRb3FYZS7xZQgkZ5hdgHzrdqKJYA4=; fh=Bdy4xS5TiQlIpJDC468+UqxxgxmL2UgmKwkG6hRQdqA=; b=ID4TlvuzMuUJC4I2XSk50wY72se/Fg283o+gJAX5YHPtrQb5pEad42B9jIuECq4Ri+ sL/1JPtCiau8dMtgrRg6+wqK/LHPFwYMTHJBHIFlR3/yw+JJajOflxvuQ0O8JcCf01+3 Srlomh5d74EpW2Mc2v58E6ysA26zprtGUrFSVRAMwbmZdxLBkirO1lQrSwUJZLS+BWk4 Tn8TLDeQhwFAesYHAP99ZklvQjffryrIrZdEhcLtvYdKgeCz8qVuVDwdWYLVKgQvnmlm xQAW+YTrSHNzoinyksPc2HThRVnr6uTl4ZlZ/SGyfTz9s4ik2RSb8c7rjgNalCMfa849 aDtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=orq9x3eg; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a170902ec8200b001bbd0358ef7si3541039plg.518.2023.08.11.07.05.29; Fri, 11 Aug 2023 07:05:43 -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=@collabora.com header.s=mail header.b=orq9x3eg; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234301AbjHKNfO (ORCPT + 99 others); Fri, 11 Aug 2023 09:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjHKNfN (ORCPT ); Fri, 11 Aug 2023 09:35:13 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20FC330CA; Fri, 11 Aug 2023 06:35:13 -0700 (PDT) Received: from [192.168.100.7] (unknown [39.34.188.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7DFD36607247; Fri, 11 Aug 2023 14:35:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691760911; bh=wWTqUHKBvsZnlOKHdHWeuHapPEJsmt6jPNGdT3SHPtI=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=orq9x3eg7xN4TyOAgdyS23eCgbHr8uMTJOeU8YN7E6ovljXmTPqKfGT/Jhu0K6Ivc wCYKGCciUJaMwbhS7DLTXQV0UeSrZOHJWcyH+12i+UhzaubUneKKxSAIROko1/oQQM /xOInSnzhb8nZjQMoJza+Bi9sB8uF9pwdIEQ8xyikNyuHUSRmulxkF2ngmQpdkPnrM qAsPmhkMZHlHocR3X0ojsRB9nN4s8pTOkrIBCmdmTcWvA+9ZkWiTyEUpgRdwh6FfSh vu9ZMl9o91JGRrkBmq5tx3Df/Z/dUCKJaPpxTvW5eW32MWhmh15bVWhSH8TCWPschm MZBrxFyK+8OEw== Message-ID: <1690b97a-e19a-18fc-7248-b0bae0757cb7@collabora.com> Date: Fri, 11 Aug 2023 18:35:06 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Cc: Muhammad Usama Anjum , Mark Gross Subject: Re: [PATCH v1 1/1] platform/x86/amd/pmf: Use str_on_off() helper Content-Language: en-US To: Andy Shevchenko , Hans de Goede , Shyam Sundar S K , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230811131330.71263-1-andriy.shevchenko@linux.intel.com> From: Muhammad Usama Anjum In-Reply-To: <20230811131330.71263-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 On 8/11/23 6:13 PM, Andy Shevchenko wrote: > 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 Reviewed-by: Muhammad Usama Anjum > --- > 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); -- BR, Muhammad Usama Anjum