mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
Changes in this cycle:
- Simplify add_rtc_cmos() - Use strscpy() in the mcelog code Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmPzdU8RHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1gS6w/8DFsYUIK4CGEtG0MYH+DUVsz/zyo4pejM yukMpKxXMJKi7pZ6k+0he9LOawa2WeK/hzzJh0zP3EzJtF1RR831XSsGRNPu3OTQ Q6mAuFdlLC1EAgJs6muqhIF5/bxfti6pFpZBN8Dwi/9VPpUQwayOgaJXysiRA2aN r/czEgp5fGgExC4QLE6HIPIzhsyjUlngH2F4xNeO13cS6S0T3Ns1xcSJs9jJfwMW 2Vx0FCSo/cj8Hdr10NGEJNrqCzN9yvUuZuQ4utp6yf03zWyP1L4c2MB0E+aw6d1c ygpYWm400vlEFHfT8x9UVnybR5wABG4GP8JNtSBHASk7rNPKl5cKfOIPHzdsCnFO bHh1Xc4gduFVB8nUilUlcvoseum8GaYOqhi6ov2hwq+n47uam9H5QlCWn7OyLBbW 88Ajg+wqNxG/R3mhyPslXDMr/dccQ9mcZSxbPDX14LpG8bWAjvM3yP43N8w6myVs 1Br8Lsbf8lm5jiJ5hv2GBGQa9eDA0qLBFnkvBTe9zx7AV/K/KnTUXlK2DdeZVfO8 eqgyTrXANyyJqTC/s2GAOLFwySRZFx9EHw6Kg8cmjoG9o8VCpXljQ8qj71ZOtFlo xBDlmg4Y6czRZC2kQEFC1kA30nLw+2UAnOEwr11JgGod9K+DqFtLKnVVEsrtxmGH E7ccV3QRc/Q= =Nuzs -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
89f5349e06
@ -105,8 +105,7 @@ static ssize_t set_trigger(struct device *s, struct device_attribute *attr,
|
||||
{
|
||||
char *p;
|
||||
|
||||
strncpy(mce_helper, buf, sizeof(mce_helper));
|
||||
mce_helper[sizeof(mce_helper)-1] = 0;
|
||||
strscpy(mce_helper, buf, sizeof(mce_helper));
|
||||
p = strchr(mce_helper, '\n');
|
||||
|
||||
if (p)
|
||||
|
@ -138,15 +138,12 @@ static __init int add_rtc_cmos(void)
|
||||
static const char * const ids[] __initconst =
|
||||
{ "PNP0b00", "PNP0b01", "PNP0b02", };
|
||||
struct pnp_dev *dev;
|
||||
struct pnp_id *id;
|
||||
int i;
|
||||
|
||||
pnp_for_each_dev(dev) {
|
||||
for (id = dev->id; id; id = id->next) {
|
||||
for (i = 0; i < ARRAY_SIZE(ids); i++) {
|
||||
if (compare_pnp_id(id, ids[i]) != 0)
|
||||
return 0;
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(ids); i++) {
|
||||
if (compare_pnp_id(dev->id, ids[i]) != 0)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user