All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: fix compilation warning
@ 2016-04-18  4:53 Pratyush Anand
  2016-04-19  1:14 ` Atsushi Kumagai
  0 siblings, 1 reply; 5+ messages in thread
From: Pratyush Anand @ 2016-04-18  4:53 UTC (permalink / raw)
  To: ats-kumagai; +Cc: Pratyush Anand, kexec

commit "46176a97f329: Exclude page structures of non-dumped pages" sets
did_deletes but never uses that, which generates following compilation
warning.  Fix that.

makedumpfile.c: In function ‘find_unused_vmemmap_pages’:
makedumpfile.c:5912:25: warning: variable ‘did_deletes’ set but not used
[-Wunused-but-set-variable]
  int i, sz, numpages=0, did_deletes;

Signed-off-by: Pratyush Anand <panand@redhat.com>
---
 makedumpfile.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index dab7c4de44d4..94c969c16ccc 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5948,7 +5948,7 @@ find_unused_vmemmap_pages(void)
 	unsigned long long pfn;
 	unsigned long *lp1, *lp2, startpfn, endpfn;
 	unsigned long vmapstartpfn, vmapnumpfns;
-	int i, sz, numpages=0, did_deletes;
+	int i, sz, numpages=0;
 	int startword, numwords, do_break=0;
 	long deleted_pages = 0;
 	off_t new_offset1, new_offset2;
@@ -5956,7 +5956,6 @@ find_unused_vmemmap_pages(void)
 	/* read each block of both bitmaps */
 	for (pfn = 0; pfn < info->max_mapnr; pfn += PFN_BUFBITMAP) { /* size in bits */
 		numpages++;
-		did_deletes = 0;
 		new_offset1 = bitmap1->offset + BUFSIZE_BITMAP * (pfn / PFN_BUFBITMAP);
 		if (lseek(bitmap1->fd, new_offset1, SEEK_SET) < 0 ) {
 			ERRMSG("Can't seek the bitmap(%s). %s\n",
@@ -6032,7 +6031,6 @@ find_unused_vmemmap_pages(void)
 								return FAILED;
 							}
 							deleted_pages += vmapnumpfns;
-							did_deletes = 1;
 						}
 					}
 				}
@@ -6054,7 +6052,6 @@ find_unused_vmemmap_pages(void)
 						return FAILED;
 					}
 					deleted_pages += vmapnumpfns;
-					did_deletes = 1;
 				}
 			}
 		}
-- 
2.5.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] makedumpfile: fix compilation warning
  2016-04-18  4:53 [PATCH] makedumpfile: fix compilation warning Pratyush Anand
@ 2016-04-19  1:14 ` Atsushi Kumagai
  0 siblings, 0 replies; 5+ messages in thread
From: Atsushi Kumagai @ 2016-04-19  1:14 UTC (permalink / raw)
  To: Pratyush Anand; +Cc: kexec

Hello Pratyush,

>commit "46176a97f329: Exclude page structures of non-dumped pages" sets
>did_deletes but never uses that, which generates following compilation
>warning.  Fix that.
>
>makedumpfile.c: In function ‘find_unused_vmemmap_pages’:
>makedumpfile.c:5912:25: warning: variable ‘did_deletes’ set but not used
>[-Wunused-but-set-variable]
>  int i, sz, numpages=0, did_deletes;
>
>Signed-off-by: Pratyush Anand <panand@redhat.com>

Thanks, I didn't notice that due to older gcc.
I'll merge this into v1.6.0.

Regards,
Atsushi Kumagai

>---
> makedumpfile.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
>diff --git a/makedumpfile.c b/makedumpfile.c
>index dab7c4de44d4..94c969c16ccc 100644
>--- a/makedumpfile.c
>+++ b/makedumpfile.c
>@@ -5948,7 +5948,7 @@ find_unused_vmemmap_pages(void)
> 	unsigned long long pfn;
> 	unsigned long *lp1, *lp2, startpfn, endpfn;
> 	unsigned long vmapstartpfn, vmapnumpfns;
>-	int i, sz, numpages=0, did_deletes;
>+	int i, sz, numpages=0;
> 	int startword, numwords, do_break=0;
> 	long deleted_pages = 0;
> 	off_t new_offset1, new_offset2;
>@@ -5956,7 +5956,6 @@ find_unused_vmemmap_pages(void)
> 	/* read each block of both bitmaps */
> 	for (pfn = 0; pfn < info->max_mapnr; pfn += PFN_BUFBITMAP) { /* size in bits */
> 		numpages++;
>-		did_deletes = 0;
> 		new_offset1 = bitmap1->offset + BUFSIZE_BITMAP * (pfn / PFN_BUFBITMAP);
> 		if (lseek(bitmap1->fd, new_offset1, SEEK_SET) < 0 ) {
> 			ERRMSG("Can't seek the bitmap(%s). %s\n",
>@@ -6032,7 +6031,6 @@ find_unused_vmemmap_pages(void)
> 								return FAILED;
> 							}
> 							deleted_pages += vmapnumpfns;
>-							did_deletes = 1;
> 						}
> 					}
> 				}
>@@ -6054,7 +6052,6 @@ find_unused_vmemmap_pages(void)
> 						return FAILED;
> 					}
> 					deleted_pages += vmapnumpfns;
>-					did_deletes = 1;
> 				}
> 			}
> 		}
>--
>2.5.0

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] makedumpfile: Fix compilation warning
  2016-05-27  9:22 ` Atsushi Kumagai
@ 2016-05-27  9:46   ` Andrey Skvortsov
  0 siblings, 0 replies; 5+ messages in thread
From: Andrey Skvortsov @ 2016-05-27  9:46 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: kexec


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

On 27 May, Atsushi Kumagai wrote:
> Hello, Andrey
> 
> Sorry for my late reply, I'll merge this into v1.6.0.
> 
> Thanks,
> Atsushi Kumagai

No problem. Thanks.

> 
> >After commit 5bc1f520
> >[Looking for page.compound_order/compound_dtor to exclude hugepages]
> >during build appears following compilation warning:
> >
> >makedumpfile.c: In function ‘isHugetlb’:
> >makedumpfile.c:244:1: warning: type of ‘dtor’ defaults to ‘int’
> >[-Wimplicit-int]
> > isHugetlb(dtor)
> >  ^
> >
> >Tested with gcc 5.3.1.
> >
> >Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
> >---
> > makedumpfile.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/makedumpfile.c b/makedumpfile.c
> >index ce9fba6..4f17686 100644
> >--- a/makedumpfile.c
> >+++ b/makedumpfile.c
> >@@ -241,7 +241,7 @@ is_in_same_page(unsigned long vaddr1, unsigned long vaddr2)
> > }
> >
> > static inline int
> >-isHugetlb(dtor)
> >+isHugetlb(int dtor)
> > {
> >         return ((NUMBER(HUGETLB_PAGE_DTOR) != NOT_FOUND_NUMBER)
> > 		&& (NUMBER(HUGETLB_PAGE_DTOR) == dtor))
> >--
> >2.8.1
> >
> >
> >_______________________________________________
> >kexec mailing list
> >kexec@lists.infradead.org
> >http://lists.infradead.org/mailman/listinfo/kexec

-- 
Best regards,
Andrey Skvortsov

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] makedumpfile: Fix compilation warning
  2016-05-20  9:51 [PATCH] makedumpfile: Fix " Andrey Skvortsov
@ 2016-05-27  9:22 ` Atsushi Kumagai
  2016-05-27  9:46   ` Andrey Skvortsov
  0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Kumagai @ 2016-05-27  9:22 UTC (permalink / raw)
  To: Andrey Skvortsov; +Cc: kexec

Hello, Andrey

Sorry for my late reply, I'll merge this into v1.6.0.

Thanks,
Atsushi Kumagai

>After commit 5bc1f520
>[Looking for page.compound_order/compound_dtor to exclude hugepages]
>during build appears following compilation warning:
>
>makedumpfile.c: In function ‘isHugetlb’:
>makedumpfile.c:244:1: warning: type of ‘dtor’ defaults to ‘int’
>[-Wimplicit-int]
> isHugetlb(dtor)
>  ^
>
>Tested with gcc 5.3.1.
>
>Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
>---
> makedumpfile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/makedumpfile.c b/makedumpfile.c
>index ce9fba6..4f17686 100644
>--- a/makedumpfile.c
>+++ b/makedumpfile.c
>@@ -241,7 +241,7 @@ is_in_same_page(unsigned long vaddr1, unsigned long vaddr2)
> }
>
> static inline int
>-isHugetlb(dtor)
>+isHugetlb(int dtor)
> {
>         return ((NUMBER(HUGETLB_PAGE_DTOR) != NOT_FOUND_NUMBER)
> 		&& (NUMBER(HUGETLB_PAGE_DTOR) == dtor))
>--
>2.8.1
>
>
>_______________________________________________
>kexec mailing list
>kexec@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] makedumpfile: Fix compilation warning
@ 2016-05-20  9:51 Andrey Skvortsov
  2016-05-27  9:22 ` Atsushi Kumagai
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Skvortsov @ 2016-05-20  9:51 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: kexec, Andrey Skvortsov

After commit 5bc1f520
[Looking for page.compound_order/compound_dtor to exclude hugepages]
during build appears following compilation warning:

makedumpfile.c: In function ‘isHugetlb’:
makedumpfile.c:244:1: warning: type of ‘dtor’ defaults to ‘int’
[-Wimplicit-int]
 isHugetlb(dtor)
  ^

Tested with gcc 5.3.1.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
 makedumpfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index ce9fba6..4f17686 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -241,7 +241,7 @@ is_in_same_page(unsigned long vaddr1, unsigned long vaddr2)
 }
 
 static inline int
-isHugetlb(dtor)
+isHugetlb(int dtor)
 {
         return ((NUMBER(HUGETLB_PAGE_DTOR) != NOT_FOUND_NUMBER)
 		&& (NUMBER(HUGETLB_PAGE_DTOR) == dtor))
-- 
2.8.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-27  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18  4:53 [PATCH] makedumpfile: fix compilation warning Pratyush Anand
2016-04-19  1:14 ` Atsushi Kumagai
2016-05-20  9:51 [PATCH] makedumpfile: Fix " Andrey Skvortsov
2016-05-27  9:22 ` Atsushi Kumagai
2016-05-27  9:46   ` Andrey Skvortsov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.