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

Merge tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
"Here's the "big" driver core updates for 4.4-rc1. Primarily a bunch
of debugfs updates, with a smattering of minor driver core fixes and
updates as well.

All have been in linux-next for a long time"

* tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
debugfs: Add debugfs_create_ulong()
of: to support binding numa node to specified device in devicetree
debugfs: Add read-only/write-only bool file ops
debugfs: Add read-only/write-only size_t file ops
debugfs: Add read-only/write-only x64 file ops
debugfs: Consolidate file mode checks in debugfs_create_*()
Revert "mm: Check if section present during memory block (un)registering"
driver-core: platform: Provide helpers for multi-driver modules
mm: Check if section present during memory block (un)registering
devres: fix a for loop bounds check
CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit
base/platform: assert that dev_pm_domain callbacks are called unconditionally
sysfs: correctly handle short reads on PREALLOC attrs.
base: soc: siplify ida usage
kobject: move EXPORT_SYMBOL() macros next to corresponding definitions
kobject: explain what kobject's sd field is
debugfs: document that debugfs_remove*() accepts NULL and error values
debugfs: Pass bool pointer to debugfs_create_bool()
ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'

+302 -193
+14
Documentation/driver-model/platform.txt
··· 63 63 int platform_driver_probe(struct platform_driver *drv, 64 64 int (*probe)(struct platform_device *)) 65 65 66 + Kernel modules can be composed of several platform drivers. The platform core 67 + provides helpers to register and unregister an array of drivers: 68 + 69 + int __platform_register_drivers(struct platform_driver * const *drivers, 70 + unsigned int count, struct module *owner); 71 + void platform_unregister_drivers(struct platform_driver * const *drivers, 72 + unsigned int count); 73 + 74 + If one of the drivers fails to register, all drivers registered up to that 75 + point will be unregistered in reverse order. Note that there is a convenience 76 + macro that passes THIS_MODULE as owner parameter: 77 + 78 + #define platform_register_driver(drivers, count) 79 + 66 80 67 81 Device Enumeration 68 82 ~~~~~~~~~~~~~~~~~~
+1 -1
Documentation/filesystems/debugfs.txt
··· 105 105 Boolean values can be placed in debugfs with: 106 106 107 107 struct dentry *debugfs_create_bool(const char *name, umode_t mode, 108 - struct dentry *parent, u32 *value); 108 + struct dentry *parent, bool *value); 109 109 110 110 A read on the resulting file will yield either Y (for non-zero values) or 111 111 N, followed by a newline. If written to, it will accept either upper- or
+2 -2
arch/arm64/kernel/debug-monitors.c
··· 60 60 * Allow root to disable self-hosted debug from userspace. 61 61 * This is useful if you want to connect an external JTAG debugger. 62 62 */ 63 - static u32 debug_enabled = 1; 63 + static bool debug_enabled = true; 64 64 65 65 static int create_debug_debugfs_entry(void) 66 66 { ··· 71 71 72 72 static int __init early_debug_disable(char *buf) 73 73 { 74 - debug_enabled = 0; 74 + debug_enabled = false; 75 75 return 0; 76 76 } 77 77
+1 -1
drivers/acpi/ec_sys.c
··· 128 128 if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) 129 129 goto error; 130 130 if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, 131 - (u32 *)&first_ec->global_lock)) 131 + &first_ec->global_lock)) 132 132 goto error; 133 133 134 134 if (write_support)
+1 -1
drivers/acpi/internal.h
··· 138 138 unsigned long gpe; 139 139 unsigned long command_addr; 140 140 unsigned long data_addr; 141 - unsigned long global_lock; 141 + bool global_lock; 142 142 unsigned long flags; 143 143 unsigned long reference_count; 144 144 struct mutex mutex;
+1 -1
drivers/base/core.c
··· 1066 1066 dev->kobj.parent = kobj; 1067 1067 1068 1068 /* use parent numa_node */ 1069 - if (parent) 1069 + if (parent && (dev_to_node(dev) == NUMA_NO_NODE)) 1070 1070 set_dev_node(dev, dev_to_node(parent)); 1071 1071 1072 1072 /* first, register with generic layer. */
+1 -1
drivers/base/dma-contiguous.c
··· 46 46 * Users, who want to set the size of global CMA area for their system 47 47 * should use cma= kernel parameter. 48 48 */ 49 - static const phys_addr_t size_bytes = CMA_SIZE_MBYTES * SZ_1M; 49 + static const phys_addr_t size_bytes = (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M; 50 50 static phys_addr_t size_cmdline = -1; 51 51 static phys_addr_t base_cmdline; 52 52 static phys_addr_t limit_cmdline;
+70 -10
drivers/base/platform.c
··· 513 513 return ret; 514 514 515 515 ret = dev_pm_domain_attach(_dev, true); 516 - if (ret != -EPROBE_DEFER) { 516 + if (ret != -EPROBE_DEFER && drv->probe) { 517 517 ret = drv->probe(dev); 518 518 if (ret) 519 519 dev_pm_domain_detach(_dev, true); ··· 536 536 { 537 537 struct platform_driver *drv = to_platform_driver(_dev->driver); 538 538 struct platform_device *dev = to_platform_device(_dev); 539 - int ret; 539 + int ret = 0; 540 540 541 - ret = drv->remove(dev); 541 + if (drv->remove) 542 + ret = drv->remove(dev); 542 543 dev_pm_domain_detach(_dev, true); 543 544 544 545 return ret; ··· 550 549 struct platform_driver *drv = to_platform_driver(_dev->driver); 551 550 struct platform_device *dev = to_platform_device(_dev); 552 551 553 - drv->shutdown(dev); 552 + if (drv->shutdown) 553 + drv->shutdown(dev); 554 554 dev_pm_domain_detach(_dev, true); 555 555 } 556 556 ··· 565 563 { 566 564 drv->driver.owner = owner; 567 565 drv->driver.bus = &platform_bus_type; 568 - if (drv->probe) 569 - drv->driver.probe = platform_drv_probe; 570 - if (drv->remove) 571 - drv->driver.remove = platform_drv_remove; 572 - if (drv->shutdown) 573 - drv->driver.shutdown = platform_drv_shutdown; 566 + drv->driver.probe = platform_drv_probe; 567 + drv->driver.remove = platform_drv_remove; 568 + drv->driver.shutdown = platform_drv_shutdown; 574 569 575 570 return driver_register(&drv->driver); 576 571 } ··· 709 710 return ERR_PTR(error); 710 711 } 711 712 EXPORT_SYMBOL_GPL(__platform_create_bundle); 713 + 714 + /** 715 + * __platform_register_drivers - register an array of platform drivers 716 + * @drivers: an array of drivers to register 717 + * @count: the number of drivers to register 718 + * @owner: module owning the drivers 719 + * 720 + * Registers platform drivers specified by an array. On failure to register a 721 + * driver, all previously registered drivers will be unregistered. Callers of 722 + * this API should use platform_unregister_drivers() to unregister drivers in 723 + * the reverse order. 724 + * 725 + * Returns: 0 on success or a negative error code on failure. 726 + */ 727 + int __platform_register_drivers(struct platform_driver * const *drivers, 728 + unsigned int count, struct module *owner) 729 + { 730 + unsigned int i; 731 + int err; 732 + 733 + for (i = 0; i < count; i++) { 734 + pr_debug("registering platform driver %ps\n", drivers[i]); 735 + 736 + err = __platform_driver_register(drivers[i], owner); 737 + if (err < 0) { 738 + pr_err("failed to register platform driver %ps: %d\n", 739 + drivers[i], err); 740 + goto error; 741 + } 742 + } 743 + 744 + return 0; 745 + 746 + error: 747 + while (i--) { 748 + pr_debug("unregistering platform driver %ps\n", drivers[i]); 749 + platform_driver_unregister(drivers[i]); 750 + } 751 + 752 + return err; 753 + } 754 + EXPORT_SYMBOL_GPL(__platform_register_drivers); 755 + 756 + /** 757 + * platform_unregister_drivers - unregister an array of platform drivers 758 + * @drivers: an array of drivers to unregister 759 + * @count: the number of drivers to unregister 760 + * 761 + * Unegisters platform drivers specified by an array. This is typically used 762 + * to complement an earlier call to platform_register_drivers(). Drivers are 763 + * unregistered in the reverse order in which they were registered. 764 + */ 765 + void platform_unregister_drivers(struct platform_driver * const *drivers, 766 + unsigned int count) 767 + { 768 + while (count--) { 769 + pr_debug("unregistering platform driver %ps\n", drivers[count]); 770 + platform_driver_unregister(drivers[count]); 771 + } 772 + } 773 + EXPORT_SYMBOL_GPL(platform_unregister_drivers); 712 774 713 775 /* modalias support enables more hands-off userspace setup: 714 776 * (a) environment variable lets new-style hotplug events work once system is
+3 -3
drivers/base/regmap/internal.h
··· 125 125 unsigned int num_reg_defaults_raw; 126 126 127 127 /* if set, only the cache is modified not the HW */ 128 - u32 cache_only; 128 + bool cache_only; 129 129 /* if set, only the HW is modified not the cache */ 130 - u32 cache_bypass; 130 + bool cache_bypass; 131 131 /* if set, remember to free reg_defaults_raw */ 132 132 bool cache_free; 133 133 ··· 135 135 const void *reg_defaults_raw; 136 136 void *cache; 137 137 /* if set, the cache contains newer data than the HW */ 138 - u32 cache_dirty; 138 + bool cache_dirty; 139 139 /* if set, the HW registers are known to match map->reg_defaults */ 140 140 bool no_sync_defaults; 141 141
+2 -2
drivers/base/regmap/regcache-lzo.c
··· 355 355 if (ret > 0 && val == map->reg_defaults[ret].def) 356 356 continue; 357 357 358 - map->cache_bypass = 1; 358 + map->cache_bypass = true; 359 359 ret = _regmap_write(map, i, val); 360 - map->cache_bypass = 0; 360 + map->cache_bypass = false; 361 361 if (ret) 362 362 return ret; 363 363 dev_dbg(map->dev, "Synced register %#x, value %#x\n",
+12 -12
drivers/base/regmap/regcache.c
··· 54 54 return -ENOMEM; 55 55 56 56 if (!map->reg_defaults_raw) { 57 - u32 cache_bypass = map->cache_bypass; 57 + bool cache_bypass = map->cache_bypass; 58 58 dev_warn(map->dev, "No cache defaults, reading back from HW\n"); 59 59 60 60 /* Bypass the cache access till data read from HW*/ 61 - map->cache_bypass = 1; 61 + map->cache_bypass = true; 62 62 tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL); 63 63 if (!tmp_buf) { 64 64 ret = -ENOMEM; ··· 285 285 if (!regcache_reg_needs_sync(map, reg, val)) 286 286 continue; 287 287 288 - map->cache_bypass = 1; 288 + map->cache_bypass = true; 289 289 ret = _regmap_write(map, reg, val); 290 - map->cache_bypass = 0; 290 + map->cache_bypass = false; 291 291 if (ret) { 292 292 dev_err(map->dev, "Unable to sync register %#x. %d\n", 293 293 reg, ret); ··· 315 315 int ret = 0; 316 316 unsigned int i; 317 317 const char *name; 318 - unsigned int bypass; 318 + bool bypass; 319 319 320 320 BUG_ON(!map->cache_ops); 321 321 ··· 333 333 map->async = true; 334 334 335 335 /* Apply any patch first */ 336 - map->cache_bypass = 1; 336 + map->cache_bypass = true; 337 337 for (i = 0; i < map->patch_regs; i++) { 338 338 ret = _regmap_write(map, map->patch[i].reg, map->patch[i].def); 339 339 if (ret != 0) { ··· 342 342 goto out; 343 343 } 344 344 } 345 - map->cache_bypass = 0; 345 + map->cache_bypass = false; 346 346 347 347 if (map->cache_ops->sync) 348 348 ret = map->cache_ops->sync(map, 0, map->max_register); ··· 384 384 { 385 385 int ret = 0; 386 386 const char *name; 387 - unsigned int bypass; 387 + bool bypass; 388 388 389 389 BUG_ON(!map->cache_ops); 390 390 ··· 637 637 if (!regcache_reg_needs_sync(map, regtmp, val)) 638 638 continue; 639 639 640 - map->cache_bypass = 1; 640 + map->cache_bypass = true; 641 641 642 642 ret = _regmap_write(map, regtmp, val); 643 643 644 - map->cache_bypass = 0; 644 + map->cache_bypass = false; 645 645 if (ret != 0) { 646 646 dev_err(map->dev, "Unable to sync register %#x. %d\n", 647 647 regtmp, ret); ··· 668 668 dev_dbg(map->dev, "Writing %zu bytes for %d registers from 0x%x-0x%x\n", 669 669 count * val_bytes, count, base, cur - map->reg_stride); 670 670 671 - map->cache_bypass = 1; 671 + map->cache_bypass = true; 672 672 673 673 ret = _regmap_raw_write(map, base, *data, count * val_bytes); 674 674 if (ret) 675 675 dev_err(map->dev, "Unable to sync registers %#x-%#x. %d\n", 676 676 base, cur - map->reg_stride, ret); 677 677 678 - map->cache_bypass = 0; 678 + map->cache_bypass = false; 679 679 680 680 *data = NULL; 681 681
+5 -16
drivers/base/soc.c
··· 16 16 #include <linux/err.h> 17 17 18 18 static DEFINE_IDA(soc_ida); 19 - static DEFINE_SPINLOCK(soc_lock); 20 19 21 20 static ssize_t soc_info_get(struct device *dev, 22 21 struct device_attribute *attr, ··· 121 122 } 122 123 123 124 /* Fetch a unique (reclaimable) SOC ID. */ 124 - do { 125 - if (!ida_pre_get(&soc_ida, GFP_KERNEL)) { 126 - ret = -ENOMEM; 127 - goto out2; 128 - } 129 - 130 - spin_lock(&soc_lock); 131 - ret = ida_get_new(&soc_ida, &soc_dev->soc_dev_num); 132 - spin_unlock(&soc_lock); 133 - 134 - } while (ret == -EAGAIN); 135 - 136 - if (ret) 125 + ret = ida_simple_get(&soc_ida, 0, 0, GFP_KERNEL); 126 + if (ret < 0) 137 127 goto out2; 128 + soc_dev->soc_dev_num = ret; 138 129 139 130 soc_dev->attr = soc_dev_attr; 140 131 soc_dev->dev.bus = &soc_bus_type; ··· 140 151 return soc_dev; 141 152 142 153 out3: 143 - ida_remove(&soc_ida, soc_dev->soc_dev_num); 154 + ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); 144 155 out2: 145 156 kfree(soc_dev); 146 157 out1: ··· 150 161 /* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */ 151 162 void soc_device_unregister(struct soc_device *soc_dev) 152 163 { 153 - ida_remove(&soc_ida, soc_dev->soc_dev_num); 164 + ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); 154 165 155 166 device_unregister(&soc_dev->dev); 156 167 }
+2 -2
drivers/bluetooth/hci_qca.c
··· 80 80 spinlock_t hci_ibs_lock; /* HCI_IBS state lock */ 81 81 u8 tx_ibs_state; /* HCI_IBS transmit side power state*/ 82 82 u8 rx_ibs_state; /* HCI_IBS receive side power state */ 83 - u32 tx_vote; /* Clock must be on for TX */ 84 - u32 rx_vote; /* Clock must be on for RX */ 83 + bool tx_vote; /* Clock must be on for TX */ 84 + bool rx_vote; /* Clock must be on for RX */ 85 85 struct timer_list tx_idle_timer; 86 86 u32 tx_idle_delay; 87 87 struct timer_list wake_retrans_timer;
+1 -1
drivers/iommu/amd_iommu_init.c
··· 138 138 to handle */ 139 139 LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings 140 140 we find in ACPI */ 141 - u32 amd_iommu_unmap_flush; /* if true, flush on every unmap */ 141 + bool amd_iommu_unmap_flush; /* if true, flush on every unmap */ 142 142 143 143 LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the 144 144 system */
+1 -1
drivers/iommu/amd_iommu_types.h
··· 675 675 * If true, the addresses will be flushed on unmap time, not when 676 676 * they are reused 677 677 */ 678 - extern u32 amd_iommu_unmap_flush; 678 + extern bool amd_iommu_unmap_flush; 679 679 680 680 /* Smallest max PASID supported by any IOMMU in the system */ 681 681 extern u32 amd_iommu_max_pasid;
+1 -1
drivers/misc/mei/mei_dev.h
··· 528 528 DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX); 529 529 unsigned long me_client_index; 530 530 531 - u32 allow_fixed_address; 531 + bool allow_fixed_address; 532 532 533 533 struct mei_cl wd_cl; 534 534 enum mei_wd_states wd_state;
+2 -2
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
··· 771 771 bool tid_release_task_busy; 772 772 773 773 struct dentry *debugfs_root; 774 - u32 use_bd; /* Use SGE Back Door intfc for reading SGE Contexts */ 775 - u32 trace_rss; /* 1 implies that different RSS flit per filter is 774 + bool use_bd; /* Use SGE Back Door intfc for reading SGE Contexts */ 775 + bool trace_rss; /* 1 implies that different RSS flit per filter is 776 776 * used per filter else if 0 default RSS flit is 777 777 * used for all 4 filters. 778 778 */
+1 -1
drivers/net/wireless/ath/ath10k/core.h
··· 738 738 bool monitor_started; 739 739 unsigned int filter_flags; 740 740 unsigned long dev_flags; 741 - u32 dfs_block_radar_events; 741 + bool dfs_block_radar_events; 742 742 743 743 /* protected by conf_mutex */ 744 744 bool radar_enabled;
+1 -1
drivers/net/wireless/ath/ath5k/ath5k.h
··· 1367 1367 u8 ah_retry_long; 1368 1368 u8 ah_retry_short; 1369 1369 1370 - u32 ah_use_32khz_clock; 1370 + bool ah_use_32khz_clock; 1371 1371 1372 1372 u8 ah_coverage_class; 1373 1373 bool ah_ack_bitrate_high;
+1 -1
drivers/net/wireless/ath/ath9k/hw.c
··· 385 385 386 386 ah->config.dma_beacon_response_time = 1; 387 387 ah->config.sw_beacon_response_time = 6; 388 - ah->config.cwm_ignore_extcca = 0; 388 + ah->config.cwm_ignore_extcca = false; 389 389 ah->config.analog_shiftreg = 1; 390 390 391 391 ah->config.rx_intr_mitigation = true;
+2 -2
drivers/net/wireless/ath/ath9k/hw.h
··· 332 332 struct ath9k_ops_config { 333 333 int dma_beacon_response_time; 334 334 int sw_beacon_response_time; 335 - u32 cwm_ignore_extcca; 335 + bool cwm_ignore_extcca; 336 336 u32 pcie_waen; 337 337 u8 analog_shiftreg; 338 338 u32 ofdm_trig_low; 339 339 u32 ofdm_trig_high; 340 340 u32 cck_trig_high; 341 341 u32 cck_trig_low; 342 - u32 enable_paprd; 342 + bool enable_paprd; 343 343 int serialize_regmode; 344 344 bool rx_intr_mitigation; 345 345 bool tx_intr_mitigation;
+9 -9
drivers/net/wireless/b43/debugfs.c
··· 676 676 e->dyn_debug_dentries[id] = d; \ 677 677 } while (0) 678 678 679 - add_dyn_dbg("debug_xmitpower", B43_DBG_XMITPOWER, 0); 680 - add_dyn_dbg("debug_dmaoverflow", B43_DBG_DMAOVERFLOW, 0); 681 - add_dyn_dbg("debug_dmaverbose", B43_DBG_DMAVERBOSE, 0); 682 - add_dyn_dbg("debug_pwork_fast", B43_DBG_PWORK_FAST, 0); 683 - add_dyn_dbg("debug_pwork_stop", B43_DBG_PWORK_STOP, 0); 684 - add_dyn_dbg("debug_lo", B43_DBG_LO, 0); 685 - add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, 0); 686 - add_dyn_dbg("debug_keys", B43_DBG_KEYS, 0); 687 - add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, 0); 679 + add_dyn_dbg("debug_xmitpower", B43_DBG_XMITPOWER, false); 680 + add_dyn_dbg("debug_dmaoverflow", B43_DBG_DMAOVERFLOW, false); 681 + add_dyn_dbg("debug_dmaverbose", B43_DBG_DMAVERBOSE, false); 682 + add_dyn_dbg("debug_pwork_fast", B43_DBG_PWORK_FAST, false); 683 + add_dyn_dbg("debug_pwork_stop", B43_DBG_PWORK_STOP, false); 684 + add_dyn_dbg("debug_lo", B43_DBG_LO, false); 685 + add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, false); 686 + add_dyn_dbg("debug_keys", B43_DBG_KEYS, false); 687 + add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, false); 688 688 689 689 #undef add_dyn_dbg 690 690 }
+1 -1
drivers/net/wireless/b43/debugfs.h
··· 68 68 u32 shm32read_addr_next; 69 69 70 70 /* Enabled/Disabled list for the dynamic debugging features. */ 71 - u32 dyn_debug[__B43_NR_DYNDBG]; 71 + bool dyn_debug[__B43_NR_DYNDBG]; 72 72 /* Dentries for the dynamic debugging entries. */ 73 73 struct dentry *dyn_debug_dentries[__B43_NR_DYNDBG]; 74 74 };
+5 -5
drivers/net/wireless/b43legacy/debugfs.c
··· 369 369 e->dyn_debug_dentries[id] = d; \ 370 370 } while (0) 371 371 372 - add_dyn_dbg("debug_xmitpower", B43legacy_DBG_XMITPOWER, 0); 373 - add_dyn_dbg("debug_dmaoverflow", B43legacy_DBG_DMAOVERFLOW, 0); 374 - add_dyn_dbg("debug_dmaverbose", B43legacy_DBG_DMAVERBOSE, 0); 375 - add_dyn_dbg("debug_pwork_fast", B43legacy_DBG_PWORK_FAST, 0); 376 - add_dyn_dbg("debug_pwork_stop", B43legacy_DBG_PWORK_STOP, 0); 372 + add_dyn_dbg("debug_xmitpower", B43legacy_DBG_XMITPOWER, false); 373 + add_dyn_dbg("debug_dmaoverflow", B43legacy_DBG_DMAOVERFLOW, false); 374 + add_dyn_dbg("debug_dmaverbose", B43legacy_DBG_DMAVERBOSE, false); 375 + add_dyn_dbg("debug_pwork_fast", B43legacy_DBG_PWORK_FAST, false); 376 + add_dyn_dbg("debug_pwork_stop", B43legacy_DBG_PWORK_STOP, false); 377 377 378 378 #undef add_dyn_dbg 379 379 }
+1 -1
drivers/net/wireless/b43legacy/debugfs.h
··· 47 47 struct b43legacy_txstatus_log txstatlog; 48 48 49 49 /* Enabled/Disabled list for the dynamic debugging features. */ 50 - u32 dyn_debug[__B43legacy_NR_DYNDBG]; 50 + bool dyn_debug[__B43legacy_NR_DYNDBG]; 51 51 /* Dentries for the dynamic debugging entries. */ 52 52 struct dentry *dyn_debug_dentries[__B43legacy_NR_DYNDBG]; 53 53 };
+3 -3
drivers/net/wireless/iwlegacy/common.h
··· 1425 1425 #endif /* CONFIG_IWLEGACY_DEBUGFS */ 1426 1426 1427 1427 struct work_struct txpower_work; 1428 - u32 disable_sens_cal; 1429 - u32 disable_chain_noise_cal; 1430 - u32 disable_tx_power_cal; 1428 + bool disable_sens_cal; 1429 + bool disable_chain_noise_cal; 1430 + bool disable_tx_power_cal; 1431 1431 struct work_struct run_time_calib_work; 1432 1432 struct timer_list stats_periodic; 1433 1433 struct timer_list watchdog;
+3 -3
drivers/net/wireless/iwlwifi/mvm/mvm.h
··· 658 658 const struct iwl_fw_bcast_filter *bcast_filters; 659 659 #ifdef CONFIG_IWLWIFI_DEBUGFS 660 660 struct { 661 - u32 override; /* u32 for debugfs_create_bool */ 661 + bool override; 662 662 struct iwl_bcast_filter_cmd cmd; 663 663 } dbgfs_bcast_filtering; 664 664 #endif ··· 682 682 bool disable_power_off; 683 683 bool disable_power_off_d3; 684 684 685 - u32 scan_iter_notif_enabled; /* must be u32 for debugfs_create_bool */ 685 + bool scan_iter_notif_enabled; 686 686 687 687 struct debugfs_blob_wrapper nvm_hw_blob; 688 688 struct debugfs_blob_wrapper nvm_sw_blob; ··· 739 739 int n_nd_channels; 740 740 bool net_detect; 741 741 #ifdef CONFIG_IWLWIFI_DEBUGFS 742 - u32 d3_wake_sysassert; /* must be u32 for debugfs_create_bool */ 742 + bool d3_wake_sysassert; 743 743 bool d3_test_active; 744 744 bool store_d3_resume_sram; 745 745 void *d3_resume_sram;
+6 -5
drivers/of/device.c
··· 60 60 ofdev->name = dev_name(&ofdev->dev); 61 61 ofdev->id = -1; 62 62 63 - /* device_add will assume that this device is on the same node as 64 - * the parent. If there is no parent defined, set the node 65 - * explicitly */ 66 - if (!ofdev->dev.parent) 67 - set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); 63 + /* 64 + * If this device has not binding numa node in devicetree, that is 65 + * of_node_to_nid returns NUMA_NO_NODE. device_add will assume that this 66 + * device is on the same node as the parent. 67 + */ 68 + set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); 68 69 69 70 return device_add(&ofdev->dev); 70 71 }
+2 -2
drivers/scsi/snic/snic_trc.c
··· 148 148 149 149 trc->max_idx = (tbuf_sz / SNIC_TRC_ENTRY_SZ); 150 150 trc->rd_idx = trc->wr_idx = 0; 151 - trc->enable = 1; 151 + trc->enable = true; 152 152 SNIC_INFO("Trace Facility Enabled.\n Trace Buffer SZ %lu Pages.\n", 153 153 tbuf_sz / PAGE_SIZE); 154 154 ret = 0; ··· 169 169 { 170 170 struct snic_trc *trc = &snic_glob->trc; 171 171 172 - trc->enable = 0; 172 + trc->enable = false; 173 173 snic_trc_debugfs_term(); 174 174 175 175 if (trc->buf) {
+1 -1
drivers/scsi/snic/snic_trc.h
··· 45 45 u32 max_idx; /* Max Index into trace buffer */ 46 46 u32 rd_idx; 47 47 u32 wr_idx; 48 - u32 enable; /* Control Variable for Tracing */ 48 + bool enable; /* Control Variable for Tracing */ 49 49 50 50 struct dentry *trc_enable; /* debugfs file object */ 51 51 struct dentry *trc_file;
+1 -1
drivers/uwb/uwb-debug.c
··· 55 55 struct uwb_dbg { 56 56 struct uwb_pal pal; 57 57 58 - u32 accept; 58 + bool accept; 59 59 struct list_head rsvs; 60 60 61 61 struct dentry *root_d;
+105 -72
fs/debugfs/file.c
··· 42 42 .llseek = noop_llseek, 43 43 }; 44 44 45 + static struct dentry *debugfs_create_mode(const char *name, umode_t mode, 46 + struct dentry *parent, void *value, 47 + const struct file_operations *fops, 48 + const struct file_operations *fops_ro, 49 + const struct file_operations *fops_wo) 50 + { 51 + /* if there are no write bits set, make read only */ 52 + if (!(mode & S_IWUGO)) 53 + return debugfs_create_file(name, mode, parent, value, fops_ro); 54 + /* if there are no read bits set, make write only */ 55 + if (!(mode & S_IRUGO)) 56 + return debugfs_create_file(name, mode, parent, value, fops_wo); 57 + 58 + return debugfs_create_file(name, mode, parent, value, fops); 59 + } 60 + 45 61 static int debugfs_u8_set(void *data, u64 val) 46 62 { 47 63 *(u8 *)data = val; ··· 99 83 struct dentry *debugfs_create_u8(const char *name, umode_t mode, 100 84 struct dentry *parent, u8 *value) 101 85 { 102 - /* if there are no write bits set, make read only */ 103 - if (!(mode & S_IWUGO)) 104 - return debugfs_create_file(name, mode, parent, value, &fops_u8_ro); 105 - /* if there are no read bits set, make write only */ 106 - if (!(mode & S_IRUGO)) 107 - return debugfs_create_file(name, mode, parent, value, &fops_u8_wo); 108 - 109 - return debugfs_create_file(name, mode, parent, value, &fops_u8); 86 + return debugfs_create_mode(name, mode, parent, value, &fops_u8, 87 + &fops_u8_ro, &fops_u8_wo); 110 88 } 111 89 EXPORT_SYMBOL_GPL(debugfs_create_u8); 112 90 ··· 145 135 struct dentry *debugfs_create_u16(const char *name, umode_t mode, 146 136 struct dentry *parent, u16 *value) 147 137 { 148 - /* if there are no write bits set, make read only */ 149 - if (!(mode & S_IWUGO)) 150 - return debugfs_create_file(name, mode, parent, value, &fops_u16_ro); 151 - /* if there are no read bits set, make write only */ 152 - if (!(mode & S_IRUGO)) 153 - return debugfs_create_file(name, mode, parent, value, &fops_u16_wo); 154 - 155 - return debugfs_create_file(name, mode, parent, value, &fops_u16); 138 + return debugfs_create_mode(name, mode, parent, value, &fops_u16, 139 + &fops_u16_ro, &fops_u16_wo); 156 140 } 157 141 EXPORT_SYMBOL_GPL(debugfs_create_u16); 158 142 ··· 191 187 struct dentry *debugfs_create_u32(const char *name, umode_t mode, 192 188 struct dentry *parent, u32 *value) 193 189 { 194 - /* if there are no write bits set, make read only */ 195 - if (!(mode & S_IWUGO)) 196 - return debugfs_create_file(name, mode, parent, value, &fops_u32_ro); 197 - /* if there are no read bits set, make write only */ 198 - if (!(mode & S_IRUGO)) 199 - return debugfs_create_file(name, mode, parent, value, &fops_u32_wo); 200 - 201 - return debugfs_create_file(name, mode, parent, value, &fops_u32); 190 + return debugfs_create_mode(name, mode, parent, value, &fops_u32, 191 + &fops_u32_ro, &fops_u32_wo); 202 192 } 203 193 EXPORT_SYMBOL_GPL(debugfs_create_u32); 204 194 ··· 238 240 struct dentry *debugfs_create_u64(const char *name, umode_t mode, 239 241 struct dentry *parent, u64 *value) 240 242 { 241 - /* if there are no write bits set, make read only */ 242 - if (!(mode & S_IWUGO)) 243 - return debugfs_create_file(name, mode, parent, value, &fops_u64_ro); 244 - /* if there are no read bits set, make write only */ 245 - if (!(mode & S_IRUGO)) 246 - return debugfs_create_file(name, mode, parent, value, &fops_u64_wo); 247 - 248 - return debugfs_create_file(name, mode, parent, value, &fops_u64); 243 + return debugfs_create_mode(name, mode, parent, value, &fops_u64, 244 + &fops_u64_ro, &fops_u64_wo); 249 245 } 250 246 EXPORT_SYMBOL_GPL(debugfs_create_u64); 247 + 248 + static int debugfs_ulong_set(void *data, u64 val) 249 + { 250 + *(unsigned long *)data = val; 251 + return 0; 252 + } 253 + 254 + static int debugfs_ulong_get(void *data, u64 *val) 255 + { 256 + *val = *(unsigned long *)data; 257 + return 0; 258 + } 259 + DEFINE_SIMPLE_ATTRIBUTE(fops_ulong, debugfs_ulong_get, debugfs_ulong_set, "%llu\n"); 260 + DEFINE_SIMPLE_ATTRIBUTE(fops_ulong_ro, debugfs_ulong_get, NULL, "%llu\n"); 261 + DEFINE_SIMPLE_ATTRIBUTE(fops_ulong_wo, NULL, debugfs_ulong_set, "%llu\n"); 262 + 263 + /** 264 + * debugfs_create_ulong - create a debugfs file that is used to read and write 265 + * an unsigned long value. 266 + * @name: a pointer to a string containing the name of the file to create. 267 + * @mode: the permission that the file should have 268 + * @parent: a pointer to the parent dentry for this file. This should be a 269 + * directory dentry if set. If this parameter is %NULL, then the 270 + * file will be created in the root of the debugfs filesystem. 271 + * @value: a pointer to the variable that the file should read to and write 272 + * from. 273 + * 274 + * This function creates a file in debugfs with the given name that 275 + * contains the value of the variable @value. If the @mode variable is so 276 + * set, it can be read from, and written to. 277 + * 278 + * This function will return a pointer to a dentry if it succeeds. This 279 + * pointer must be passed to the debugfs_remove() function when the file is 280 + * to be removed (no automatic cleanup happens if your module is unloaded, 281 + * you are responsible here.) If an error occurs, %NULL will be returned. 282 + * 283 + * If debugfs is not enabled in the kernel, the value -%ENODEV will be 284 + * returned. It is not wise to check for this value, but rather, check for 285 + * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 286 + * code. 287 + */ 288 + struct dentry *debugfs_create_ulong(const char *name, umode_t mode, 289 + struct dentry *parent, unsigned long *value) 290 + { 291 + return debugfs_create_mode(name, mode, parent, value, &fops_ulong, 292 + &fops_ulong_ro, &fops_ulong_wo); 293 + } 294 + EXPORT_SYMBOL_GPL(debugfs_create_ulong); 251 295 252 296 DEFINE_SIMPLE_ATTRIBUTE(fops_x8, debugfs_u8_get, debugfs_u8_set, "0x%02llx\n"); 253 297 DEFINE_SIMPLE_ATTRIBUTE(fops_x8_ro, debugfs_u8_get, NULL, "0x%02llx\n"); ··· 304 264 DEFINE_SIMPLE_ATTRIBUTE(fops_x32_wo, NULL, debugfs_u32_set, "0x%08llx\n"); 305 265 306 266 DEFINE_SIMPLE_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n"); 267 + DEFINE_SIMPLE_ATTRIBUTE(fops_x64_ro, debugfs_u64_get, NULL, "0x%016llx\n"); 268 + DEFINE_SIMPLE_ATTRIBUTE(fops_x64_wo, NULL, debugfs_u64_set, "0x%016llx\n"); 307 269 308 270 /* 309 271 * debugfs_create_x{8,16,32,64} - create a debugfs file that is used to read and write an unsigned {8,16,32,64}-bit value ··· 328 286 struct dentry *debugfs_create_x8(const char *name, umode_t mode, 329 287 struct dentry *parent, u8 *value) 330 288 { 331 - /* if there are no write bits set, make read only */ 332 - if (!(mode & S_IWUGO)) 333 - return debugfs_create_file(name, mode, parent, value, &fops_x8_ro); 334 - /* if there are no read bits set, make write only */ 335 - if (!(mode & S_IRUGO)) 336 - return debugfs_create_file(name, mode, parent, value, &fops_x8_wo); 337 - 338 - return debugfs_create_file(name, mode, parent, value, &fops_x8); 289 + return debugfs_create_mode(name, mode, parent, value, &fops_x8, 290 + &fops_x8_ro, &fops_x8_wo); 339 291 } 340 292 EXPORT_SYMBOL_GPL(debugfs_create_x8); 341 293 ··· 346 310 struct dentry *debugfs_create_x16(const char *name, umode_t mode, 347 311 struct dentry *parent, u16 *value) 348 312 { 349 - /* if there are no write bits set, make read only */ 350 - if (!(mode & S_IWUGO)) 351 - return debugfs_create_file(name, mode, parent, value, &fops_x16_ro); 352 - /* if there are no read bits set, make write only */ 353 - if (!(mode & S_IRUGO)) 354 - return debugfs_create_file(name, mode, parent, value, &fops_x16_wo); 355 - 356 - return debugfs_create_file(name, mode, parent, value, &fops_x16); 313 + return debugfs_create_mode(name, mode, parent, value, &fops_x16, 314 + &fops_x16_ro, &fops_x16_wo); 357 315 } 358 316 EXPORT_SYMBOL_GPL(debugfs_create_x16); 359 317 ··· 364 334 struct dentry *debugfs_create_x32(const char *name, umode_t mode, 365 335 struct dentry *parent, u32 *value) 366 336 { 367 - /* if there are no write bits set, make read only */ 368 - if (!(mode & S_IWUGO)) 369 - return debugfs_create_file(name, mode, parent, value, &fops_x32_ro); 370 - /* if there are no read bits set, make write only */ 371 - if (!(mode & S_IRUGO)) 372 - return debugfs_create_file(name, mode, parent, value, &fops_x32_wo); 373 - 374 - return debugfs_create_file(name, mode, parent, value, &fops_x32); 337 + return debugfs_create_mode(name, mode, parent, value, &fops_x32, 338 + &fops_x32_ro, &fops_x32_wo); 375 339 } 376 340 EXPORT_SYMBOL_GPL(debugfs_create_x32); 377 341 ··· 382 358 struct dentry *debugfs_create_x64(const char *name, umode_t mode, 383 359 struct dentry *parent, u64 *value) 384 360 { 385 - return debugfs_create_file(name, mode, parent, value, &fops_x64); 361 + return debugfs_create_mode(name, mode, parent, value, &fops_x64, 362 + &fops_x64_ro, &fops_x64_wo); 386 363 } 387 364 EXPORT_SYMBOL_GPL(debugfs_create_x64); 388 365 ··· 400 375 } 401 376 DEFINE_SIMPLE_ATTRIBUTE(fops_size_t, debugfs_size_t_get, debugfs_size_t_set, 402 377 "%llu\n"); /* %llu and %zu are more or less the same */ 378 + DEFINE_SIMPLE_ATTRIBUTE(fops_size_t_ro, debugfs_size_t_get, NULL, "%llu\n"); 379 + DEFINE_SIMPLE_ATTRIBUTE(fops_size_t_wo, NULL, debugfs_size_t_set, "%llu\n"); 403 380 404 381 /** 405 382 * debugfs_create_size_t - create a debugfs file that is used to read and write an size_t value ··· 416 389 struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 417 390 struct dentry *parent, size_t *value) 418 391 { 419 - return debugfs_create_file(name, mode, parent, value, &fops_size_t); 392 + return debugfs_create_mode(name, mode, parent, value, &fops_size_t, 393 + &fops_size_t_ro, &fops_size_t_wo); 420 394 } 421 395 EXPORT_SYMBOL_GPL(debugfs_create_size_t); 422 396 ··· 450 422 struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, 451 423 struct dentry *parent, atomic_t *value) 452 424 { 453 - /* if there are no write bits set, make read only */ 454 - if (!(mode & S_IWUGO)) 455 - return debugfs_create_file(name, mode, parent, value, 456 - &fops_atomic_t_ro); 457 - /* if there are no read bits set, make write only */ 458 - if (!(mode & S_IRUGO)) 459 - return debugfs_create_file(name, mode, parent, value, 460 - &fops_atomic_t_wo); 461 - 462 - return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); 425 + return debugfs_create_mode(name, mode, parent, value, &fops_atomic_t, 426 + &fops_atomic_t_ro, &fops_atomic_t_wo); 463 427 } 464 428 EXPORT_SYMBOL_GPL(debugfs_create_atomic_t); 465 429 ··· 459 439 size_t count, loff_t *ppos) 460 440 { 461 441 char buf[3]; 462 - u32 *val = file->private_data; 442 + bool *val = file->private_data; 463 443 464 444 if (*val) 465 445 buf[0] = 'Y'; ··· 477 457 char buf[32]; 478 458 size_t buf_size; 479 459 bool bv; 480 - u32 *val = file->private_data; 460 + bool *val = file->private_data; 481 461 482 462 buf_size = min(count, (sizeof(buf)-1)); 483 463 if (copy_from_user(buf, user_buf, buf_size)) ··· 493 473 494 474 static const struct file_operations fops_bool = { 495 475 .read = debugfs_read_file_bool, 476 + .write = debugfs_write_file_bool, 477 + .open = simple_open, 478 + .llseek = default_llseek, 479 + }; 480 + 481 + static const struct file_operations fops_bool_ro = { 482 + .read = debugfs_read_file_bool, 483 + .open = simple_open, 484 + .llseek = default_llseek, 485 + }; 486 + 487 + static const struct file_operations fops_bool_wo = { 496 488 .write = debugfs_write_file_bool, 497 489 .open = simple_open, 498 490 .llseek = default_llseek, ··· 535 503 * code. 536 504 */ 537 505 struct dentry *debugfs_create_bool(const char *name, umode_t mode, 538 - struct dentry *parent, u32 *value) 506 + struct dentry *parent, bool *value) 539 507 { 540 - return debugfs_create_file(name, mode, parent, value, &fops_bool); 508 + return debugfs_create_mode(name, mode, parent, value, &fops_bool, 509 + &fops_bool_ro, &fops_bool_wo); 541 510 } 542 511 EXPORT_SYMBOL_GPL(debugfs_create_bool); 543 512
+4 -2
fs/debugfs/inode.c
··· 533 533 /** 534 534 * debugfs_remove - removes a file or directory from the debugfs filesystem 535 535 * @dentry: a pointer to a the dentry of the file or directory to be 536 - * removed. 536 + * removed. If this parameter is NULL or an error value, nothing 537 + * will be done. 537 538 * 538 539 * This function removes a file or directory in debugfs that was previously 539 540 * created with a call to another debugfs function (like ··· 566 565 567 566 /** 568 567 * debugfs_remove_recursive - recursively removes a directory 569 - * @dentry: a pointer to a the dentry of the directory to be removed. 568 + * @dentry: a pointer to a the dentry of the directory to be removed. If this 569 + * parameter is NULL or an error value, nothing will be done. 570 570 * 571 571 * This function recursively removes a directory tree in debugfs that 572 572 * was previously created with a call to another debugfs function
+3 -1
fs/sysfs/file.c
··· 108 108 { 109 109 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); 110 110 struct kobject *kobj = of->kn->parent->priv; 111 + size_t len; 111 112 112 113 /* 113 114 * If buf != of->prealloc_buf, we don't know how ··· 116 115 */ 117 116 if (pos || WARN_ON_ONCE(buf != of->prealloc_buf)) 118 117 return 0; 119 - return ops->show(kobj, of->kn->priv, buf); 118 + len = ops->show(kobj, of->kn->priv, buf); 119 + return min(count, len); 120 120 } 121 121 122 122 /* kernfs write callback for regular sysfs files */
+4 -2
include/linux/debugfs.h
··· 79 79 struct dentry *parent, u32 *value); 80 80 struct dentry *debugfs_create_u64(const char *name, umode_t mode, 81 81 struct dentry *parent, u64 *value); 82 + struct dentry *debugfs_create_ulong(const char *name, umode_t mode, 83 + struct dentry *parent, unsigned long *value); 82 84 struct dentry *debugfs_create_x8(const char *name, umode_t mode, 83 85 struct dentry *parent, u8 *value); 84 86 struct dentry *debugfs_create_x16(const char *name, umode_t mode, ··· 94 92 struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, 95 93 struct dentry *parent, atomic_t *value); 96 94 struct dentry *debugfs_create_bool(const char *name, umode_t mode, 97 - struct dentry *parent, u32 *value); 95 + struct dentry *parent, bool *value); 98 96 99 97 struct dentry *debugfs_create_blob(const char *name, umode_t mode, 100 98 struct dentry *parent, ··· 245 243 246 244 static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, 247 245 struct dentry *parent, 248 - u32 *value) 246 + bool *value) 249 247 { 250 248 return ERR_PTR(-ENODEV); 251 249 }
+1 -1
include/linux/edac.h
··· 771 771 772 772 struct dentry *debugfs; 773 773 u8 fake_inject_layer[EDAC_MAX_LAYERS]; 774 - u32 fake_inject_ue; 774 + bool fake_inject_ue; 775 775 u16 fake_inject_count; 776 776 }; 777 777
+1 -1
include/linux/fault-inject.h
··· 18 18 atomic_t times; 19 19 atomic_t space; 20 20 unsigned long verbose; 21 - u32 task_filter; 21 + bool task_filter; 22 22 unsigned long stacktrace_depth; 23 23 unsigned long require_start; 24 24 unsigned long require_end;
+1 -1
include/linux/kobject.h
··· 66 66 struct kobject *parent; 67 67 struct kset *kset; 68 68 struct kobj_type *ktype; 69 - struct kernfs_node *sd; 69 + struct kernfs_node *sd; /* sysfs directory entry */ 70 70 struct kref kref; 71 71 #ifdef CONFIG_DEBUG_KOBJECT_RELEASE 72 72 struct delayed_work release;
+8
include/linux/platform_device.h
··· 270 270 struct resource *res, unsigned int n_res, 271 271 const void *data, size_t size, struct module *module); 272 272 273 + int __platform_register_drivers(struct platform_driver * const *drivers, 274 + unsigned int count, struct module *owner); 275 + void platform_unregister_drivers(struct platform_driver * const *drivers, 276 + unsigned int count); 277 + 278 + #define platform_register_drivers(drivers, count) \ 279 + __platform_register_drivers(drivers, count, THIS_MODULE) 280 + 273 281 /* early platform driver interface */ 274 282 struct early_platform_driver { 275 283 const char *class_str;
+2 -2
kernel/futex.c
··· 276 276 static struct { 277 277 struct fault_attr attr; 278 278 279 - u32 ignore_private; 279 + bool ignore_private; 280 280 } fail_futex = { 281 281 .attr = FAULT_ATTR_INITIALIZER, 282 - .ignore_private = 0, 282 + .ignore_private = false, 283 283 }; 284 284 285 285 static int __init setup_fail_futex(char *str)
+1 -1
lib/devres.c
··· 418 418 if (!iomap) 419 419 return; 420 420 421 - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 421 + for (i = 0; i < PCIM_IOMAP_MAX; i++) { 422 422 if (!(mask & (1 << i))) 423 423 continue; 424 424
+1 -1
lib/dma-debug.c
··· 100 100 static DEFINE_SPINLOCK(free_entries_lock); 101 101 102 102 /* Global disable flag - will be set in case of an error */ 103 - static u32 global_disable __read_mostly; 103 + static bool global_disable __read_mostly; 104 104 105 105 /* Early initialization disable flag, set at the end of dma_debug_init */ 106 106 static bool dma_debug_initialized __read_mostly;
+5 -7
lib/kobject.c
··· 568 568 kobject_put(kobj->parent); 569 569 kobj->parent = NULL; 570 570 } 571 + EXPORT_SYMBOL(kobject_del); 571 572 572 573 /** 573 574 * kobject_get - increment refcount for object. ··· 585 584 } 586 585 return kobj; 587 586 } 587 + EXPORT_SYMBOL(kobject_get); 588 588 589 589 static struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj) 590 590 { ··· 677 675 kref_put(&kobj->kref, kobject_release); 678 676 } 679 677 } 678 + EXPORT_SYMBOL(kobject_put); 680 679 681 680 static void dynamic_kobj_release(struct kobject *kobj) 682 681 { ··· 806 803 kobject_uevent(&k->kobj, KOBJ_ADD); 807 804 return 0; 808 805 } 806 + EXPORT_SYMBOL(kset_register); 809 807 810 808 /** 811 809 * kset_unregister - remove a kset. ··· 819 815 kobject_del(&k->kobj); 820 816 kobject_put(&k->kobj); 821 817 } 818 + EXPORT_SYMBOL(kset_unregister); 822 819 823 820 /** 824 821 * kset_find_obj - search for object in kset. ··· 1056 1051 kobj_ns_ops_tbl[type]->drop_ns(ns); 1057 1052 spin_unlock(&kobj_ns_type_lock); 1058 1053 } 1059 - 1060 - EXPORT_SYMBOL(kobject_get); 1061 - EXPORT_SYMBOL(kobject_put); 1062 - EXPORT_SYMBOL(kobject_del); 1063 - 1064 - EXPORT_SYMBOL(kset_register); 1065 - EXPORT_SYMBOL(kset_unregister);
+4 -4
mm/failslab.c
··· 3 3 4 4 static struct { 5 5 struct fault_attr attr; 6 - u32 ignore_gfp_wait; 7 - int cache_filter; 6 + bool ignore_gfp_wait; 7 + bool cache_filter; 8 8 } failslab = { 9 9 .attr = FAULT_ATTR_INITIALIZER, 10 - .ignore_gfp_wait = 1, 11 - .cache_filter = 0, 10 + .ignore_gfp_wait = true, 11 + .cache_filter = false, 12 12 }; 13 13 14 14 bool should_failslab(size_t size, gfp_t gfpflags, unsigned long cache_flags)
+4 -4
mm/page_alloc.c
··· 2159 2159 static struct { 2160 2160 struct fault_attr attr; 2161 2161 2162 - u32 ignore_gfp_highmem; 2163 - u32 ignore_gfp_wait; 2162 + bool ignore_gfp_highmem; 2163 + bool ignore_gfp_wait; 2164 2164 u32 min_order; 2165 2165 } fail_page_alloc = { 2166 2166 .attr = FAULT_ATTR_INITIALIZER, 2167 - .ignore_gfp_wait = 1, 2168 - .ignore_gfp_highmem = 1, 2167 + .ignore_gfp_wait = true, 2168 + .ignore_gfp_highmem = true, 2169 2169 .min_order = 1, 2170 2170 }; 2171 2171
+1 -1
sound/soc/codecs/wm_adsp.h
··· 53 53 54 54 int fw; 55 55 int fw_ver; 56 - u32 running; 56 + bool running; 57 57 58 58 struct list_head ctl_list; 59 59