Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd0fc66f authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] gfp flags annotations - part 1



 - added typedef unsigned int __nocast gfp_t;

 - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
   the same warnings as far as sparse is concerned, doesn't change
   generated code (from gcc point of view we replaced unsigned int with
   typedef) and documents what's going on far better.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3b0e77bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ struct dma_coherent_mem {
};

void *dma_alloc_coherent(struct device *dev, size_t size,
			   dma_addr_t *dma_handle, unsigned int __nocast gfp)
			   dma_addr_t *dma_handle, gfp_t gfp)
{
	void *ret;
	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ struct dma_coherent_mem {
};

void *dma_alloc_coherent(struct device *dev, size_t size,
			   dma_addr_t *dma_handle, unsigned int __nocast gfp)
			   dma_addr_t *dma_handle, gfp_t gfp)
{
	void *ret;
	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ static void bpa_map_iommu(void)


static void *bpa_alloc_coherent(struct device *hwdev, size_t size,
			   dma_addr_t *dma_handle, unsigned int __nocast flag)
			   dma_addr_t *dma_handle, gfp_t flag)
{
	void *ret;

+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ int dma_set_mask(struct device *dev, u64 dma_mask)
EXPORT_SYMBOL(dma_set_mask);

void *dma_alloc_coherent(struct device *dev, size_t size,
		dma_addr_t *dma_handle, unsigned int __nocast flag)
		dma_addr_t *dma_handle, gfp_t flag)
{
	struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

+1 −1
Original line number Diff line number Diff line
@@ -519,7 +519,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
 * to the dma address (mapping) of the first page.
 */
void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
		dma_addr_t *dma_handle, unsigned int __nocast flag)
		dma_addr_t *dma_handle, gfp_t flag)
{
	void *ret = NULL;
	dma_addr_t mapping;
Loading