diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 20:47:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 20:47:51 -0400 |
commit | 2d01eedf1d14432f4db5388a49dc5596a8c5bd02 (patch) | |
tree | 646525acc0475b2899827c1bfbd25f05ec1b8092 /lib | |
parent | 6ac15baacb6ecd87c66209627753b96ded3b4515 (diff) | |
parent | abdd4a7025282fbe3737e1bcb5f51afc8d8ea1b8 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge third patchbomb from Andrew Morton:
- the rest of MM
- scripts/gdb updates
- ipc/ updates
- lib/ updates
- MAINTAINERS updates
- various other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (67 commits)
genalloc: rename of_get_named_gen_pool() to of_gen_pool_get()
genalloc: rename dev_get_gen_pool() to gen_pool_get()
x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit
MAINTAINERS: add zpool
MAINTAINERS: BCACHE: Kent Overstreet has changed email address
MAINTAINERS: move Jens Osterkamp to CREDITS
MAINTAINERS: remove unused nbd.h pattern
MAINTAINERS: update brcm gpio filename pattern
MAINTAINERS: update brcm dts pattern
MAINTAINERS: update sound soc intel patterns
MAINTAINERS: remove website for paride
MAINTAINERS: update Emulex ocrdma email addresses
bcache: use kvfree() in various places
libcxgbi: use kvfree() in cxgbi_free_big_mem()
target: use kvfree() in session alloc and free
IB/ehca: use kvfree() in ipz_queue_{cd}tor()
drm/nouveau/gem: use kvfree() in u_free()
drm: use kvfree() in drm_free_large()
cxgb4: use kvfree() in t4_free_mem()
cxgb3: use kvfree() in cxgb_free_mem()
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/genalloc.c | 14 | ||||
-rw-r--r-- | lib/scatterlist.c | 18 |
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c index d214866eeea2..daf0afb6d979 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -602,12 +602,12 @@ struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order, | |||
602 | EXPORT_SYMBOL(devm_gen_pool_create); | 602 | EXPORT_SYMBOL(devm_gen_pool_create); |
603 | 603 | ||
604 | /** | 604 | /** |
605 | * dev_get_gen_pool - Obtain the gen_pool (if any) for a device | 605 | * gen_pool_get - Obtain the gen_pool (if any) for a device |
606 | * @dev: device to retrieve the gen_pool from | 606 | * @dev: device to retrieve the gen_pool from |
607 | * | 607 | * |
608 | * Returns the gen_pool for the device if one is present, or NULL. | 608 | * Returns the gen_pool for the device if one is present, or NULL. |
609 | */ | 609 | */ |
610 | struct gen_pool *dev_get_gen_pool(struct device *dev) | 610 | struct gen_pool *gen_pool_get(struct device *dev) |
611 | { | 611 | { |
612 | struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL, | 612 | struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL, |
613 | NULL); | 613 | NULL); |
@@ -616,11 +616,11 @@ struct gen_pool *dev_get_gen_pool(struct device *dev) | |||
616 | return NULL; | 616 | return NULL; |
617 | return *p; | 617 | return *p; |
618 | } | 618 | } |
619 | EXPORT_SYMBOL_GPL(dev_get_gen_pool); | 619 | EXPORT_SYMBOL_GPL(gen_pool_get); |
620 | 620 | ||
621 | #ifdef CONFIG_OF | 621 | #ifdef CONFIG_OF |
622 | /** | 622 | /** |
623 | * of_get_named_gen_pool - find a pool by phandle property | 623 | * of_gen_pool_get - find a pool by phandle property |
624 | * @np: device node | 624 | * @np: device node |
625 | * @propname: property name containing phandle(s) | 625 | * @propname: property name containing phandle(s) |
626 | * @index: index into the phandle array | 626 | * @index: index into the phandle array |
@@ -629,7 +629,7 @@ EXPORT_SYMBOL_GPL(dev_get_gen_pool); | |||
629 | * address of the device tree node pointed at by the phandle property, | 629 | * address of the device tree node pointed at by the phandle property, |
630 | * or NULL if not found. | 630 | * or NULL if not found. |
631 | */ | 631 | */ |
632 | struct gen_pool *of_get_named_gen_pool(struct device_node *np, | 632 | struct gen_pool *of_gen_pool_get(struct device_node *np, |
633 | const char *propname, int index) | 633 | const char *propname, int index) |
634 | { | 634 | { |
635 | struct platform_device *pdev; | 635 | struct platform_device *pdev; |
@@ -642,7 +642,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np, | |||
642 | of_node_put(np_pool); | 642 | of_node_put(np_pool); |
643 | if (!pdev) | 643 | if (!pdev) |
644 | return NULL; | 644 | return NULL; |
645 | return dev_get_gen_pool(&pdev->dev); | 645 | return gen_pool_get(&pdev->dev); |
646 | } | 646 | } |
647 | EXPORT_SYMBOL_GPL(of_get_named_gen_pool); | 647 | EXPORT_SYMBOL_GPL(of_gen_pool_get); |
648 | #endif /* CONFIG_OF */ | 648 | #endif /* CONFIG_OF */ |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 99fbc2f238c4..d105a9f56878 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -650,9 +650,8 @@ EXPORT_SYMBOL(sg_miter_stop); | |||
650 | * Returns the number of copied bytes. | 650 | * Returns the number of copied bytes. |
651 | * | 651 | * |
652 | **/ | 652 | **/ |
653 | static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, | 653 | size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, |
654 | void *buf, size_t buflen, off_t skip, | 654 | size_t buflen, off_t skip, bool to_buffer) |
655 | bool to_buffer) | ||
656 | { | 655 | { |
657 | unsigned int offset = 0; | 656 | unsigned int offset = 0; |
658 | struct sg_mapping_iter miter; | 657 | struct sg_mapping_iter miter; |
@@ -689,6 +688,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, | |||
689 | local_irq_restore(flags); | 688 | local_irq_restore(flags); |
690 | return offset; | 689 | return offset; |
691 | } | 690 | } |
691 | EXPORT_SYMBOL(sg_copy_buffer); | ||
692 | 692 | ||
693 | /** | 693 | /** |
694 | * sg_copy_from_buffer - Copy from a linear buffer to an SG list | 694 | * sg_copy_from_buffer - Copy from a linear buffer to an SG list |
@@ -701,9 +701,9 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, | |||
701 | * | 701 | * |
702 | **/ | 702 | **/ |
703 | size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, | 703 | size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, |
704 | void *buf, size_t buflen) | 704 | const void *buf, size_t buflen) |
705 | { | 705 | { |
706 | return sg_copy_buffer(sgl, nents, buf, buflen, 0, false); | 706 | return sg_copy_buffer(sgl, nents, (void *)buf, buflen, 0, false); |
707 | } | 707 | } |
708 | EXPORT_SYMBOL(sg_copy_from_buffer); | 708 | EXPORT_SYMBOL(sg_copy_from_buffer); |
709 | 709 | ||
@@ -729,16 +729,16 @@ EXPORT_SYMBOL(sg_copy_to_buffer); | |||
729 | * @sgl: The SG list | 729 | * @sgl: The SG list |
730 | * @nents: Number of SG entries | 730 | * @nents: Number of SG entries |
731 | * @buf: Where to copy from | 731 | * @buf: Where to copy from |
732 | * @skip: Number of bytes to skip before copying | ||
733 | * @buflen: The number of bytes to copy | 732 | * @buflen: The number of bytes to copy |
733 | * @skip: Number of bytes to skip before copying | ||
734 | * | 734 | * |
735 | * Returns the number of copied bytes. | 735 | * Returns the number of copied bytes. |
736 | * | 736 | * |
737 | **/ | 737 | **/ |
738 | size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, | 738 | size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, |
739 | void *buf, size_t buflen, off_t skip) | 739 | const void *buf, size_t buflen, off_t skip) |
740 | { | 740 | { |
741 | return sg_copy_buffer(sgl, nents, buf, buflen, skip, false); | 741 | return sg_copy_buffer(sgl, nents, (void *)buf, buflen, skip, false); |
742 | } | 742 | } |
743 | EXPORT_SYMBOL(sg_pcopy_from_buffer); | 743 | EXPORT_SYMBOL(sg_pcopy_from_buffer); |
744 | 744 | ||
@@ -747,8 +747,8 @@ EXPORT_SYMBOL(sg_pcopy_from_buffer); | |||
747 | * @sgl: The SG list | 747 | * @sgl: The SG list |
748 | * @nents: Number of SG entries | 748 | * @nents: Number of SG entries |
749 | * @buf: Where to copy to | 749 | * @buf: Where to copy to |
750 | * @skip: Number of bytes to skip before copying | ||
751 | * @buflen: The number of bytes to copy | 750 | * @buflen: The number of bytes to copy |
751 | * @skip: Number of bytes to skip before copying | ||
752 | * | 752 | * |
753 | * Returns the number of copied bytes. | 753 | * Returns the number of copied bytes. |
754 | * | 754 | * |