Showing the changes to include/linux (7 of 197 files). Show all
Unified · Split
| @@ -470,6 +470,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *, · 469 unmodified lines | ||
| 470 | 470 | gfp_t); |
| 471 | 471 | extern int bio_uncopy_user(struct bio *); |
| 472 | 472 | void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter); |
| 473 | +void bio_truncate(struct bio *bio, unsigned new_size); | |
| 473 | 474 | |
| 474 | 475 | static inline void zero_fill_bio(struct bio *bio) |
| 475 | 476 | { |
| @@ -1364,8 +1364,11 @@ static inline int dma_get_slave_caps(struct dma_chan *chan, · 1363 unmodified lines | ||
| 1364 | 1364 | static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx) |
| 1365 | 1365 | { |
| 1366 | 1366 | struct dma_slave_caps caps; |
| 1367 | + int ret; | |
| 1367 | 1368 | |
| 1368 | − dma_get_slave_caps(tx->chan, &caps); | |
| 1369 | + ret = dma_get_slave_caps(tx->chan, &caps); | |
| 1370 | + if (ret) | |
| 1371 | + return ret; | |
| 1369 | 1372 | |
| 1370 | 1373 | if (caps.descriptor_reuse) { |
| 1371 | 1374 | tx->flags |= DMA_CTRL_REUSE; |
| @@ -79,15 +79,6 @@ · 78 unmodified lines | ||
| 79 | 79 | */ |
| 80 | 80 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
| 81 | 81 | |
| 82 | −/** | |
| 83 | − * FIELD_SIZEOF - get the size of a struct's field | |
| 84 | − * @t: the target struct | |
| 85 | − * @f: the target struct's field | |
| 86 | − * Return: the size of @f in the struct definition without having a | |
| 87 | − * declared instance of @t. | |
| 88 | − */ | |
| 89 | −#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | |
| 90 | − | |
| 91 | 82 | #define typeof_member(T, m) typeof(((T*)0)->m) |
| 92 | 83 | |
| 93 | 84 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP |
| @@ -122,8 +122,8 @@ static inline bool movable_node_is_enabled(void) · 121 unmodified lines | ||
| 122 | 122 | |
| 123 | 123 | extern void arch_remove_memory(int nid, u64 start, u64 size, |
| 124 | 124 | struct vmem_altmap *altmap); |
| 125 | −extern void __remove_pages(struct zone *zone, unsigned long start_pfn, | |
| 126 | − unsigned long nr_pages, struct vmem_altmap *altmap); | |
| 125 | +extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages, | |
| 126 | + struct vmem_altmap *altmap); | |
| 127 | 127 | |
| 128 | 128 | /* reasonably generic interface to expand the physical pages */ |
| 129 | 129 | extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, |
| @@ -342,6 +342,9 @@ extern int add_memory(int nid, u64 start, u64 size); · 212 unmodified lines | ||
| 342 | 342 | extern int add_memory_resource(int nid, struct resource *resource); |
| 343 | 343 | extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, |
| 344 | 344 | unsigned long nr_pages, struct vmem_altmap *altmap); |
| 345 | +extern void remove_pfn_range_from_zone(struct zone *zone, | |
| 346 | + unsigned long start_pfn, | |
| 347 | + unsigned long nr_pages); | |
| 345 | 348 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 346 | 349 | extern int sparse_add_section(int nid, unsigned long pfn, |
| 347 | 350 | unsigned long nr_pages, struct vmem_altmap *altmap); |
| @@ -55,7 +55,7 @@ static inline int of_mdio_parse_addr(struct device *dev, · 54 unmodified lines | ||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | #else /* CONFIG_OF_MDIO */ |
| 58 | −static bool of_mdiobus_child_is_phy(struct device_node *child) | |
| 58 | +static inline bool of_mdiobus_child_is_phy(struct device_node *child) | |
| 59 | 59 | { |
| 60 | 60 | return false; |
| 61 | 61 | } |
| @@ -69,29 +69,32 @@ struct posix_clock_operations { · 68 unmodified lines | ||
| 69 | 69 | * |
| 70 | 70 | * @ops: Functional interface to the clock |
| 71 | 71 | * @cdev: Character device instance for this clock |
| 72 | − * @kref: Reference count. | |
| 72 | + * @dev: Pointer to the clock's device. | |
| 73 | 73 | * @rwsem: Protects the 'zombie' field from concurrent access. |
| 74 | 74 | * @zombie: If 'zombie' is true, then the hardware has disappeared. |
| 75 | − * @release: A function to free the structure when the reference count reaches | |
| 76 | − * zero. May be NULL if structure is statically allocated. | |
| 77 | 75 | * |
| 78 | 76 | * Drivers should embed their struct posix_clock within a private |
| 79 | 77 | * structure, obtaining a reference to it during callbacks using |
| 80 | 78 | * container_of(). |
| 79 | + * | |
| 80 | + * Drivers should supply an initialized but not exposed struct device | |
| 81 | + * to posix_clock_register(). It is used to manage lifetime of the | |
| 82 | + * driver's private structure. It's 'release' field should be set to | |
| 83 | + * a release function for this private structure. | |
| 81 | 84 | */ |
| 82 | 85 | struct posix_clock { |
| 83 | 86 | struct posix_clock_operations ops; |
| 84 | 87 | struct cdev cdev; |
| 85 | − struct kref kref; | |
| 88 | + struct device *dev; | |
| 86 | 89 | struct rw_semaphore rwsem; |
| 87 | 90 | bool zombie; |
| 88 | − void (*release)(struct posix_clock *clk); | |
| 89 | 91 | }; |
| 90 | 92 | |
| 91 | 93 | /** |
| 92 | 94 | * posix_clock_register() - register a new clock |
| 93 | − * @clk: Pointer to the clock. Caller must provide 'ops' and 'release' | |
| 94 | − * @devid: Allocated device id | |
| 95 | + * @clk: Pointer to the clock. Caller must provide 'ops' field | |
| 96 | + * @dev: Pointer to the initialized device. Caller must provide | |
| 97 | + * 'release' field | |
| 95 | 98 | * |
| 96 | 99 | * A clock driver calls this function to register itself with the |
| 97 | 100 | * clock device subsystem. If 'clk' points to dynamically allocated |
| @@ -100,7 +103,7 @@ struct posix_clock { · 2 unmodified lines | ||
| 100 | 103 | * |
| 101 | 104 | * Returns zero on success, non-zero otherwise. |
| 102 | 105 | */ |
| 103 | −int posix_clock_register(struct posix_clock *clk, dev_t devid); | |
| 106 | +int posix_clock_register(struct posix_clock *clk, struct device *dev); | |
| 104 | 107 | |
| 105 | 108 | /** |
| 106 | 109 | * posix_clock_unregister() - unregister a clock |
| @@ -1232,6 +1232,7 @@ asmlinkage long sys_ni_syscall(void); · 1231 unmodified lines | ||
| 1232 | 1232 | */ |
| 1233 | 1233 | |
| 1234 | 1234 | int ksys_umount(char __user *name, int flags); |
| 1235 | +int ksys_dup(unsigned int fildes); | |
| 1235 | 1236 | int ksys_chroot(const char __user *filename); |
| 1236 | 1237 | ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); |
| 1237 | 1238 | int ksys_chdir(const char __user *filename); |