2014-01-22 13:41:09

by Peng Tao

[permalink] [raw]
Subject: [PATCH 1/6] staging/lustre/o2iblnd: fix is_vmalloc_addr build warning

I got this building Lustre:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function ‘kiblnd_kvaddr_to_page’:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:532:2: warning: passing argument 1 of ‘is_vmalloc_addr’ makes pointer from integer without a cast [enabled by default]

Cc: Laura Abbott <[email protected]>
Cc: Andreas Dilger <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 9364863..6f58ead 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -529,7 +529,7 @@ kiblnd_kvaddr_to_page (unsigned long vaddr)
{
struct page *page;

- if (is_vmalloc_addr(vaddr)) {
+ if (is_vmalloc_addr((void *)vaddr)) {
page = vmalloc_to_page ((void *)vaddr);
LASSERT (page != NULL);
return page;
--
1.7.9.5


2014-01-22 13:43:14

by Peng Tao

[permalink] [raw]
Subject: [PATCH 2/6] staging/lustre/libcfs: remove cfs_curproc_groups_nr

no user.

Cc: Andreas Dilger <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
---
.../staging/lustre/include/linux/libcfs/curproc.h | 7 -------
.../lustre/lustre/libcfs/linux/linux-curproc.c | 11 -----------
2 files changed, 18 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h
index 507d16b..9e52393 100644
--- a/drivers/staging/lustre/include/linux/libcfs/curproc.h
+++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h
@@ -44,13 +44,6 @@
#define __LIBCFS_CURPROC_H__

/*
- * Portable API to access common characteristics of "current" UNIX process.
- *
- * Implemented in portals/include/libcfs/<os>/
- */
-int cfs_curproc_groups_nr(void);
-
-/*
* Plus, platform-specific constant
*
* CFS_CURPROC_COMM_MAX,
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
index a2ef64c..0137062 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
@@ -55,16 +55,6 @@
* for Linux kernel.
*/

-int cfs_curproc_groups_nr(void)
-{
- int nr;
-
- task_lock(current);
- nr = current_cred()->group_info->ngroups;
- task_unlock(current);
- return nr;
-}
-
/* Currently all the CFS_CAP_* defines match CAP_* ones. */
#define cfs_cap_pack(cap) (cap)
#define cfs_cap_unpack(cap) (cap)
@@ -292,7 +282,6 @@ out:
}
EXPORT_SYMBOL(cfs_get_environ);

-EXPORT_SYMBOL(cfs_curproc_groups_nr);
EXPORT_SYMBOL(cfs_cap_raise);
EXPORT_SYMBOL(cfs_cap_lower);
EXPORT_SYMBOL(cfs_cap_raised);
--
1.7.9.5

2014-01-22 13:47:34

by Peng Tao

[permalink] [raw]
Subject: Re: [PATCH 1/6] staging/lustre/o2iblnd: fix is_vmalloc_addr build warning

Hi Greg,

I got gmail failure after git send-email sent the first two patches.
Please drop the two and I'll resend the whole series.

Thanks,
Tao

On Wed, Jan 22, 2014 at 9:40 PM, Peng Tao <[email protected]> wrote:
> I got this building Lustre:
> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function ‘kiblnd_kvaddr_to_page’:
> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:532:2: warning: passing argument 1 of ‘is_vmalloc_addr’ makes pointer from integer without a cast [enabled by default]
>
> Cc: Laura Abbott <[email protected]>
> Cc: Andreas Dilger <[email protected]>
> Signed-off-by: Peng Tao <[email protected]>
> ---
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> index 9364863..6f58ead 100644
> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> @@ -529,7 +529,7 @@ kiblnd_kvaddr_to_page (unsigned long vaddr)
> {
> struct page *page;
>
> - if (is_vmalloc_addr(vaddr)) {
> + if (is_vmalloc_addr((void *)vaddr)) {
> page = vmalloc_to_page ((void *)vaddr);
> LASSERT (page != NULL);
> return page;
> --
> 1.7.9.5
>