Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 platform update from Ingo Molnar:

- Simplify add_rtc_cmos()

- Use strscpy() in the mcelog code

* tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mce/dev-mcelog: use strscpy() to instead of strncpy()
x86/rtc: Simplify PNP ids check

+4 -8
+1 -2
arch/x86/kernel/cpu/mce/dev-mcelog.c
··· 105 105 { 106 106 char *p; 107 107 108 - strncpy(mce_helper, buf, sizeof(mce_helper)); 109 - mce_helper[sizeof(mce_helper)-1] = 0; 108 + strscpy(mce_helper, buf, sizeof(mce_helper)); 110 109 p = strchr(mce_helper, '\n'); 111 110 112 111 if (p)
+3 -6
arch/x86/kernel/rtc.c
··· 138 138 static const char * const ids[] __initconst = 139 139 { "PNP0b00", "PNP0b01", "PNP0b02", }; 140 140 struct pnp_dev *dev; 141 - struct pnp_id *id; 142 141 int i; 143 142 144 143 pnp_for_each_dev(dev) { 145 - for (id = dev->id; id; id = id->next) { 146 - for (i = 0; i < ARRAY_SIZE(ids); i++) { 147 - if (compare_pnp_id(id, ids[i]) != 0) 148 - return 0; 149 - } 144 + for (i = 0; i < ARRAY_SIZE(ids); i++) { 145 + if (compare_pnp_id(dev->id, ids[i]) != 0) 146 + return 0; 150 147 } 151 148 } 152 149 #endif