diff mbox

drivers: md: include "linux/vmalloc.h" in "dm-cache-policy-hints.c"

Message ID 5270A465.2040200@asianux.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Chen Gang Oct. 30, 2013, 6:17 a.m. UTC
Need include related header file, or can not pass compiling, the
related error (for powerpc with allmodconfig):

    CC [M]  drivers/md/dm-cache-policy-hints.o
  drivers/md/dm-cache-policy-hints.c: In function ‘alloc_hash’:
  drivers/md/dm-cache-policy-hints.c:94:2: error: implicit declaration of function ‘vzalloc’ [-Werror=implicit-function-declaration]
  drivers/md/dm-cache-policy-hints.c:94:14: warning: assignment makes pointer from integer without a cast [enabled by default]
  drivers/md/dm-cache-policy-hints.c: In function ‘free_hash’:
  drivers/md/dm-cache-policy-hints.c:101:2: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
  drivers/md/dm-cache-policy-hints.c: In function ‘alloc_bitset’:
  drivers/md/dm-cache-policy-hints.c:184:2: warning: return makes pointer from integer without a cast [enabled by default]


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/md/dm-cache-policy-hints.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Mike Snitzer Oct. 30, 2013, 2:38 p.m. UTC | #1
On Wed, Oct 30 2013 at  2:17am -0400,
Chen Gang <gang.chen@asianux.com> wrote:

> Need include related header file, or can not pass compiling, the
> related error (for powerpc with allmodconfig):
> 
>     CC [M]  drivers/md/dm-cache-policy-hints.o
>   drivers/md/dm-cache-policy-hints.c: In function ‘alloc_hash’:
>   drivers/md/dm-cache-policy-hints.c:94:2: error: implicit declaration of function ‘vzalloc’ [-Werror=implicit-function-declaration]
>   drivers/md/dm-cache-policy-hints.c:94:14: warning: assignment makes pointer from integer without a cast [enabled by default]
>   drivers/md/dm-cache-policy-hints.c: In function ‘free_hash’:
>   drivers/md/dm-cache-policy-hints.c:101:2: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
>   drivers/md/dm-cache-policy-hints.c: In function ‘alloc_bitset’:
>   drivers/md/dm-cache-policy-hints.c:184:2: warning: return makes pointer from integer without a cast [enabled by default]
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

This was already fixed a couple days ago in the linux-dm.git 'for-next'
branch.

But thanks.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Chen Gang Oct. 31, 2013, 12:48 a.m. UTC | #2
On 10/30/2013 10:38 PM, Mike Snitzer wrote:
> On Wed, Oct 30 2013 at  2:17am -0400,
> Chen Gang <gang.chen@asianux.com> wrote:
> 
>> Need include related header file, or can not pass compiling, the
>> related error (for powerpc with allmodconfig):
>>
>>     CC [M]  drivers/md/dm-cache-policy-hints.o
>>   drivers/md/dm-cache-policy-hints.c: In function ‘alloc_hash’:
>>   drivers/md/dm-cache-policy-hints.c:94:2: error: implicit declaration of function ‘vzalloc’ [-Werror=implicit-function-declaration]
>>   drivers/md/dm-cache-policy-hints.c:94:14: warning: assignment makes pointer from integer without a cast [enabled by default]
>>   drivers/md/dm-cache-policy-hints.c: In function ‘free_hash’:
>>   drivers/md/dm-cache-policy-hints.c:101:2: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
>>   drivers/md/dm-cache-policy-hints.c: In function ‘alloc_bitset’:
>>   drivers/md/dm-cache-policy-hints.c:184:2: warning: return makes pointer from integer without a cast [enabled by default]
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> 
> This was already fixed a couple days ago in the linux-dm.git 'for-next'
> branch.
> 
> But thanks.
> 
> 

Thank you too.
diff mbox

Patch

diff --git a/drivers/md/dm-cache-policy-hints.c b/drivers/md/dm-cache-policy-hints.c
index 312cfb7..a8c1930 100644
--- a/drivers/md/dm-cache-policy-hints.c
+++ b/drivers/md/dm-cache-policy-hints.c
@@ -15,6 +15,7 @@ 
 #include <linux/hash.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/vmalloc.h>
 
 #define DM_MSG_PREFIX "cache-policy-hints"