remarkable-linux/drivers/edac
Mauro Carvalho Chehab 4796968402 i82975x_edac: Fix dimm label initialization
The driver has only 4 hardcoded labels, but allows much more memory.
Fix it by removing the hardcoded logic, using snprintf() instead.

[   19.833972] general protection fault: 0000 [#1] SMP
[   19.837733] Modules linked in: i82975x_edac(+) edac_core firewire_ohci firewire_core crc_itu_t nouveau mxm_wmi wmi video i2c_algo_bit drm_kms_helper ttm drm i2c_core
[   19.837733] CPU 0
[   19.837733] Pid: 390, comm: udevd Not tainted 3.6.1-1.fc17.x86_64.debug #1 Dell Inc.                 Precision WorkStation 390    /0MY510
[   19.837733] RIP: 0010:[<ffffffff813463a8>]  [<ffffffff813463a8>] strncpy+0x18/0x30
[   19.837733] RSP: 0018:ffff880078535b68  EFLAGS: 00010202
[   19.837733] RAX: ffff880069fa9708 RBX: ffff880078588000 RCX: ffff880069fa9708
[   19.837733] RDX: 000000000000001f RSI: 5f706f5f63616465 RDI: ffff880069fa9708
[   19.837733] RBP: ffff880078535b68 R08: ffff880069fa9727 R09: 000000000000fffe
[   19.837733] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003
[   19.837733] R13: 0000000000000000 R14: ffff880069fa9290 R15: ffff880079624a80
[   19.837733] FS:  00007f3de01ee840(0000) GS:ffff88007c400000(0000) knlGS:0000000000000000
[   19.837733] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   19.837733] CR2: 00007f3de00b9000 CR3: 0000000078dbc000 CR4: 00000000000007f0
[   19.837733] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   19.837733] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   19.837733] Process udevd (pid: 390, threadinfo ffff880078534000, task ffff880079642450)
[   19.837733] Stack:
[   19.837733]  ffff880078535c18 ffffffffa017c6b8 00040000816d627f ffff880079624a88
[   19.837733]  ffffc90004cd6000 ffff880079624520 ffff88007ac21148 0000000000000000
[   19.837733]  0000000000000000 0004000000000000 feda000078535bc8 ffffffff810d696d
[   19.837733] Call Trace:
[   19.837733]  [<ffffffffa017c6b8>] i82975x_init_one+0x2e6/0x3e6 [i82975x_edac]
...

Fix bug reported at:
	https://bugzilla.redhat.com/show_bug.cgi?id=848149
And, very likely:
	https://bbs.archlinux.org/viewtopic.php?id=148033
	https://bugzilla.kernel.org/show_bug.cgi?id=47171

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25 07:17:01 -02:00
..
amd64_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
amd64_edac.h amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac_dbg.c amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac_inj.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
amd76x_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
amd8111_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8111_edac.h edac: AMD8111 driver header file 2009-04-02 19:05:03 -07:00
amd8131_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8131_edac.h tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cell_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
cpc925_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
e7xxx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
e752x_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
edac_core.h Merge branch 'devel' 2012-07-29 21:11:05 -03:00
edac_device.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
edac_device_sysfs.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_mc.c edac_mc: edac_mc_free() cannot assume mem_ctl_info is registered in sysfs. 2012-09-23 14:46:40 -07:00
edac_mc_sysfs.c edac: allow specifying the error count with fake_inject 2012-06-27 09:01:30 -03:00
edac_module.c edac: create top-level debugfs directory 2012-06-12 12:15:49 -03:00
edac_module.h edac: create top-level debugfs directory 2012-06-12 12:15:49 -03:00
edac_pci.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_pci_sysfs.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_stub.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
highbank_l2_edac.c edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
highbank_mc_edac.c edac: add support for Calxeda highbank memory controller 2012-06-27 09:00:57 -03:00
i7core_edac.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
i3000_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i3200_edac.c i3200_edac: Fix memory rank size 2012-09-25 07:32:33 -03:00
i5000_edac.c i5000: Fix the memory size calculation with 2R memories 2012-09-25 07:38:19 -03:00
i5100_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i5400_edac.c edac i5000, i5400: fix pointer math in i5000_get_mc_regs() 2012-06-27 09:08:40 -03:00
i7300_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82443bxgx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82860_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82875p_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
i82975x_edac.c i82975x_edac: Fix dimm label initialization 2012-10-25 07:17:01 -02:00
Kconfig edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
Makefile edac: add support for Calxeda highbank L2 cache ecc 2012-06-27 09:01:29 -03:00
mce_amd.c MCE, AMD: Drop too granulary family model checks 2012-04-04 15:50:11 +02:00
mce_amd.h x86/bitops: Move BIT_64() for a wider use 2012-05-23 17:16:42 +02:00
mce_amd_inj.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
mpc85xx_edac.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
mpc85xx_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
mv64x60_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
pasemi_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
ppc4xx_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
ppc4xx_edac.h edac: new ppc4xx driver module 2009-04-02 19:05:03 -07:00
r82600_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
sb_edac.c sb_edac: Avoid overflow errors at memory size calculation 2012-09-25 07:38:20 -03:00
tile_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00
x38_edac.c edac: edac_mc_handle_error(): add an error_count parameter 2012-06-12 12:15:47 -03:00