EDAC, thunderx: Maintain platform device symlinks for LMC instances

From: Sergey Temerkhanov <hidden>
Date: 2017-06-01 20:12:02

On Thu, Jun 1, 2017 at 9:06 PM, Borislav Petkov [off-list ref] wrote:
On Wed, May 31, 2017 at 06:51:19PM +0300, Sergey Temerkhanov wrote:
quoted
From: Sergey Temerkhanov <redacted>

Maintain the device symlink for ThunderX LMC device instances
the same way as it's done for generic EDAC devices

Signed-off-by: Sergey Temerkhanov <redacted>
---
 drivers/edac/thunderx_edac.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/drivers/edac/thunderx_edac.c b/drivers/edac/thunderx_edac.c
index 86d585cb6d32..67f95a3072f9 100644
--- a/drivers/edac/thunderx_edac.c
+++ b/drivers/edac/thunderx_edac.c
@@ -675,6 +675,8 @@ static inline int pci_dev_to_mc_idx(struct pci_dev *pdev)
      return ret;
 }

+#define LMC_DEVICE_SYMLINK "device"
+
 static int thunderx_lmc_probe(struct pci_dev *pdev,
                              const struct pci_device_id *id)
 {
@@ -793,6 +795,14 @@ static int thunderx_lmc_probe(struct pci_dev *pdev,
              goto err_free;
      }

+     ret = sysfs_create_link(&mci->dev.kobj,
+                             &mci->pdev->kobj, LMC_DEVICE_SYMLINK);
Hmm, edac_device_add_device() -> edac_device_create_sysfs() already does
that. And your ocx and l2c things do that. Why aren't you doing the same
for the lmc?
LMCs are memory controllers so I use edac_mc_add_mc() for these.

Regards,
Sergey
--
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help