[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180720034920.77320-4-toddpoynor@gmail.com>
Date: Thu, 19 Jul 2018 20:49:03 -0700
From: Todd Poynor <toddpoynor@...il.com>
To: Rob Springer <rspringer@...gle.com>,
John Joseph <jnjoseph@...gle.com>,
Ben Chan <benchan@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Zhongze Hu <frankhu@...omium.org>, Simon Que <sque@...omium.org>,
Dmitry Torokhov <dtor@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Todd Poynor <toddpoynor@...gle.com>
Subject: [PATCH 03/20] staging: gasket: remove code for no physical device
From: Todd Poynor <toddpoynor@...gle.com>
gasket_enable_dev code for enabling a gasket device with no physical PCI
device registered shouldn't be necessary.
Reported-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
drivers/staging/gasket/gasket_core.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index f327c9d7f90a3..18cc8e3283b39 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -898,7 +898,6 @@ static int gasket_enable_dev(
{
int tbl_idx;
int ret;
- struct device *ddev;
const struct gasket_driver_desc *driver_desc =
internal_desc->driver_desc;
@@ -919,21 +918,12 @@ static int gasket_enable_dev(
for (tbl_idx = 0; tbl_idx < driver_desc->num_page_tables; tbl_idx++) {
gasket_log_debug(
gasket_dev, "Initializing page table %d.", tbl_idx);
- if (gasket_dev->pci_dev) {
- ddev = &gasket_dev->pci_dev->dev;
- } else {
- gasket_log_error(
- gasket_dev,
- "%s with no physical device!!", __func__);
- WARN_ON(1);
- ddev = NULL;
- }
ret = gasket_page_table_init(
&gasket_dev->page_table[tbl_idx],
&gasket_dev->bar_data[
driver_desc->page_table_bar_index],
&driver_desc->page_table_configs[tbl_idx],
- ddev, gasket_dev->pci_dev, true);
+ &gasket_dev->pci_dev->dev, gasket_dev->pci_dev, true);
if (ret) {
gasket_log_error(
gasket_dev,
--
2.18.0.233.g985f88cf7e-goog
Powered by blists - more mailing lists