Received: by 10.223.148.5 with SMTP id 5csp6554607wrq; Wed, 17 Jan 2018 15:29:27 -0800 (PST) X-Google-Smtp-Source: ACJfBouIameRT3hyVL0LkV4ogkk+sEFenkKHeHi4NRhX6MRrg/dkSf3tc+1IGN0HT0a4KyohYKwZ X-Received: by 10.99.122.82 with SMTP id j18mr30340869pgn.250.1516231767288; Wed, 17 Jan 2018 15:29:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516231767; cv=none; d=google.com; s=arc-20160816; b=kn26Suu2M2Kap9CMFv2/ZHNhKF5CItnd4SYvCVdjILxb5RwYTizlEVfwVsBfOShPXP kCagaju4IA/d+IDb2/yJ+p0pasTRJ0AdTaeEENRowscu1AQaSIByziUMOodFwCq2J9rj r2dRc2goDLC2rst06Rmp0L1ygsTVNa7UWNUwF3ZJ5O+mKngOCYR8TJdt/kxZIR8Bif9K i9igHQ0bfWjEO9ZvAyv9/OBbG802zgdP001KQIF7pOXyJSj2NdkI97F1lzibMzx0RC9y 7ha2odkmsL+ClRfdKQ2siZTc1gOJxEjiWrORU39QdiTl36FlmhI+pO/0lRqxKEQpPn+/ 9+5g== 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:dmarc-filter:arc-authentication-results; bh=BTqu3ibC4ZOH8i8R8iQc9+caJiAEv3sqIkOv0kb225c=; b=x0MbbgFr4oF4TZzNDriMmsi1aLqh/fF9NB38900Kq8HeLvxdj//NtOflgLUdC09lzR mVvA2UVvQ81Fk6bU/cDf29sY9xy6bMyDJv98NPKLP3nP4ECzH1qBfffcVEwz7bBND5r4 Hso77CpEca8wh/tTXy7ao48hKGNGHncJqJ6tkpmpwwpkSsJ/fIDk+MDCqiPRl1JcJYRc 1Hu2Nbxs2azRDqVQxjCYz4SYCMcokYRaS2zMqOA11nsQSGtp9IPwRpQ6obzGhm/Vfe/3 rusAOAD0Cz8alNBVm5X5E/xUO8GyrLiLfB4o5KT9D3WcCjolkAS0CKyeeqhe08XMOl2b PDNQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si5373236pfh.215.2018.01.17.15.29.12; Wed, 17 Jan 2018 15:29:27 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710AbeAQX2q (ORCPT + 99 others); Wed, 17 Jan 2018 18:28:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:56382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752791AbeAQX2o (ORCPT ); Wed, 17 Jan 2018 18:28:44 -0500 Received: from localhost (unknown [69.71.4.159]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2BE0320C0F; Wed, 17 Jan 2018 23:28:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BE0320C0F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Wed, 17 Jan 2018 17:28:40 -0600 From: Bjorn Helgaas To: poza@codeaurora.org Cc: Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi Subject: Re: [PATCH v4 2/5] PCI/ERR: Rename error reporting to generic pci naming Message-ID: <20180117232840.GA53542@bhelgaas-glaptop.roam.corp.google.com> References: <1516096723-8013-1-git-send-email-poza@codeaurora.org> <1516096723-8013-3-git-send-email-poza@codeaurora.org> <20180117011624.GG10860@bhelgaas-glaptop.roam.corp.google.com> <553ef73a25bbbd6e0211c9bc6867a4a7@codeaurora.org> <6d7a3d050bd3f4ee9eac2aeb3de47786@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d7a3d050bd3f4ee9eac2aeb3de47786@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 17, 2018 at 02:00:40PM +0530, poza@codeaurora.org wrote: > On 2018-01-17 13:54, poza@codeaurora.org wrote: > >On 2018-01-17 06:46, Bjorn Helgaas wrote: > >>On Tue, Jan 16, 2018 at 03:28:40PM +0530, Oza Pawandeep wrote: > >>>This patch renames error reporting to generic function with > >>>pci prefix > >>> > >>>Signed-off-by: Oza Pawandeep > >>> > >>>diff --git a/drivers/pci/pcie/aer/aerdrv_core.c > >>>b/drivers/pci/pcie/aer/aerdrv_core.c > >>>index 4fda843..5ed9575 100644 > >>>--- a/drivers/pci/pcie/aer/aerdrv_core.c > >>>+++ b/drivers/pci/pcie/aer/aerdrv_core.c > >>>@@ -285,7 +285,7 @@ static void handle_error_source(struct > >>>pcie_device *aerdev, > >>> pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, > >>> info->status); > >>> } else > >>>- do_recovery(dev, info->severity); > >>>+ pci_do_recovery(dev, info->severity); > >>> } > >>> > >>> #ifdef CONFIG_ACPI_APEI_PCIEAER > >>>@@ -349,7 +349,7 @@ static void aer_recover_work_func(struct > >>>work_struct *work) > >>> continue; > >>> } > >>> cper_print_aer(pdev, entry.severity, entry.regs); > >>>- do_recovery(pdev, entry.severity); > >>>+ pci_do_recovery(pdev, entry.severity); > >>> pci_dev_put(pdev); > >>> } > >>> } > >>>diff --git a/drivers/pci/pcie/pcie-err.c > >>>b/drivers/pci/pcie/pcie-err.c > >>>index 76e66bb..5792a9f 100644 > >>>--- a/drivers/pci/pcie/pcie-err.c > >>>+++ b/drivers/pci/pcie/pcie-err.c > >>>@@ -20,12 +20,12 @@ > >>> #include > >>> #include "portdrv.h" > >>> > >>>-struct aer_broadcast_data { > >>>+struct pci_err_broadcast_data { > >>> enum pci_channel_state state; > >>> enum pci_ers_result result; > >>> }; > >>> > >>>-pci_ers_result_t merge_result(enum pci_ers_result orig, > >>>+pci_ers_result_t pci_merge_result(enum pci_ers_result orig, > >> > >>Most of these functions started out static in aerdrv_core.c and should > >>remain static. Therefore, they do not need to be renamed. Same for > >>the struct aer_broadcast_data. > > ok so in conclusion I should rename only do_recovery. nothing else > to be renamed. > and keep the functions static after moving them to pci_err.c. Functions should always be static whenever possible. Names of static functions need not contain the subsystem. It's sometimes nice if they do, but in this case I think a rename adds confusion but no real benefit.