Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp181024ybl; Mon, 12 Aug 2019 14:09:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJwg5/kIIdWEeBaLUECi0b4+rSFGG2usNamLDs9iy18+ZbfpWLgll5PSqJxuMOVk+T5p1r X-Received: by 2002:aa7:85cd:: with SMTP id z13mr634781pfn.214.1565644152976; Mon, 12 Aug 2019 14:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565644152; cv=none; d=google.com; s=arc-20160816; b=atK+MLWh2Qsk+xssBimuTjE/baeBuZB/UOU0pjh8npGwJ2iKM6cnx30EbmwFNlBu9J GPXX1kyShr47/hzMNa2fafjzcw1DdNlz3PF4yU92qHC2wdUD64zcxkMNXISSf96wRi1v cuFwpdxBZp6XqU7UCd/zP4SX/M8ELGKG3X3Dz2x53vlaSJggWmhl496HPYfgH6UgJaax KU+StZPJzWs8/ore4iimq1TJ80/85KpaclqAvy7k6VcCz4YMAVbq3wyT5cH+e31jJKL/ aZhegypMiPy2pe167HNUTtSk+ZfhogrIpuf2iu3VbZ3lztOgJ1bHNK5AREpgBOdpyX09 6M1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to; bh=7DBjicuC4zsafS+X+wpylTa4oMcjfbVcxplJZ1h4Oso=; b=KJFEIKkLhDLPMpJSzXgg5A0zAbVJe4wiOUMO/wbWQo1UJ2Oi6DdKoo0SiQ+esBd25t Bc/AQotYGHIxtytLHp4vddBhn25nhIVIIh1eWfG6sSfhg78w5U2mSi0TGUZuSH5e6R0Y wNON9tCXQnCjdXX0Ueg1AsIfFHTxiQM++CvxvE2GPmO9Gkhd8x8aAdmO+aDn4azh6y8S h/wRJVQ7eXOVHW82WSLEDamQrWzwZ/uFg8wohwisexj9H7sx87R23/0oOcUdEKcArjNV d+84rQwcFH6WAc8V7lrENkqZax3J9G6hEwYVAk7ICU9MCusUPh4BvcUJygmluhsiZMTK mXiA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si15359269plz.234.2019.08.12.14.08.56; Mon, 12 Aug 2019 14:09:12 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727342AbfHLVHh (ORCPT + 99 others); Mon, 12 Aug 2019 17:07:37 -0400 Received: from mga06.intel.com ([134.134.136.31]:44251 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfHLVHg (ORCPT ); Mon, 12 Aug 2019 17:07:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 14:06:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,378,1559545200"; d="scan'208";a="180983819" Received: from linux.intel.com ([10.54.29.200]) by orsmga006.jf.intel.com with ESMTP; 12 Aug 2019 14:06:33 -0700 Received: from [10.54.74.33] (skuppusw-desk.jf.intel.com [10.54.74.33]) by linux.intel.com (Postfix) with ESMTP id A6A615806A0; Mon, 12 Aug 2019 14:06:33 -0700 (PDT) Reply-To: sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v2 1/4] PCI: pciehp: Add pciehp_set_indicators() to jointly set LED indicators To: Lukas Wunner Cc: Denis Efremov , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190811195944.23765-1-efremov@linux.com> <20190811195944.23765-2-efremov@linux.com> <925a00be-c2b6-697d-d46b-a279856105b4@linux.intel.com> <20190812204024.r54ihfwdcbwdj563@wunner.de> From: sathyanarayanan kuppuswamy Organization: Intel Message-ID: Date: Mon, 12 Aug 2019 14:03:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190812204024.r54ihfwdcbwdj563@wunner.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/12/19 1:40 PM, Lukas Wunner wrote: > On Mon, Aug 12, 2019 at 11:49:23AM -0700, sathyanarayanan kuppuswamy wrote: >>> On 8/11/19 12:59 PM, Denis Efremov wrote: >>>> + if ((!PWR_LED(ctrl) || pwr == PWR_NONE) && >>>> + (!ATTN_LED(ctrl) || attn == ATTN_NONE)) >>>> + return; >> Also I think this condition needs to expand to handle the case whether pwr >> != PWR_NONE and !PWR_LED(ctrl) is true. >> >> you need to return for case, pwr = PWR_ON, !PWR_LED(ctrl)=true , >> !ATTN_LED(ctrl)=false, attn=on > Why should we return in that case? We need to update the Attention > Indicator Control to On. Attempting to PWR_ON when !PWR_LED(ctrl) is true is incorrect right ? Even if you don't want to return (to handle ATTN part of the function), may be you should skip updating PWR mask and cmd for this case. > > Thanks, > > Lukas > -- Sathyanarayanan Kuppuswamy Linux kernel developer