···336336- ``--list_tests_attr``: If set, lists all tests that will be run and all of their337337 attributes.338338339339+- ``--list_suites``: If set, lists all suites that will be run.340340+339341Command-line completion340342==============================341343
···178178179179static int __init ax45mp_cache_init(void)180180{181181- struct device_node *np;182181 struct resource res;183182 int ret;184183185185- np = of_find_matching_node(NULL, ax45mp_cache_ids);184184+ struct device_node *np __free(device_node) =185185+ of_find_matching_node(NULL, ax45mp_cache_ids);186186 if (!of_device_is_available(np))187187 return -ENODEV;188188
+2-2
drivers/cache/starfive_starlink_cache.c
···102102103103static int __init starlink_cache_init(void)104104{105105- struct device_node *np;106105 u32 block_size;107106 int ret;108107109109- np = of_find_matching_node(NULL, starlink_cache_ids);108108+ struct device_node *np __free(device_node) =109109+ of_find_matching_node(NULL, starlink_cache_ids);110110 if (!of_device_is_available(np))111111 return -ENODEV;112112
+1-3
drivers/crypto/ccp/sev-dev.c
···24082408 * in Firmware state on failure. Use snp_reclaim_pages() to24092409 * transition either case back to Hypervisor-owned state.24102410 */24112411- if (snp_reclaim_pages(__pa(data), 1, true)) {24122412- snp_leak_pages(__page_to_pfn(status_page), 1);24112411+ if (snp_reclaim_pages(__pa(data), 1, true))24132412 return -EFAULT;24142414- }24152413 }2416241424172415 if (ret)
+4-4
drivers/firmware/arm_ffa/driver.c
···205205 return 0;206206}207207208208-static int ffa_rxtx_unmap(u16 vm_id)208208+static int ffa_rxtx_unmap(void)209209{210210 ffa_value_t ret;211211212212 invoke_ffa_fn((ffa_value_t){213213- .a0 = FFA_RXTX_UNMAP, .a1 = PACK_TARGET_INFO(vm_id, 0),213213+ .a0 = FFA_RXTX_UNMAP,214214 }, &ret);215215216216 if (ret.a0 == FFA_ERROR)···2097209720982098 pr_err("failed to setup partitions\n");20992099 ffa_notifications_cleanup();21002100- ffa_rxtx_unmap(drv_info->vm_id);21002100+ ffa_rxtx_unmap();21012101free_pages:21022102 if (drv_info->tx_buffer)21032103 free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);···21122112{21132113 ffa_notifications_cleanup();21142114 ffa_partitions_cleanup();21152115- ffa_rxtx_unmap(drv_info->vm_id);21152115+ ffa_rxtx_unmap();21162116 free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz);21172117 free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz);21182118 kfree(drv_info);
+2-2
drivers/firmware/arm_scmi/notify.c
···10661066 * since at creation time we usually want to have all setup and ready before10671067 * events really start flowing.10681068 *10691069- * Return: A properly refcounted handler on Success, NULL on Failure10691069+ * Return: A properly refcounted handler on Success, ERR_PTR on Failure10701070 */10711071static inline struct scmi_event_handler *10721072__scmi_event_handler_get_ops(struct scmi_notify_instance *ni,···11131113 }11141114 mutex_unlock(&ni->pending_mtx);1115111511161116- return hndl;11161116+ return hndl ?: ERR_PTR(-ENODEV);11171117}1118111811191119static struct scmi_event_handler *
+2-2
drivers/firmware/arm_scmi/protocols.h
···189189190190/**191191 * struct scmi_iterator_state - Iterator current state descriptor192192- * @desc_index: Starting index for the current mulit-part request.192192+ * @desc_index: Starting index for the current multi-part request.193193 * @num_returned: Number of returned items in the last multi-part reply.194194 * @num_remaining: Number of remaining items in the multi-part message.195195 * @max_resources: Maximum acceptable number of items, configured by the caller196196 * depending on the underlying resources that it is querying.197197 * @loop_idx: The iterator loop index in the current multi-part reply.198198- * @rx_len: Size in bytes of the currenly processed message; it can be used by198198+ * @rx_len: Size in bytes of the currently processed message; it can be used by199199 * the user of the iterator to verify a reply size.200200 * @priv: Optional pointer to some additional state-related private data setup201201 * by the caller during the iterations.
+3-2
drivers/firmware/arm_scpi.c
···18181919#include <linux/bitmap.h>2020#include <linux/bitfield.h>2121+#include <linux/cleanup.h>2122#include <linux/device.h>2223#include <linux/err.h>2324#include <linux/export.h>···941940 int idx = scpi_drvinfo->num_chans;942941 struct scpi_chan *pchan = scpi_drvinfo->channels + idx;943942 struct mbox_client *cl = &pchan->cl;944944- struct device_node *shmem = of_parse_phandle(np, "shmem", idx);943943+ struct device_node *shmem __free(device_node) =944944+ of_parse_phandle(np, "shmem", idx);945945946946 if (!of_match_node(shmem_of_match, shmem))947947 return -ENXIO;948948949949 ret = of_address_to_resource(shmem, 0, &res);950950- of_node_put(shmem);951950 if (ret) {952951 dev_err(dev, "failed to get SCPI payload mem resource\n");953952 return ret;
+2
drivers/hid/bpf/hid_bpf_dispatch.c
···444444 (u64)(long)ctx,445445 true); /* prevent infinite recursions */446446447447+ if (ret > size)448448+ ret = size;447449 if (ret > 0)448450 memcpy(buf, dma_data, ret);449451
···20572057 rsize = max_buffer_size;2058205820592059 if (csize < rsize) {20602060- dbg_hid("report %d is too short, (%d < %d)\n", report->id,20612061- csize, rsize);20622062- memset(cdata + csize, 0, rsize - csize);20602060+ hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %d)\n",20612061+ report->id, rsize, csize);20622062+ ret = -EINVAL;20632063+ goto out;20632064 }2064206520652066 if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
···354354#define HID_BATTERY_QUIRK_FEATURE (1 << 1) /* ask for feature report */355355#define HID_BATTERY_QUIRK_IGNORE (1 << 2) /* completely ignore the battery */356356#define HID_BATTERY_QUIRK_AVOID_QUERY (1 << 3) /* do not query the battery */357357+#define HID_BATTERY_QUIRK_DYNAMIC (1 << 4) /* report present only after life signs */357358358359static const struct hid_device_id hid_battery_quirks[] = {359360 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,···387386 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,388387 USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),389388 HID_BATTERY_QUIRK_IGNORE },390390- { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),391391- HID_BATTERY_QUIRK_IGNORE },392392- { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN),393393- HID_BATTERY_QUIRK_IGNORE },394389 { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L),395390 HID_BATTERY_QUIRK_AVOID_QUERY },396391 { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW),···399402 * Elan HID touchscreens seem to all report a non present battery,400403 * set HID_BATTERY_QUIRK_IGNORE for all Elan I2C and USB HID devices.401404 */402402- { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE },403403- { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE },405405+ { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_DYNAMIC },406406+ { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_DYNAMIC },404407 {}405408};406409···457460 int ret = 0;458461459462 switch (prop) {460460- case POWER_SUPPLY_PROP_PRESENT:461463 case POWER_SUPPLY_PROP_ONLINE:462464 val->intval = 1;465465+ break;466466+467467+ case POWER_SUPPLY_PROP_PRESENT:468468+ val->intval = dev->battery_present;463469 break;464470465471 case POWER_SUPPLY_PROP_CAPACITY:···577577 if (quirks & HID_BATTERY_QUIRK_AVOID_QUERY)578578 dev->battery_avoid_query = true;579579580580+ dev->battery_present = (quirks & HID_BATTERY_QUIRK_DYNAMIC) ? false : true;581581+580582 dev->battery = power_supply_register(&dev->dev, psy_desc, &psy_cfg);581583 if (IS_ERR(dev->battery)) {582584 error = PTR_ERR(dev->battery);···634632 return;635633636634 if (hidinput_update_battery_charge_status(dev, usage, value)) {635635+ dev->battery_present = true;637636 power_supply_changed(dev->battery);638637 return;639638 }···650647 if (dev->battery_status != HID_BATTERY_REPORTED ||651648 capacity != dev->battery_capacity ||652649 ktime_after(ktime_get_coarse(), dev->battery_ratelimit_time)) {650650+ dev->battery_present = true;653651 dev->battery_capacity = capacity;654652 dev->battery_status = HID_BATTERY_REPORTED;655653 dev->battery_ratelimit_time =
+5-1
drivers/hid/hid-logitech-hidpp.c
···44874487 if (!ret)44884488 ret = hidpp_ff_init(hidpp, &data);4489448944904490- if (ret)44904490+ if (ret) {44914491 hid_warn(hidpp->hid_dev,44924492 "Unable to initialize force feedback support, errno %d\n",44934493 ret);44944494+ ret = 0;44954495+ }44944496 }4495449744964498 /*···46704668 HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb038) },46714669 { /* Slim Solar+ K980 Keyboard over Bluetooth */46724670 HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb391) },46714671+ { /* MX Master 4 mouse over Bluetooth */46724672+ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb042) },46734673 {}46744674};46754675
+7
drivers/hid/hid-multitouch.c
···526526 dev_warn(&hdev->dev, "failed to fetch feature %d\n",527527 report->id);528528 } else {529529+ /* The report ID in the request and the response should match */530530+ if (report->id != buf[0]) {531531+ hid_err(hdev, "Returned feature report did not match the request\n");532532+ goto free;533533+ }534534+529535 ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT, buf,530536 size, 0);531537 if (ret)532538 dev_warn(&hdev->dev, "failed to report feature\n");533539 }534540541541+free:535542 kfree(buf);536543}537544
···118118 hid->product = le16_to_cpu(qsdev->dev_desc.product_id);119119 snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "quickspi-hid",120120 hid->vendor, hid->product);121121+ strscpy(hid->phys, dev_name(qsdev->dev), sizeof(hid->phys));121122122123 ret = hid_add_device(hid);123124 if (ret) {
+10
drivers/hid/wacom_wac.c
···1208120812091209 switch (data[0]) {12101210 case 0x04:12111211+ if (len < 32) {12121212+ dev_warn(wacom->pen_input->dev.parent,12131213+ "Report 0x04 too short: %zu bytes\n", len);12141214+ break;12151215+ }12111216 wacom_intuos_bt_process_data(wacom, data + i);12121217 i += 10;12131218 fallthrough;12141219 case 0x03:12201220+ if (i == 1 && len < 22) {12211221+ dev_warn(wacom->pen_input->dev.parent,12221222+ "Report 0x03 too short: %zu bytes\n", len);12231223+ break;12241224+ }12151225 wacom_intuos_bt_process_data(wacom, data + i);12161226 i += 10;12171227 wacom_intuos_bt_process_data(wacom, data + i);
···136136{137137 u32 val = power_on ? 0 : 1;138138139139+ if (!pwrrdy)140140+ return 0;141141+139142 /* The initialization path guarantees that the mask is 1 bit long. */140143 return regmap_field_update_bits(pwrrdy, 1, val);141144}
+22-2
drivers/soc/fsl/qbman/qman.c
···1827182718281828void qman_destroy_fq(struct qman_fq *fq)18291829{18301830+ int leaked;18311831+18301832 /*18311833 * We don't need to lock the FQ as it is a pre-condition that the FQ be18321834 * quiesced. Instead, run some checks.···18361834 switch (fq->state) {18371835 case qman_fq_state_parked:18381836 case qman_fq_state_oos:18391839- if (fq_isset(fq, QMAN_FQ_FLAG_DYNAMIC_FQID))18401840- qman_release_fqid(fq->fqid);18371837+ /*18381838+ * There's a race condition here on releasing the fqid,18391839+ * setting the fq_table to NULL, and freeing the fqid.18401840+ * To prevent it, this order should be respected:18411841+ */18421842+ if (fq_isset(fq, QMAN_FQ_FLAG_DYNAMIC_FQID)) {18431843+ leaked = qman_shutdown_fq(fq->fqid);18441844+ if (leaked)18451845+ pr_debug("FQID %d leaked\n", fq->fqid);18461846+ }1841184718421848 DPAA_ASSERT(fq_table[fq->idx]);18431849 fq_table[fq->idx] = NULL;18501850+18511851+ if (fq_isset(fq, QMAN_FQ_FLAG_DYNAMIC_FQID) && !leaked) {18521852+ /*18531853+ * fq_table[fq->idx] should be set to null before18541854+ * freeing fq->fqid otherwise it could by allocated by18551855+ * qman_alloc_fqid() while still being !NULL18561856+ */18571857+ smp_wmb();18581858+ gen_pool_free(qm_fqalloc, fq->fqid | DPAA_GENALLOC_OFF, 1);18591859+ }18441860 return;18451861 default:18461862 break;
···142142143143 sys_controller->flash = of_get_mtd_device_by_node(np);144144 of_node_put(np);145145- if (IS_ERR(sys_controller->flash))146146- return dev_err_probe(dev, PTR_ERR(sys_controller->flash), "Failed to get flash\n");145145+ if (IS_ERR(sys_controller->flash)) {146146+ ret = dev_err_probe(dev, PTR_ERR(sys_controller->flash), "Failed to get flash\n");147147+ goto out_free;148148+ }147149148150no_flash:149151 sys_controller->client.dev = dev;···157155 if (IS_ERR(sys_controller->chan)) {158156 ret = dev_err_probe(dev, PTR_ERR(sys_controller->chan),159157 "Failed to get mbox channel\n");160160- kfree(sys_controller);161161- return ret;158158+ goto out_free;162159 }163160164161 init_completion(&sys_controller->c);···175174 dev_info(&pdev->dev, "Registered MPFS system controller\n");176175177176 return 0;177177+178178+out_free:179179+ kfree(sys_controller);180180+ return ret;178181}179182180183static void mpfs_sys_controller_remove(struct platform_device *pdev)
+1
drivers/soc/rockchip/grf.c
···231231 grf = syscon_node_to_regmap(np);232232 if (IS_ERR(grf)) {233233 pr_err("%s: could not get grf syscon\n", __func__);234234+ of_node_put(np);234235 return PTR_ERR(grf);235236 }236237
-27
drivers/tee/tee_shm.c
···2323 struct page *page;2424};25252626-static void shm_put_kernel_pages(struct page **pages, size_t page_count)2727-{2828- size_t n;2929-3030- for (n = 0; n < page_count; n++)3131- put_page(pages[n]);3232-}3333-3434-static void shm_get_kernel_pages(struct page **pages, size_t page_count)3535-{3636- size_t n;3737-3838- for (n = 0; n < page_count; n++)3939- get_page(pages[n]);4040-}4141-4226static void release_registered_pages(struct tee_shm *shm)4327{4428 if (shm->pages) {4529 if (shm->flags & TEE_SHM_USER_MAPPED)4630 unpin_user_pages(shm->pages, shm->num_pages);4747- else4848- shm_put_kernel_pages(shm->pages, shm->num_pages);49315032 kfree(shm->pages);5133 }···459477 goto err_put_shm_pages;460478 }461479462462- /*463463- * iov_iter_extract_kvec_pages does not get reference on the pages,464464- * get a reference on them.465465- */466466- if (iov_iter_is_kvec(iter))467467- shm_get_kernel_pages(shm->pages, num_pages);468468-469480 shm->offset = off;470481 shm->size = len;471482 shm->num_pages = num_pages;···474499err_put_shm_pages:475500 if (!iov_iter_is_kvec(iter))476501 unpin_user_pages(shm->pages, shm->num_pages);477477- else478478- shm_put_kernel_pages(shm->pages, shm->num_pages);479502err_free_shm_pages:480503 kfree(shm->pages);481504err_free_shm:
···61956195 struct btrfs_root *root,61966196 struct btrfs_log_ctx *ctx)61976197{61986198+ const bool orig_log_new_dentries = ctx->log_new_dentries;61986199 int ret = 0;6199620062006201 /*···62576256 * dir index key range logged for the directory. So we62586257 * must make sure the deletion is recorded.62596258 */62596259+ ctx->log_new_dentries = false;62606260 ret = btrfs_log_inode(trans, inode, LOG_INODE_ALL, ctx);62616261+ if (!ret && ctx->log_new_dentries)62626262+ ret = log_new_dir_dentries(trans, inode, ctx);62636263+62616264 btrfs_add_delayed_iput(inode);62626265 if (ret)62636266 break;···62966291 break;62976292 }6298629362946294+ ctx->log_new_dentries = orig_log_new_dentries;62996295 ctx->logging_conflict_inodes = false;63006296 if (ret)63016297 free_conflicting_inodes(ctx);
+1-1
fs/btrfs/volumes.c
···3587358735883588 /* step one, relocate all the extents inside this chunk */35893589 btrfs_scrub_pause(fs_info);35903590- ret = btrfs_relocate_block_group(fs_info, chunk_offset, true);35903590+ ret = btrfs_relocate_block_group(fs_info, chunk_offset, verbose);35913591 btrfs_scrub_continue(fs_info);35923592 if (ret) {35933593 /*
+4-2
fs/btrfs/zoned.c
···337337 if (!btrfs_fs_incompat(fs_info, ZONED))338338 return 0;339339340340- mutex_lock(&fs_devices->device_list_mutex);340340+ /*341341+ * No need to take the device_list mutex here, we're still in the mount342342+ * path and devices cannot be added to or removed from the list yet.343343+ */341344 list_for_each_entry(device, &fs_devices->devices, dev_list) {342345 /* We can skip reading of zone info for missing devices */343346 if (!device->bdev)···350347 if (ret)351348 break;352349 }353353- mutex_unlock(&fs_devices->device_list_mutex);354350355351 return ret;356352}
+3-1
include/linux/build_bug.h
···3232/**3333 * BUILD_BUG_ON_MSG - break compile if a condition is true & emit supplied3434 * error message.3535- * @condition: the condition which the compiler should know is false.3535+ * @cond: the condition which the compiler should know is false.3636+ * @msg: build-time error message3637 *3738 * See BUILD_BUG_ON for description.3839 */···61606261/**6362 * static_assert - check integer constant expression at build time6363+ * @expr: expression to be checked6464 *6565 * static_assert() is a wrapper for the C11 _Static_assert, with a6666 * little macro magic to make the message optional (defaulting to the
···19551955 if (userfaultfd_wp(vma))19561956 return 1;1957195719581958- return folio_pte_batch(folio, pvmw->pte, pte, max_nr);19581958+ /*19591959+ * If unmap fails, we need to restore the ptes. To avoid accidentally19601960+ * upgrading write permissions for ptes that were not originally19611961+ * writable, and to avoid losing the soft-dirty bit, use the19621962+ * appropriate FPB flags.19631963+ */19641964+ return folio_pte_batch_flags(folio, vma, pvmw->pte, &pte, max_nr,19651965+ FPB_RESPECT_WRITE | FPB_RESPECT_SOFT_DIRTY);19591966}1960196719611968/*···24502443 __maybe_unused pmd_t pmdval;2451244424522445 if (flags & TTU_SPLIT_HUGE_PMD) {24462446+ /*24472447+ * split_huge_pmd_locked() might leave the24482448+ * folio mapped through PTEs. Retry the walk24492449+ * so we can detect this scenario and properly24502450+ * abort the walk.24512451+ */24532452 split_huge_pmd_locked(vma, pvmw.address,24542453 pvmw.pmd, true);24552455- ret = false;24562456- page_vma_mapped_walk_done(&pvmw);24572457- break;24542454+ flags &= ~TTU_SPLIT_HUGE_PMD;24552455+ page_vma_mapped_walk_restart(&pvmw);24562456+ continue;24582457 }24592458#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION24602459 pmdval = pmdp_get(pvmw.pmd);