* [PATCH] scripts: dtc: fix compile warnings
@ 2012-01-26 11:20 Felipe Balbi
2012-01-26 16:58 ` Stephen Warren
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Felipe Balbi @ 2012-01-26 11:20 UTC (permalink / raw)
To: swarren
Cc: mmarek, Linux Kernel Mailing List, devicetree-discuss, 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
^ 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
2012-01-26 17:14 ` Jon Loeliger
2012-03-24 22:13 ` Michal Marek
2012-03-25 0:38 ` Grant Likely
2 siblings, 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
Cc: mmarek, Linux Kernel Mailing List, devicetree-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2146 bytes --]
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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc: fix compile warnings
2012-01-26 16:58 ` Stephen Warren
@ 2012-01-26 17:14 ` Jon Loeliger
0 siblings, 0 replies; 5+ messages in thread
From: Jon Loeliger @ 2012-01-26 17:14 UTC (permalink / raw)
To: Stephen Warren
Cc: Felipe Balbi, David Gibson (david@gibson.dropbear.id.au),
mmarek, Linux Kernel Mailing List, devicetree-discuss
> RmVsaXBlIEJhbGJpIHdyb3RlIGF0IFRodXJzZGF5LCBKYW51YXJ5IDI2LCAyMDEyIDQ6MjAgQU06
> DQo+IEZpeCBmb2xsb3dpbmcgY29tcGlsZSB3YXJuaW5nczoNCj4gDQo+IHNjcmlwdHMvZHRjL2Zs
> YXR0cmVlLmM6IEluIGZ1bmN0aW9uIOKAmGZsYXRfcmVhZF9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HJlc2VydmVfaW5mbyAqbmV3Ow0KPiAtCWNvbnN0IGNoYXIgKnA7DQo+ICAJc3Ry
> dWN0IGZkdF9yZXNlcnZlX2VudHJ5IHJlOw0KPiANCj4gIAkvKg0KPiBAQCAtNzA2LDcgKzcwNSw2
> IEBAIHN0YXRpYyBzdHJ1Y3QgcmVzZXJ2ZV9pbmZvICpmbGF0X3JlYWRfbWVtX3Jlc2VydmUoc3Ry
> dWN0IGluYnVmICppbmIpDQo+ICAJICoNCj4gIAkgKiBGaXJzdCBwYXNzLCBjb3VudCBlbnRyaWVz
> Lg0KPiAgCSAqLw0KPiAtCXAgPSBpbmItPnB0cjsNCj4gIAl3aGlsZSAoMSkgew0KPiAgCQlmbGF0
> X3JlYWRfY2h1bmsoaW5iLCAmcmUsIHNpemVvZihyZSkpOw0KPiAgCQlyZS5hZGRyZXNzICA9IGZk
> dDY0X3RvX2NwdShyZS5hZGRyZXNzKTsNCj4gLS0NCj4gMS43LjguMg0KDQotLSANCm52cHVibGlj
> DQoNCg==
Yeah, that issue has been fixed in the main DTC repo already.
jdl
PS -- No point. Nope.
^ permalink raw reply [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
@ 2012-03-24 22:13 ` Michal Marek
2012-03-25 0:38 ` Grant Likely
2 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2012-03-24 22:13 UTC (permalink / raw)
To: Felipe Balbi; +Cc: swarren, Linux Kernel Mailing List, devicetree-discuss
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
^ permalink raw reply [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
2012-03-24 22:13 ` Michal Marek
@ 2012-03-25 0:38 ` Grant Likely
2 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2012-03-25 0:38 UTC (permalink / raw)
To: Felipe Balbi, swarren
Cc: mmarek, devicetree-discuss, Linux Kernel Mailing List, Felipe Balbi
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]
On Thu, 26 Jan 2012 13:20:07 +0200, Felipe Balbi <balbi@ti.com> 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>
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@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
^ 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
2012-01-26 17:14 ` Jon Loeliger
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).