Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2671996yba; Mon, 15 Apr 2019 17:23:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz64W890mn9l/Nh3JdEwuyLe9d+L6BYY79m0x9PwNJOukL3+lon5YkhCM5OOS0l3v8LHVod X-Received: by 2002:a65:6489:: with SMTP id e9mr72688678pgv.364.1555374235220; Mon, 15 Apr 2019 17:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555374235; cv=none; d=google.com; s=arc-20160816; b=CpvrvmB10088N0gcjsn+GJ/Jwsc4dY+QOru/6W9IXq/Y0RoF7flYcbgAsRACMG7ouR MxnZ9OR4ftIp4I+Et1F80WlWJ4NCOgTZN5JQCsNYQH37phrdZ43ZzyTATFZ7fQpYMy1P iYQEZPHOqRiedZagmf0lLhxTd8uDyYzzH+E5v9rojaRSpWyuuMccuuTQAUttC3q0Fl+5 7DJd0pWICsFp1vK+mzunSrpnNBmVvgQIhrggoPQ2mc1CzshVcl8z30pzGNiAfrO9ZB3X cfbXb20xp7bOgJyi1DTVbASCE/O/hPLqur5uo8t7skM/+7vcvvW0U5jMoWFMvvE5/+3G GdfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hGSRLXLadQOLX55DxvAINLcJwPboKn8ZaKLD5g5ABfk=; b=pyIdWuLWlpOKHDi/QOrPlBIQWjX2zwLdHFaEWMc38qdWdaJaQ72NNMi15AzAcbojX0 n57yDv6VlIBfLzARkU/usCWtuoridUWz0q8oqIJxp4P1wJQ9eyczkv5P7YbFIGmiQwzF Sn+zkqn5qIr1jOj6GPRh6cMqnVNa+UnKg8dDYUBGhGCDWW0XImUWm/JYUbYDy5OLtAiG 0UdpxSEV8s5PaW45ENSKVJ/riper0bd2I8bV8UEwxErUIIMzsKYpwyu+iZ8T9SZTI7Ef 3F3AKm7FNZr7fgszeRtJCg71a8EMKrFMjq1Y1PE5Spj9e3B1T7nBvuvbmiFwK/s6pGW0 b4XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nmFjBUsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si45520840pgh.8.2019.04.15.17.23.38; Mon, 15 Apr 2019 17:23:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nmFjBUsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728233AbfDPAUs (ORCPT + 99 others); Mon, 15 Apr 2019 20:20:48 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46180 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbfDPAUs (ORCPT ); Mon, 15 Apr 2019 20:20:48 -0400 Received: by mail-pf1-f195.google.com with SMTP id 9so9418607pfj.13; Mon, 15 Apr 2019 17:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hGSRLXLadQOLX55DxvAINLcJwPboKn8ZaKLD5g5ABfk=; b=nmFjBUsYM9msfrovL5HTwoHxVo43G4+UeKNdS5QH+k7HD/YPb/O/dldlWjKACM5H1M 8HGkS5m3EtWouV7z0dNwq5kz9hMU8xOZp9cPb0Y8D9a1W8WkSwD3B3nPqdHR106jgylN 5PYesBxzHGUyuCjRtt97iZuzTuQ2xKE8/cxCWZS0j1VBz01OiapO5ojHtu9plN7gU6ks I0mCzo/5jCFYqJwdR5pWq1ysg8oeC91qNTz39pw2zn3byf8kxygZ85zvvhICleM1KlHJ SiF4EWpYKsAYjpUCNy0+TTnswBO3QLFkm4K3HS1zIsI52DN8RfNDegQQySRGZZ9OqZM3 9U2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=hGSRLXLadQOLX55DxvAINLcJwPboKn8ZaKLD5g5ABfk=; b=tYUf+bz1sbdDQLRV1Bq6Q/FzP6Nt7sWS/RmyXHpjrOrhi9sSGvXAnHQuWBzWWnZuu6 TpjwAf7uKWZ2oXjvIg5W/rDKTx6I02//nFCvbNqdqXrp5b674m1js8xs+BGjmbHAn6u/ HiwBiKBPzd2ffzTnyDH+v66DtF3BtKk1qtyRlZrSWL/5GC2tXMcsyTeVnAtA+17oMeLN aZzUh8Bkz6EDX9TeMSEBvdr1/gvHkFSNVw27NxsEqnP1Qf0VzxejU3IcU0H4E243RIQM HcrH1aVS59g1Y3i3ITgUhtVb2pfID2i7pjgbV4IQTUlPBqfhOwQS8HC2UpEFSB/xfI7P RSAw== X-Gm-Message-State: APjAAAUsVPAr+XROrNOxnDsmW6YA3dfS/SIOIH+paBpXQbx0vUpnD1TW n3EuQsOxSsnlYmzcOhG6mqA= X-Received: by 2002:aa7:8208:: with SMTP id k8mr80107297pfi.69.1555374047590; Mon, 15 Apr 2019 17:20:47 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s19sm69505548pfe.74.2019.04.15.17.20.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 17:20:46 -0700 (PDT) Date: Mon, 15 Apr 2019 17:20:45 -0700 From: Guenter Roeck To: Lei YU Cc: Jean Delvare , Eddie James , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Joel Stanley , Andrew Jeffery Subject: Re: [PATCH] hwmon (occ): Fix extended status bits Message-ID: <20190416002045.GA4442@roeck-us.net> References: <1555324640-152061-1-git-send-email-mine260309@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555324640-152061-1-git-send-email-mine260309@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 15, 2019 at 06:37:20PM +0800, Lei YU wrote: > The occ's extended status is checked and shown as sysfs attributes. But > the code was incorrectly checking the "status" bits. > Fix it by checking the "ext_status" bits. > > Signed-off-by: Lei YU > Reviewed-by: Eddie James Applied. Thanks, Guenter > --- > drivers/hwmon/occ/sysfs.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/hwmon/occ/sysfs.c b/drivers/hwmon/occ/sysfs.c > index fe3d15e..a71ca94 100644 > --- a/drivers/hwmon/occ/sysfs.c > +++ b/drivers/hwmon/occ/sysfs.c > @@ -42,16 +42,16 @@ static ssize_t occ_sysfs_show(struct device *dev, > val = !!(header->status & OCC_STAT_ACTIVE); > break; > case 2: > - val = !!(header->status & OCC_EXT_STAT_DVFS_OT); > + val = !!(header->ext_status & OCC_EXT_STAT_DVFS_OT); > break; > case 3: > - val = !!(header->status & OCC_EXT_STAT_DVFS_POWER); > + val = !!(header->ext_status & OCC_EXT_STAT_DVFS_POWER); > break; > case 4: > - val = !!(header->status & OCC_EXT_STAT_MEM_THROTTLE); > + val = !!(header->ext_status & OCC_EXT_STAT_MEM_THROTTLE); > break; > case 5: > - val = !!(header->status & OCC_EXT_STAT_QUICK_DROP); > + val = !!(header->ext_status & OCC_EXT_STAT_QUICK_DROP); > break; > case 6: > val = header->occ_state;