Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2525948yba; Mon, 15 Apr 2019 13:35:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2e2dnkUcAeR2p39ABKgiGAHzztO3FlinAZW3zLNAIZrWCb2H0geWRC1d2gEwZ5hL437dA X-Received: by 2002:a62:4602:: with SMTP id t2mr77414603pfa.26.1555360542970; Mon, 15 Apr 2019 13:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555360542; cv=none; d=google.com; s=arc-20160816; b=AvE0ZkS4tcbuTHltgGF6y/bS6+dCsRtsYinDDPmZfMm4A1kzJ04iOi4FnQ53UjPbhj YypQIs2+gu/07FVH01c9rjV3QhCwyz+9sPfay+XKOa10UGvNwmRg4lAc4mm/cCy+DQWd vicrys4UiefWTf3+eyHItVOyqISeWIBA5gc/tNowKD+IoRRP6Vm2JiS15lsKrMeERWHC OxhR6AHlq0lmTcQRacJ/txlWi/XIHrfondRGinpa3IxZpPuV9Q8hNtgr+lEp4ukGJ4j6 mJxD7EuZvfWfbVTRsblioi3p7/T9KyzcfCHOuTty7dbioZZpqju0GRAfudBELV5dHRIO 9NKw== 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=YqnhuNgc7VdSe8SUfJShm53vwl4yGwe2rbhqG6KHg0c=; b=enDZUZAhC+yBrGPzOpoJ4HjjHIuK309Fo3qh/POgdvq0qGk7FED9lG+HUyDInRAb3i ojARU1tjZi/MmV3qsWgGgw6NQCSdGOCXwGjPTvL75ZKhS8hZbTY23xhiBy6WHD6r/tub 0EUA930ld+2DcqvVgZmvdBZb684D7BOv+uh8iH58njZtzuFmrTmPIyq+sEcnh73C+LUD bWb28ktWf9uu9d9rUjKsQh4Tj+kXUaPRD2QBNoLuhunhtg8CC05aC7ZsWdRNrF8wuB/4 ZAdnW5P5GV7K4slwJ+K2MmYbNi8emC1SlSMo3oSV4oLjiwynPISyZFD9x+axttjPylg1 nBUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="jzVW/xoc"; 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 w10si42968678plz.37.2019.04.15.13.35.26; Mon, 15 Apr 2019 13:35:42 -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="jzVW/xoc"; 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 S1728159AbfDOU2w (ORCPT + 99 others); Mon, 15 Apr 2019 16:28:52 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36451 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727910AbfDOU2v (ORCPT ); Mon, 15 Apr 2019 16:28:51 -0400 Received: by mail-pl1-f196.google.com with SMTP id ck15so9147244plb.3; Mon, 15 Apr 2019 13:28:51 -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=YqnhuNgc7VdSe8SUfJShm53vwl4yGwe2rbhqG6KHg0c=; b=jzVW/xocORFUraAMBcr3CakCJU5LViGD9IefKD4E2rgeKwrp5Ea2YBnPzZSbwQf9Bb z7Opu2Y4TTIJdyM7rfHTlKuamp5iqnEZqoxJ9eTC6k+Bw6NfS2VnrF0vAP35guBxRvnd dlBqg7iO0ynrFor/H4ifDYoM487+MX+8FftCH/Xful/D4G3Sd1nfaMnx1Glhk5xl6fes QKJcmiOqNBhrgRnhEtImsb7SRdjBp9rP0+rTsTccBoXRjExuDOxe3eaEmPP0PmwriA1p urS9Rk7YULnIDnppXATy7tZEIxheH1LIuhuF1+06/SHg1dK5NkdRuK4RXLaXJIojiAiF rvSA== 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=YqnhuNgc7VdSe8SUfJShm53vwl4yGwe2rbhqG6KHg0c=; b=JwJUj066CUrVeGft1MgkhPjywdjX4EfNFQJnWY5DoGo81LiD49Vp4P9OP2Ho7TzLDb 0C+TSAQLWWgxHieQO6EiPYzycYWGJkNUdZuMG157Gsb9oOh6WCloE9TLiPNQu5FHwKh/ 2SlkH5dmvPJuLgWreBzsaXgZdwJcJ4FMxUzH1JtPYZjnjXi9EYchAHRvuP+iuqzNt1Mb ODGx7pPCOuyGCyvsOrQsiS0CSCuRGfqsKApnht/hLr69h+wLQild8BvfxQL+kS5Zq9Ch gMsizOv0R80niTjCMbzlseHJTXmPjgpAHVlvtTUBJUrCMvVUdFth7GTIGMsJKmSgcbrW 2RXQ== X-Gm-Message-State: APjAAAVJP9x/I207aqQG68Fkjnooy12UMLUmcBHGSJJkWGADbQod6k3a 2SNtd12V1DSjLk0pBSIC99I= X-Received: by 2002:a17:902:e091:: with SMTP id cb17mr79150996plb.222.1555360130815; Mon, 15 Apr 2019 13:28:50 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 4sm67066101pfn.159.2019.04.15.13.28.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 13:28:50 -0700 (PDT) Date: Mon, 15 Apr 2019 13:28:49 -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: <20190415202849.GA31243@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 Looks ok to me, but can I get a confirmation from someone at IBM ? 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;