Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1819323lqa; Mon, 29 Apr 2024 23:14:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWltvxj1J5PO/jE9vZCSv4ZZ3i86v2ECT0KjAWJBQRKBTkA7Rm02CavmbhQ6+10r3Yx22hB4WEnhLdg4izcjEJp4VuFZkzO2OlKXdK9WA== X-Google-Smtp-Source: AGHT+IGgBwhuCXl98XYK9+aNk434Z0rHGLj7or9BXpcAK+kBXGQAa/1kXs73j+8GDXBJRnO0dz7b X-Received: by 2002:a17:90b:2e8e:b0:2b2:813e:a7b with SMTP id sn14-20020a17090b2e8e00b002b2813e0a7bmr1081146pjb.10.1714457676603; Mon, 29 Apr 2024 23:14:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714457676; cv=pass; d=google.com; s=arc-20160816; b=fWe0d1RzWHXTqN+973Ho9ns0OIdZmy3o0ZffU/2jXWDV4OVaAdijwYUe1zBHROa+Ah Qj7fNYRhlKqHiAxh1qVz3U7h1HNyafDD/fOrDA/Y7pZ/KWkUtos3F2xuGcORw5Xv3Gcr EITqtOKjOawz7auqDKYPFpsb/pKCYHWNAT9dnKNw47pHId7ELlHiz+LdpaLbN7AwOvWt IHEU7k5ouiyIMCAG44vxw2v8ok9+tRHFo4baVjvE62fIWIqbvLIlC+YnDdy47gnEN4+w rYoVQhExzwNQM8Z4lCVBMNHeNbyCf4ssg+rcTTm8jh4dbEcBEo8sVkodc2h6K5GFdCBP 09HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=RXHWTwzfZvv6uYitrN43H3qh6MlnEfQjLqcWZK2Nh3g=; fh=oA1ZKtfis3Z4p7aKHjj50K0hTa9nRD4vk7jDUTuu9tM=; b=gJJBjmJP1d+OMnfu6t4Wx7tEBuU65Lcdk7VCI4hlelQ/v8lmn43EoXhU22BCisKlsY OB4mi9C/F/nxuh9HLnyvDZRxB1QRltw0fRwxr+eSrgdvUy8y/rOsXKOvDhRObegC0n0v 3zetc7ByRD5sM4MJNpUMtxZwp2uxTP8rqG5Ah9pPm4wON1d5D+RF8F2ZdnOI84yOFeC9 XmsyX4StF1OsPL8aDDnswC5O+Utwfv7Eo5mnWABlS9+2Cp9eMnBa54K1/U38Jl3Ealct PWjWqX6q3H56d+9vYNEmfnw9KOMf7YtvcTc/wLrO59ZhXltDhiWCtK4R0AXlYz5Xv8iH RfsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iBm+pmxv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163399-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bf9-20020a17090b0b0900b002a79ba0f002si20729450pjb.189.2024.04.29.23.14.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 23:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163399-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iBm+pmxv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163399-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3EC22281843 for ; Tue, 30 Apr 2024 06:14:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6C6B219E2; Tue, 30 Apr 2024 06:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iBm+pmxv" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 264511B96B for ; Tue, 30 Apr 2024 06:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714457644; cv=none; b=pAeo/WaVQoY07HVbVrfvfeu+zfnpZ/IKgoDDjS9Pi//w8bnTLWvsMd2kIVNnB9QI2gAmfSALRR3TJ/oehEMuaqp9xCQWB5VoTvbtaDWq7DBdw287nzjcjlfv+q/lUiWjVpB3oCeFE/alYKRq8OZ9nVrn7J78FBxVgylfK9gtFnw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714457644; c=relaxed/simple; bh=yKmOOaJz6i/wVDMqUoPJz0PoZUhAo27Wo6a6cpCeIcI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JfW5F/fop82wXY1QpyyLF9PidGl7kEBcAMwXQmBw3aZRVsJfjK9HKbn4/ouBNLfEZh/earHmcBo+dlMi/qGwRWIOdwKCbjrfFQNWajrkKON0SOhTRaZ/j4v4DEKBHPJL7+V54RiO0utIME1Lj2O+6uuHOHgFYtHJMRTD5dWg8bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=iBm+pmxv; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f4178aec15so81973b3a.0 for ; Mon, 29 Apr 2024 23:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714457642; x=1715062442; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RXHWTwzfZvv6uYitrN43H3qh6MlnEfQjLqcWZK2Nh3g=; b=iBm+pmxvSmGk0eyqrS2uwTsOHARu66rKLTZTE7mr+2uNTTi6AiIwipBaXJaj9zTBol cb886gIjMMZqfRSsSL76euGZmMhZRFrjPJzsAffp+83Nz1ET6UX3rrWk43QerhE3G3+A /r/hPl769n+QXQZtMDz1YUg+cIGDWYAk7iW2H7YBGdVFVkZDReHBuJ0uFfm8nQX6zKRJ 14PQr0GaV3EsJm14swLRJaAyotKl9cN9Pn1l2TTNq90ZaF7pwVOAX8K1oi2L/RBBo6gD LVBntDAoWFzhjQ7fX6mx0uZhPSK1tlQufSL1H3ZNsVa8hxkGKehVE74pbg20bV9obweB zn2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714457642; x=1715062442; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RXHWTwzfZvv6uYitrN43H3qh6MlnEfQjLqcWZK2Nh3g=; b=ByMaqrjVXFVvh29FXa+okB3tOPNZIOx9RVgHtAlDhKQUP4q7smzNinY5ZFF3ghlddN 8gL7W6DuBtQ0I3WlWipl7dp1VbvgN2wifsC89+P0Id4TFxiEPehBLU4u2UDBR+fY9Ju3 8x1vqci755P58GtgB+Vh1rj/UvR1/FkEVQMb78AoVu6L6gSbiuMjs23EFsyOxVGW4UDu N5tWJO+SI/qvZ7zCoGxis6Z381lUPJSFmR/qjoY5ZG1MAxzKIoF9eWMxCFMkitddr/Zq KrSwYD1ZxL0tRTAuo9NVUtXrE5awb5cOgm9wwKSp+SDRjy4vmCU32/d78PVs+1pAhAy2 +LYg== X-Forwarded-Encrypted: i=1; AJvYcCXGVICcsDUpET/Pnh++cEv/51mzuJlOI4qCT1MFc9tXNErO3LgSxaqFj10JbxjBNH1I/YDnBrsTzoUj0bG01YaFptf+vZVFJTwv6MMq X-Gm-Message-State: AOJu0Yzc4jxUV2PJ8Cx7KHlFvXMF48yGmKSPbZI+ulUEjQzDkADLwN7k tT6fXMTRLrj0j2cY6ATpGmQ4GRJyeGLqgqroqEWYfi4aOBNUQncUKACIDmEh1w== X-Received: by 2002:a05:6a20:918e:b0:1ac:6762:e62e with SMTP id v14-20020a056a20918e00b001ac6762e62emr15304457pzd.30.1714457642237; Mon, 29 Apr 2024 23:14:02 -0700 (PDT) Received: from [127.0.1.1] ([220.158.156.15]) by smtp.gmail.com with ESMTPSA id bi2-20020a170902bf0200b001e27ad5199csm21393298plb.281.2024.04.29.23.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 23:14:01 -0700 (PDT) From: Manivannan Sadhasivam Date: Tue, 30 Apr 2024 11:43:43 +0530 Subject: [PATCH v4 02/10] PCI: endpoint: Rename core_init() callback in 'struct pci_epc_event_ops' to epc_init() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240430-pci-epf-rework-v4-2-22832d0d456f@linaro.org> References: <20240430-pci-epf-rework-v4-0-22832d0d456f@linaro.org> In-Reply-To: <20240430-pci-epf-rework-v4-0-22832d0d456f@linaro.org> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I , Jingoo Han , Thierry Reding , Jonathan Hunter Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-tegra@vger.kernel.org, Niklas Cassel , Manivannan Sadhasivam X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5614; i=manivannan.sadhasivam@linaro.org; h=from:subject:message-id; bh=yKmOOaJz6i/wVDMqUoPJz0PoZUhAo27Wo6a6cpCeIcI=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBmMIwbIgMEUUVe4HsEcCgfAQPJnzSfgUhA+mY8J 1G3MD3KQrqJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCZjCMGwAKCRBVnxHm/pHO 9VZOB/48tkYcFkSJngFn0it+wlMUxFNsv5Wi3aeZerWI8GdEuH0YGu2iiVpSTxN5F6qWIrDnvtg 5hH4UgGPYAgXOD6pjAe7mvr1jkuG3KkC+KfQdbkT8kvO6yCXFkyNUfPlzUBNY5yqwNrVZeZNqt4 wse4giYnhWc2KGJ1MpQJVV0gvcGR+UZCRJJ7YjNTCiAPfy1JQCzH8BswrxKacovF7qUek6zWAYQ KFPH8vJO1HFaIc0cbRuL32PFy2o8B1pu/r252b6akQJATr5BsW04nEZCsgKcNtZFkcV8uj5zwtE TnG2ysOFzPAPWBXdU+xxb25slgqbC96twv8UgMiwQMLQRf0B X-Developer-Key: i=manivannan.sadhasivam@linaro.org; a=openpgp; fpr=C668AEC3C3188E4C611465E7488550E901166008 core_init() callback is used to notify the EPC initialization event to the EPF drivers. The 'core' prefix was used indicate that the controller IP core has completed initialization. But it serves no purpose as the EPF driver will only care about the EPC initialization as a whole and there is no real benefit to distinguish the IP core part. So let's rename the core_init() callback in 'struct pci_epc_event_ops' to epc_init() to make it more clear. Reviewed-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam --- drivers/pci/endpoint/functions/pci-epf-mhi.c | 4 ++-- drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++-- drivers/pci/endpoint/pci-epc-core.c | 16 ++++++++-------- include/linux/pci-epf.h | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index 2c54d80107cf..95c3206f609f 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -716,7 +716,7 @@ static void pci_epf_mhi_dma_deinit(struct pci_epf_mhi *epf_mhi) epf_mhi->dma_chan_rx = NULL; } -static int pci_epf_mhi_core_init(struct pci_epf *epf) +static int pci_epf_mhi_epc_init(struct pci_epf *epf) { struct pci_epf_mhi *epf_mhi = epf_get_drvdata(epf); const struct pci_epf_mhi_ep_info *info = epf_mhi->info; @@ -897,7 +897,7 @@ static void pci_epf_mhi_unbind(struct pci_epf *epf) } static const struct pci_epc_event_ops pci_epf_mhi_event_ops = { - .core_init = pci_epf_mhi_core_init, + .epc_init = pci_epf_mhi_epc_init, .link_up = pci_epf_mhi_link_up, .link_down = pci_epf_mhi_link_down, .bme = pci_epf_mhi_bme, diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 977fb79c1567..8175d4f2a0eb 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -731,7 +731,7 @@ static int pci_epf_test_set_bar(struct pci_epf *epf) return 0; } -static int pci_epf_test_core_init(struct pci_epf *epf) +static int pci_epf_test_epc_init(struct pci_epf *epf) { struct pci_epf_test *epf_test = epf_get_drvdata(epf); struct pci_epf_header *header = epf->header; @@ -799,7 +799,7 @@ static int pci_epf_test_link_up(struct pci_epf *epf) } static const struct pci_epc_event_ops pci_epf_test_event_ops = { - .core_init = pci_epf_test_core_init, + .epc_init = pci_epf_test_epc_init, .link_up = pci_epf_test_link_up, }; diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index 47d27ec7439d..e6bffa37a948 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -727,9 +727,9 @@ void pci_epc_linkdown(struct pci_epc *epc) EXPORT_SYMBOL_GPL(pci_epc_linkdown); /** - * pci_epc_init_notify() - Notify the EPF device that EPC device's core - * initialization is completed. - * @epc: the EPC device whose core initialization is completed + * pci_epc_init_notify() - Notify the EPF device that EPC device initialization + * is completed. + * @epc: the EPC device whose initialization is completed * * Invoke to Notify the EPF device that the EPC device's initialization * is completed. @@ -744,8 +744,8 @@ void pci_epc_init_notify(struct pci_epc *epc) mutex_lock(&epc->list_lock); list_for_each_entry(epf, &epc->pci_epf, list) { mutex_lock(&epf->lock); - if (epf->event_ops && epf->event_ops->core_init) - epf->event_ops->core_init(epf); + if (epf->event_ops && epf->event_ops->epc_init) + epf->event_ops->epc_init(epf); mutex_unlock(&epf->lock); } epc->init_complete = true; @@ -756,7 +756,7 @@ EXPORT_SYMBOL_GPL(pci_epc_init_notify); /** * pci_epc_notify_pending_init() - Notify the pending EPC device initialization * complete to the EPF device - * @epc: the EPC device whose core initialization is pending to be notified + * @epc: the EPC device whose initialization is pending to be notified * @epf: the EPF device to be notified * * Invoke to notify the pending EPC device initialization complete to the EPF @@ -767,8 +767,8 @@ void pci_epc_notify_pending_init(struct pci_epc *epc, struct pci_epf *epf) { if (epc->init_complete) { mutex_lock(&epf->lock); - if (epf->event_ops && epf->event_ops->core_init) - epf->event_ops->core_init(epf); + if (epf->event_ops && epf->event_ops->epc_init) + epf->event_ops->epc_init(epf); mutex_unlock(&epf->lock); } } diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h index adee6a1b35db..afe3bfd88742 100644 --- a/include/linux/pci-epf.h +++ b/include/linux/pci-epf.h @@ -70,13 +70,13 @@ struct pci_epf_ops { /** * struct pci_epc_event_ops - Callbacks for capturing the EPC events - * @core_init: Callback for the EPC initialization complete event + * @epc_init: Callback for the EPC initialization complete event * @link_up: Callback for the EPC link up event * @link_down: Callback for the EPC link down event * @bme: Callback for the EPC BME (Bus Master Enable) event */ struct pci_epc_event_ops { - int (*core_init)(struct pci_epf *epf); + int (*epc_init)(struct pci_epf *epf); int (*link_up)(struct pci_epf *epf); int (*link_down)(struct pci_epf *epf); int (*bme)(struct pci_epf *epf); -- 2.25.1