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

Merge tag 'for-linus-6.19-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen updates from Juergen Gross:
"This round it contains only three small cleanup patches"

* tag 'for-linus-6.19-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
drivers/xen: use min() instead of min_t()
drivers/xen/xenbus: Replace deprecated strcpy in xenbus_transaction_end
drivers/xen/xenbus: Simplify return statement in join()

+7 -13
+1 -1
drivers/xen/grant-table.c
··· 1204 1204 unsigned int glen; 1205 1205 unsigned long xen_pfn; 1206 1206 1207 - len = min_t(unsigned int, PAGE_SIZE - offset, len); 1207 + len = min(PAGE_SIZE - offset, len); 1208 1208 goffset = xen_offset_in_page(offset); 1209 1209 1210 1210 xen_pfn = page_to_xen_pfn(page) + XEN_PFN_DOWN(offset);
+5 -11
drivers/xen/xenbus/xenbus_xs.c
··· 407 407 buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s", dir); 408 408 else 409 409 buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s/%s", dir, name); 410 - return (!buffer) ? ERR_PTR(-ENOMEM) : buffer; 410 + return buffer ?: ERR_PTR(-ENOMEM); 411 411 } 412 412 413 413 static char **split_strings(char *strings, unsigned int len, unsigned int *num) ··· 546 546 EXPORT_SYMBOL_GPL(xenbus_transaction_start); 547 547 548 548 /* End a transaction. 549 - * If abandon is true, transaction is discarded instead of committed. 549 + * If abort is true, transaction is discarded instead of committed. 550 550 */ 551 - int xenbus_transaction_end(struct xenbus_transaction t, int abort) 551 + int xenbus_transaction_end(struct xenbus_transaction t, bool abort) 552 552 { 553 - char abortstr[2]; 554 - 555 - if (abort) 556 - strcpy(abortstr, "F"); 557 - else 558 - strcpy(abortstr, "T"); 559 - 560 - return xs_error(xs_single(t, XS_TRANSACTION_END, abortstr, NULL)); 553 + return xs_error(xs_single(t, XS_TRANSACTION_END, abort ? "F" : "T", 554 + NULL)); 561 555 } 562 556 EXPORT_SYMBOL_GPL(xenbus_transaction_end); 563 557
+1 -1
include/xen/xenbus.h
··· 158 158 const char *dir, const char *node); 159 159 int xenbus_rm(struct xenbus_transaction t, const char *dir, const char *node); 160 160 int xenbus_transaction_start(struct xenbus_transaction *t); 161 - int xenbus_transaction_end(struct xenbus_transaction t, int abort); 161 + int xenbus_transaction_end(struct xenbus_transaction t, bool abort); 162 162 163 163 /* Single read and scanf: returns -errno or num scanned if > 0. */ 164 164 __scanf(4, 5)