Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp64224ybl; Tue, 27 Aug 2019 15:54:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZl6BAr/A+Q8XRyN9nvldVaMId3EeaJyi7JxtMhIFNpNHhqPftHzeRUYDW+U0f4Phy4acI X-Received: by 2002:a17:902:aa8a:: with SMTP id d10mr263864plr.265.1566946483097; Tue, 27 Aug 2019 15:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566946483; cv=none; d=google.com; s=arc-20160816; b=OWZolJ7rs9FTVUcqBSueI1DnXoqvw5ulYY1rPYjI68cgWLpbS1mLyF1TfVUThw4XNO YkzdLs3O4IQ67dpXojGnYfbxR4oZdp+9ubEEn8DbmtLjAefA25FQjWDfuyPJXfkpjmx+ zchXtFHfpBhXKxxnyBlMv0OMwRUzy5AgR9ZXnTK1SPBodM0m8iWGli4nJWW7nM9pFxX1 2SdXMHw0B8FQi0aw7etFNfH3V4DliLGkBTTCUPfxboi9pN6Go+g47jjI0m2bdq6RtsUk NHMAoV3JL/gx/AK7CvaRxWHZjEHbSyArnj2esnrAaAVm8XhvrTvtOAFLOR9baOs1Dwip Wpnw== 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=BUofLVnwN4F2HgFK5hxFDhIfK3DkRaTlDlo4z1dYxc4=; b=Xrn3v5WzLnp1qUlfq8Lwtb7M8yWwA9Y2QriFTSGydQya4pyU3PaTXZypS1sedQyVQY kxFNROCpxKFtPuRHK0bo7c45+pRLq62KpAMXAjmjRBd/oVTTW5Jw77UNlv3luVMYPte0 3v+stLSLyCnR+Nc/NNN1thpr1xhir3FH9v31LtDV0yh4dlbFkRqkqzJE3hEH8QM1cunt ca00zpx+utETwoPrxhI+4pjmo0gxShynOnwDsMiFtluOAjAFMT7lqI4tsuV2O/QRs5Bl WtQMlPBp4qwkjRY7W8qJRZTLkKr11YBva3cIocrSqWg9N1cIEADFClgB8yO9z4G/xZSU 5m0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kt/tKufB"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si585042pgg.204.2019.08.27.15.54.26; Tue, 27 Aug 2019 15:54:43 -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=pass header.i=@kernel.org header.s=default header.b="kt/tKufB"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726152AbfH0WxX (ORCPT + 99 others); Tue, 27 Aug 2019 18:53:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbfH0WxX (ORCPT ); Tue, 27 Aug 2019 18:53:23 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 577C1217F5; Tue, 27 Aug 2019 22:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566946402; bh=ztNhzpKmoCCrgIixuWgyFrkkh96q7FgJ2/rvxJTHs2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kt/tKufBYETsPrEwOF771ye7LBLZPIMIm3GmhvCvX+4GnTL0fq/rsLke1RAiygxS4 sZltuEeJAyo5b3nAEOBQSqa/XNvRu+fuuwEuTXNY0LCywJWQfV2sNwpqfV2g+Z19pK lfq9+22iL8szRvRqILjHnFKOi/xCQrkhyTwCzjgg= Date: Tue, 27 Aug 2019 17:53:19 -0500 From: Bjorn Helgaas To: Denis Efremov Cc: Lukas Wunner , sathyanarayanan kuppuswamy , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/4] Simplify PCIe hotplug indicator control Message-ID: <20190827225319.GE9987@google.com> References: <20190819160643.27998-1-efremov@linux.com> <2f4c857e-a7cc-58da-8be5-cba581c56d9f@linux.com> <20190827223254.GC9987@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190827223254.GC9987@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 05:32:54PM -0500, Bjorn Helgaas wrote: > On Tue, Aug 20, 2019 at 03:16:43PM +0300, Denis Efremov wrote: > > On 8/19/19 7:06 PM, Denis Efremov wrote: > > > PCIe defines two optional hotplug indicators: a Power indicator and an > > > Attention indicator. Both are controlled by the same register, and each > > > can be on, off or blinking. The current interfaces > > > (pciehp_green_led_{on,off,blink}() and pciehp_set_attention_status()) are > > > non-uniform and require two register writes in many cases where we could > > > do one. > > > > > > This patchset introduces the new function pciehp_set_indicators(). It > > > allows one to set two indicators with a single register write. All > > > calls to previous interfaces (pciehp_green_led_* and > > > pciehp_set_attention_status()) are replaced with a new one. Thus, > > > the amount of duplicated code for setting indicators is reduced. > > > > > > Changes in v3: > > > - Changed pciehp_set_indicators() to work with existing > > > PCI_EXP_SLTCTL_* macros > > > - Reworked the inputs validation in pciehp_set_indicators() > > > - Removed pciehp_set_attention_status() and pciehp_green_led_*() > > > completely > > > > > > Denis Efremov (4): > > > PCI: pciehp: Add pciehp_set_indicators() to jointly set LED indicators > > > PCI: pciehp: Switch LED indicators with a single write > > > PCI: pciehp: Remove pciehp_set_attention_status() > > > PCI: pciehp: Remove pciehp_green_led_{on,off,blink}() > > > > Lukas, Sathyanarayanan, sorry that I've dropped most of yours "Reviewed-by". > > The changes in the last 2 patches were significant. > > Anybody want to review these? Unrelated, but if anybody is looking at pciehp, is there value in having pciehp split across five files? drivers/pci/hotplug/pciehp.h drivers/pci/hotplug/pciehp_core.c drivers/pci/hotplug/pciehp_ctrl.c drivers/pci/hotplug/pciehp_hpc.c drivers/pci/hotplug/pciehp_pci.c To me, it just makes things harder because when I'm browsing for something in pciehp and I don't know the exact name of it, I have to guess which file it's in, and I'm invariably wrong. It seems like it would be much simpler if everything were in a single pciehp.c file. Then we could also get rid of the header and make several more things static. Bjorn