mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] edac: remove dev_attr_sdram_scrub_rate on failure and destory path
@ 2015-02-04  0:49 Junjie Mao
  2015-02-06 11:58 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Junjie Mao @ 2015-02-04  0:49 UTC (permalink / raw)
  To: Doug Thompson
  Cc: Borislav Petkov, Mauro Carvalho Chehab, linux-edac, linux-kernel,
	Junjie Mao

v2: also remove the sysfs node in edac_remove_sysfs_mci_device

Signed-off-by: Junjie Mao <junjie.mao@hotmail.com>
---
 drivers/edac/edac_mc_sysfs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 8e48d32efe37..97eefc409cac 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -1068,6 +1068,8 @@ fail_unregister_dimm:
 			continue;
 		device_unregister(&dimm->dev);
 	}
+	if (mci->set_sdram_scrub_rate || mci->get_sdram_scrub_rate)
+		device_remove_file(&mci->dev, &dev_attr_sdram_scrub_rate);
 fail_unregister_dev:
 	device_unregister(&mci->dev);
 fail_unregister_bus:
@@ -1100,6 +1102,9 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
 		edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev));
 		device_unregister(&dimm->dev);
 	}
+
+	if (mci->set_sdram_scrub_rate || mci->get_sdram_scrub_rate)
+		device_remove_file(&mci->dev, &dev_attr_sdram_scrub_rate);
 }

 void edac_unregister_sysfs(struct mem_ctl_info *mci)
--
1.9.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] edac: remove dev_attr_sdram_scrub_rate on failure and destory path
  2015-02-04  0:49 [PATCH v2] edac: remove dev_attr_sdram_scrub_rate on failure and destory path Junjie Mao
@ 2015-02-06 11:58 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2015-02-06 11:58 UTC (permalink / raw)
  To: Junjie Mao; +Cc: Doug Thompson, Mauro Carvalho Chehab, linux-edac, linux-kernel

On Wed, Feb 04, 2015 at 08:49:01AM +0800, Junjie Mao wrote:
> v2: also remove the sysfs node in edac_remove_sysfs_mci_device
> 
> Signed-off-by: Junjie Mao <junjie.mao@hotmail.com>
> ---

Thanks Junjie, but I took Takashi's patch instead which converts EDAC
sysfs to attribute groups, see here:

http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/commit/?h=edac-for-3.21&id=590cc857a3e6c5066be67e5f4b24831efb0feaee

which saves a lot of code and makes this sysfs nodes handling much more
straightforward.

Don't give up though, there are many more bugs lurking in the kernel. :-D

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-06 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04  0:49 [PATCH v2] edac: remove dev_attr_sdram_scrub_rate on failure and destory path Junjie Mao
2015-02-06 11:58 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®