Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp52071ybl; Mon, 12 Aug 2019 11:32:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCzWeMaRsFHKWOGn5ouqT549SclVJzqTfHcD2OF/LJPp30PIH1Eb8a0tFCBqKgpYvu2T+N X-Received: by 2002:a62:8281:: with SMTP id w123mr6613178pfd.36.1565634758451; Mon, 12 Aug 2019 11:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565634758; cv=none; d=google.com; s=arc-20160816; b=z/crmmECmOCktQv4I1onOc59mzaoP6FdUWUVnls6yj9qc1fWzT/do6PNyikCVFcpgt zxv/6rzWGZAp8PuJJLXgVvEEuWbraHqWScW5BQF3ic8IiuBUdwuI/96GGGqy9ImT0y6k oluVEq6H00i8FwokZnNwl8KP6GQsf6ePyby2KGV82wPju9SBY2UkW+5ri+Aih9d01r0S 5/7qaJF1Nl/cgH2NrVedNznaAuiyCRUe31K5XLlssOqz1TKxSbLzDSfWHY4u5qrCGHcL homfb7wCyvtnhQGWw/jUdmWaY1Y8D49ceRdWNzk87bMQPaM/hCd6M9bcJsOVdj6zpesP 1Yfw== 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=Zpm/GHHE4ykqnmVRJVpgdn4hUqCuFAHpeXwxgZzwohY=; b=iruHO1qSZYpomEMSxjWf3yQJJlOf+oFzHbTg3PUp+aVLl9sJ6gfXqUNsTG62gLk+sB 62tRnLV4S2fYyXnHnDIAN4+ISX1dCc2cJy/y5YxOx+EGUbsq+EVKPRJKHf3IhfXOfENs VNJTdk2UH3Uy4cCjV0kzHQUKAePYWWIiCeuvJ2fDg0hCN2h8h+FhDn+iI8tHBqLxfTAF Df58TBgRcfukVhtAN8kzHDYxaAZIhvOWAiENbtQxJLR50EFKUVVOTpusaLH4CkBZ6wew Kkini25qTrpnIBO5wXUiaIXwUt26EapFuy3rj70NYiwuFIp5TF8lwKecopNdkmO4DQla +pkg== 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 l9si56871074plb.317.2019.08.12.11.32.22; Mon, 12 Aug 2019 11:32:38 -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 S1726712AbfHLSbP (ORCPT + 99 others); Mon, 12 Aug 2019 14:31:15 -0400 Received: from mga01.intel.com ([192.55.52.88]:58790 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbfHLSbP (ORCPT ); Mon, 12 Aug 2019 14:31:15 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 11:31:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,378,1559545200"; d="scan'208";a="327440707" Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 12 Aug 2019 11:31:14 -0700 Received: from [10.54.74.33] (skuppusw-desk.jf.intel.com [10.54.74.33]) by linux.intel.com (Postfix) with ESMTP id 330565806A0; Mon, 12 Aug 2019 11:31:14 -0700 (PDT) Reply-To: sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v2 3/4] PCI: pciehp: Replace pciehp_set_attention_status() To: Denis Efremov , Bjorn Helgaas Cc: Lukas Wunner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190811195944.23765-1-efremov@linux.com> <20190811195944.23765-4-efremov@linux.com> From: sathyanarayanan kuppuswamy Organization: Intel Message-ID: <50d00be6-c904-af0c-2704-389965aae666@linux.intel.com> Date: Mon, 12 Aug 2019 11:28:30 -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: <20190811195944.23765-4-efremov@linux.com> 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 Hi, On 8/11/19 12:59 PM, Denis Efremov wrote: > This patch replaces pciehp_set_attention_status() with > pciehp_set_indicators(). > > Signed-off-by: Denis Efremov Reviewed-by: Kuppuswamy Sathyanarayanan > --- > drivers/pci/hotplug/pciehp.h | 4 +++- > drivers/pci/hotplug/pciehp_hpc.c | 25 ------------------------- > 2 files changed, 3 insertions(+), 26 deletions(-) > > diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h > index 17305a6f01f1..9a2a2d0db9d2 100644 > --- a/drivers/pci/hotplug/pciehp.h > +++ b/drivers/pci/hotplug/pciehp.h > @@ -181,7 +181,6 @@ void pciehp_get_power_status(struct controller *ctrl, u8 *status); > void pciehp_set_indicators(struct controller *ctrl, > enum pciehp_indicator pwr, > enum pciehp_indicator attn); > -void pciehp_set_attention_status(struct controller *ctrl, u8 status); > void pciehp_get_latch_status(struct controller *ctrl, u8 *status); > int pciehp_query_power_fault(struct controller *ctrl); > void pciehp_green_led_on(struct controller *ctrl); > @@ -200,6 +199,9 @@ int pciehp_get_attention_status(struct hotplug_slot *hotplug_slot, u8 *status); > int pciehp_set_raw_indicator_status(struct hotplug_slot *h_slot, u8 status); > int pciehp_get_raw_indicator_status(struct hotplug_slot *h_slot, u8 *status); > > +#define pciehp_set_attention_status(ctrl, status) \ > + pciehp_set_indicators(ctrl, PWR_NONE, (status == 0 ? ATTN_OFF : status)) > + > static inline const char *slot_name(struct controller *ctrl) > { > return hotplug_slot_name(&ctrl->hotplug_slot); > diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c > index 68b880bc30db..fb4bea16063a 100644 > --- a/drivers/pci/hotplug/pciehp_hpc.c > +++ b/drivers/pci/hotplug/pciehp_hpc.c > @@ -418,31 +418,6 @@ int pciehp_set_raw_indicator_status(struct hotplug_slot *hotplug_slot, > return 0; > } > > -void pciehp_set_attention_status(struct controller *ctrl, u8 value) > -{ > - u16 slot_cmd; > - > - if (!ATTN_LED(ctrl)) > - return; > - > - switch (value) { > - case 0: /* turn off */ > - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_OFF; > - break; > - case 1: /* turn on */ > - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_ON; > - break; > - case 2: /* turn blink */ > - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_BLINK; > - break; > - default: > - return; > - } > - pcie_write_cmd_nowait(ctrl, slot_cmd, PCI_EXP_SLTCTL_AIC); > - ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, > - pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, slot_cmd); > -} > - > void pciehp_set_indicators(struct controller *ctrl, > enum pciehp_indicator pwr, > enum pciehp_indicator attn) -- Sathyanarayanan Kuppuswamy Linux kernel developer