Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Руслан Исаев" <ubijca16@gmail.com>
To: linux-pci@vger.kernel.org
Subject: [PATCH] pci: ibmphp: Remove unused functions get_max_adapter_speed(), and get_bus_name() in ibmphp_core.c
Date: Tue, 14 Jul 2020 13:16:04 +0300	[thread overview]
Message-ID: <4b9310fa-f030-b82c-1440-fe2a3a39e21d@gmail.com> (raw)

These functions are commented out and because of that, are unused.

Signed-off-by: Ruslan Isaev <ubijca16@gmail.com>
---
  drivers/pci/hotplug/TODO          |  5 ---
  drivers/pci/hotplug/ibmphp_core.c | 74 -------------------------------
  2 files changed, 79 deletions(-)

diff --git a/drivers/pci/hotplug/TODO b/drivers/pci/hotplug/TODO
index a32070be5adf..856535858ddf 100644
--- a/drivers/pci/hotplug/TODO
+++ b/drivers/pci/hotplug/TODO
@@ -30,11 +30,6 @@ ibmphp:
    or ibmphp should store a pointer to its bus in struct slot. Probably the
    former.

-* The functions get_max_adapter_speed() and get_bus_name() are 
commented out.
-  Can they be deleted?  There are also forward declarations at the top of
-  ibmphp_core.c as well as pointers in ibmphp_hotplug_slot_ops, likewise
-  commented out.
-
  * ibmphp_init_devno() takes a struct slot **, it could instead take a
    struct slot *.

diff --git a/drivers/pci/hotplug/ibmphp_core.c 
b/drivers/pci/hotplug/ibmphp_core.c
index 17124254d897..197997e264a2 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -50,14 +50,6 @@ static int irqs[16];    /* PIC mode IRQs we're using 
so far (in case MPS

  static int init_flag;

-/*
-static int get_max_adapter_speed_1 (struct hotplug_slot *, u8 *, u8);
-
-static inline int get_max_adapter_speed (struct hotplug_slot *hs, u8 
*value)
-{
-    return get_max_adapter_speed_1 (hs, value, 1);
-}
-*/
  static inline int get_cur_bus_info(struct slot **sl)
  {
      int rc = 1;
@@ -401,69 +393,6 @@ static int get_max_bus_speed(struct slot *slot)
      return rc;
  }

-/*
-static int get_max_adapter_speed_1(struct hotplug_slot *hotplug_slot, 
u8 *value, u8 flag)
-{
-    int rc = -ENODEV;
-    struct slot *pslot;
-    struct slot myslot;
-
-    debug("get_max_adapter_speed_1 - Entry hotplug_slot[%lx] 
pvalue[%lx]\n",
-                        (ulong)hotplug_slot, (ulong) value);
-
-    if (flag)
-        ibmphp_lock_operations();
-
-    if (hotplug_slot && value) {
-        pslot = hotplug_slot->private;
-        if (pslot) {
-            memcpy(&myslot, pslot, sizeof(struct slot));
-            rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
-                        &(myslot.status));
-
-            if (!(SLOT_LATCH (myslot.status)) &&
-                    (SLOT_PRESENT (myslot.status))) {
-                rc = ibmphp_hpc_readslot(pslot,
-                        READ_EXTSLOTSTATUS,
-                        &(myslot.ext_status));
-                if (!rc)
-                    *value = SLOT_SPEED(myslot.ext_status);
-            } else
-                *value = MAX_ADAPTER_NONE;
-        }
-    }
-
-    if (flag)
-        ibmphp_unlock_operations();
-
-    debug("get_max_adapter_speed_1 - Exit rc[%d] value[%x]\n", rc, *value);
-    return rc;
-}
-
-static int get_bus_name(struct hotplug_slot *hotplug_slot, char *value)
-{
-    int rc = -ENODEV;
-    struct slot *pslot = NULL;
-
-    debug("get_bus_name - Entry hotplug_slot[%lx]\n", (ulong)hotplug_slot);
-
-    ibmphp_lock_operations();
-
-    if (hotplug_slot) {
-        pslot = hotplug_slot->private;
-        if (pslot) {
-            rc = 0;
-            snprintf(value, 100, "Bus %x", pslot->bus);
-        }
-    } else
-        rc = -ENODEV;
-
-    ibmphp_unlock_operations();
-    debug("get_bus_name - Exit rc[%d] value[%x]\n", rc, *value);
-    return rc;
-}
-*/
-
  /****************************************************************************
   * This routine will initialize the ops data structure used in the 
validate
   * function. It will also power off empty slots that are powered on 
since BIOS
@@ -1231,9 +1160,6 @@ const struct hotplug_slot_ops 
ibmphp_hotplug_slot_ops = {
      .get_attention_status =        get_attention_status,
      .get_latch_status =        get_latch_status,
      .get_adapter_status =        get_adapter_present,
-/*    .get_max_adapter_speed =    get_max_adapter_speed,
-    .get_bus_name_status =        get_bus_name,
-*/
  };

  static void ibmphp_unload(void)
-- 
2.27.0.windows.1



             reply	other threads:[~2020-07-14 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 10:16 Руслан Исаев [this message]
2020-07-14 19:17 ` [PATCH] pci: ibmphp: Remove unused functions get_max_adapter_speed(), and get_bus_name() in ibmphp_core.c Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b9310fa-f030-b82c-1440-fe2a3a39e21d@gmail.com \
    --to=ubijca16@gmail.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox