* [PATCH] scripts: dtc: fix compile warnings
@ 2012-01-26 11:20 Felipe Balbi
2012-01-26 16:58 ` Stephen Warren
[not found] ` <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
0 siblings, 2 replies; 5+ messages in thread
From: Felipe Balbi @ 2012-01-26 11:20 UTC (permalink / raw)
To: swarren-DDmLM1+adcrQT0dZR+AlfA
Cc: mmarek-AlSwsSmVLrQ, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Linux Kernel Mailing List, Felipe Balbi
Fix following compile warnings:
scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used
[-Wunused-but-set-variable]
scripts/dtc/dtc.c: In function ‘main’:
scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
scripts/dtc/dtc.c | 5 +----
scripts/dtc/flattree.c | 2 --
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
index 451c92d..2ef5e2e 100644
--- a/scripts/dtc/dtc.c
+++ b/scripts/dtc/dtc.c
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
const char *outform = "dts";
const char *outname = "-";
const char *depname = NULL;
- int force = 0, check = 0, sort = 0;
+ int force = 0, sort = 0;
const char *arg;
int opt;
FILE *outf = NULL;
@@ -143,9 +143,6 @@ int main(int argc, char *argv[])
case 'f':
force = 1;
break;
- case 'c':
- check = 1;
- break;
case 'q':
quiet++;
break;
diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c
index ead0332..28d0b23 100644
--- a/scripts/dtc/flattree.c
+++ b/scripts/dtc/flattree.c
@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
{
struct reserve_info *reservelist = NULL;
struct reserve_info *new;
- const char *p;
struct fdt_reserve_entry re;
/*
@@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
*
* First pass, count entries.
*/
- p = inb->ptr;
while (1) {
flat_read_chunk(inb, &re, sizeof(re));
re.address = fdt64_to_cpu(re.address);
--
1.7.8.2
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] scripts: dtc: fix compile warnings
2012-01-26 11:20 [PATCH] scripts: dtc: fix compile warnings Felipe Balbi
@ 2012-01-26 16:58 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF178CB8233B-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
[not found] ` <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2012-01-26 16:58 UTC (permalink / raw)
To: Felipe Balbi, David Gibson (david@gibson.dropbear.id.au),
jdl@jdl.com
Cc: mmarek@suse.cz, Linux Kernel Mailing List,
devicetree-discuss@lists.ozlabs.org
Felipe Balbi wrote at Thursday, January 26, 2012 4:20 AM:
> Fix following compile warnings:
>
> scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
> scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used
> [-Wunused-but-set-variable]
>
> scripts/dtc/dtc.c: In function ‘main’:
> scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
I think you want to send this to the upstream dtc maintainers; I've CC'd
them on this mail.
> ---
> scripts/dtc/dtc.c | 5 +----
> scripts/dtc/flattree.c | 2 --
> 2 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
> index 451c92d..2ef5e2e 100644
> --- a/scripts/dtc/dtc.c
> +++ b/scripts/dtc/dtc.c
> @@ -101,7 +101,7 @@ int main(int argc, char *argv[])
> const char *outform = "dts";
> const char *outname = "-";
> const char *depname = NULL;
> - int force = 0, check = 0, sort = 0;
> + int force = 0, sort = 0;
> const char *arg;
> int opt;
> FILE *outf = NULL;
> @@ -143,9 +143,6 @@ int main(int argc, char *argv[])
> case 'f':
> force = 1;
> break;
> - case 'c':
> - check = 1;
> - break;
> case 'q':
> quiet++;
> break;
> diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c
> index ead0332..28d0b23 100644
> --- a/scripts/dtc/flattree.c
> +++ b/scripts/dtc/flattree.c
> @@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
> {
> struct reserve_info *reservelist = NULL;
> struct reserve_info *new;
> - const char *p;
> struct fdt_reserve_entry re;
>
> /*
> @@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
> *
> * First pass, count entries.
> */
> - p = inb->ptr;
> while (1) {
> flat_read_chunk(inb, &re, sizeof(re));
> re.address = fdt64_to_cpu(re.address);
> --
> 1.7.8.2
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] scripts: dtc: fix compile warnings
[not found] ` <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
@ 2012-03-24 22:13 ` Michal Marek
2012-03-25 0:38 ` Grant Likely
1 sibling, 0 replies; 5+ messages in thread
From: Michal Marek @ 2012-03-24 22:13 UTC (permalink / raw)
To: Felipe Balbi
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
swarren-DDmLM1+adcrQT0dZR+AlfA, Linux Kernel Mailing List
On Thu, Jan 26, 2012 at 01:20:07PM +0200, Felipe Balbi wrote:
> Fix following compile warnings:
>
> scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
> scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used
> [-Wunused-but-set-variable]
>
> scripts/dtc/dtc.c: In function ‘main’:
> scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
This was somehow forgotten, I applied the patch to kbuild.git#kbuild now.
> ---
> scripts/dtc/dtc.c | 5 +----
> scripts/dtc/flattree.c | 2 --
> 2 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
> index 451c92d..2ef5e2e 100644
> --- a/scripts/dtc/dtc.c
> +++ b/scripts/dtc/dtc.c
> @@ -101,7 +101,7 @@ int main(int argc, char *argv[])
> const char *outform = "dts";
> const char *outname = "-";
> const char *depname = NULL;
> - int force = 0, check = 0, sort = 0;
> + int force = 0, sort = 0;
> const char *arg;
> int opt;
> FILE *outf = NULL;
> @@ -143,9 +143,6 @@ int main(int argc, char *argv[])
> case 'f':
> force = 1;
> break;
> - case 'c':
> - check = 1;
> - break;
BTW, you should also remove 'c' from the getopt() string.
Michal
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc: fix compile warnings
[not found] ` <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2012-03-24 22:13 ` Michal Marek
@ 2012-03-25 0:38 ` Grant Likely
1 sibling, 0 replies; 5+ messages in thread
From: Grant Likely @ 2012-03-25 0:38 UTC (permalink / raw)
To: swarren-DDmLM1+adcrQT0dZR+AlfA
Cc: mmarek-AlSwsSmVLrQ, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Linux Kernel Mailing List, Felipe Balbi
[-- Attachment #1: Type: text/plain, Size: 2349 bytes --]
On Thu, 26 Jan 2012 13:20:07 +0200, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
> Fix following compile warnings:
>
> scripts/dtc/flattree.c: In function âflat_read_mem_reserveâ:
> scripts/dtc/flattree.c:700:14: warning: variable âpâ set but not used
> [-Wunused-but-set-variable]
>
> scripts/dtc/dtc.c: In function âmainâ:
> scripts/dtc/dtc.c:104:17: warning: variable âcheckâ set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Need to instead update dtc to the latest sources from the upstream dtc
repository. I've not had time to do it; would you like to take a
look?
g.
> ---
> scripts/dtc/dtc.c | 5 +----
> scripts/dtc/flattree.c | 2 --
> 2 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
> index 451c92d..2ef5e2e 100644
> --- a/scripts/dtc/dtc.c
> +++ b/scripts/dtc/dtc.c
> @@ -101,7 +101,7 @@ int main(int argc, char *argv[])
> const char *outform = "dts";
> const char *outname = "-";
> const char *depname = NULL;
> - int force = 0, check = 0, sort = 0;
> + int force = 0, sort = 0;
> const char *arg;
> int opt;
> FILE *outf = NULL;
> @@ -143,9 +143,6 @@ int main(int argc, char *argv[])
> case 'f':
> force = 1;
> break;
> - case 'c':
> - check = 1;
> - break;
> case 'q':
> quiet++;
> break;
> diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c
> index ead0332..28d0b23 100644
> --- a/scripts/dtc/flattree.c
> +++ b/scripts/dtc/flattree.c
> @@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
> {
> struct reserve_info *reservelist = NULL;
> struct reserve_info *new;
> - const char *p;
> struct fdt_reserve_entry re;
>
> /*
> @@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
> *
> * First pass, count entries.
> */
> - p = inb->ptr;
> while (1) {
> flat_read_chunk(inb, &re, sizeof(re));
> re.address = fdt64_to_cpu(re.address);
> --
> 1.7.8.2
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-25 0:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 11:20 [PATCH] scripts: dtc: fix compile warnings Felipe Balbi
2012-01-26 16:58 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF178CB8233B-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-26 17:14 ` Jon Loeliger
[not found] ` <1327576807-19216-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2012-03-24 22:13 ` Michal Marek
2012-03-25 0:38 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).