* [PATCH 1/2] mtd: nand: Fix compiler warning
@ 2013-03-05 15:09 Alexander Shiyan
2013-03-05 15:09 ` [PATCH 2/2] w1: " Alexander Shiyan
2013-03-06 8:05 ` [PATCH 1/2] mtd: nand: " Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2013-03-05 15:09 UTC (permalink / raw)
To: barebox
This patch fixes following warning:
drivers/mtd/nand/nand_write.c: In function 'nand_do_write_ops':
drivers/mtd/nand/nand_write.c:272: warning: 'ret' may be used uninitialized in this function
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/mtd/nand/nand_write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c
index eea5113..0e2f98f 100644
--- a/drivers/mtd/nand/nand_write.c
+++ b/drivers/mtd/nand/nand_write.c
@@ -269,7 +269,7 @@ int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
uint32_t writelen = ops->len;
uint8_t *oob = ops->oobbuf;
uint8_t *buf = ops->datbuf;
- int ret, subpage;
+ int ret = 0, subpage;
ops->retlen = 0;
if (!writelen)
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] w1: Fix compiler warning
2013-03-05 15:09 [PATCH 1/2] mtd: nand: Fix compiler warning Alexander Shiyan
@ 2013-03-05 15:09 ` Alexander Shiyan
2013-03-06 8:05 ` [PATCH 1/2] mtd: nand: " Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2013-03-05 15:09 UTC (permalink / raw)
To: barebox
This patch fixes following warning:
drivers/w1/w1.c: In function 'w1_found':
drivers/w1/w1.c:471: warning: integer constant is too large for 'long' type
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/w1/w1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index eb6bec8..bbef470 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -468,7 +468,7 @@ void w1_found(struct w1_bus *bus, u64 rn)
dev->reg_num = rn;
dev->fid = tmp >> 56;
- dev->id = (tmp >> 8) & 0xffffffffffff;
+ dev->id = (tmp >> 8) & 0xffffffffffffULL;
dev->crc = tmp & 0xff;
dev_dbg(&bus->dev, "%s: familly = 0x%x, id = 0x%llx, crc = 0x%x\n",
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] mtd: nand: Fix compiler warning
2013-03-05 15:09 [PATCH 1/2] mtd: nand: Fix compiler warning Alexander Shiyan
2013-03-05 15:09 ` [PATCH 2/2] w1: " Alexander Shiyan
@ 2013-03-06 8:05 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2013-03-06 8:05 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Tue, Mar 05, 2013 at 07:09:01PM +0400, Alexander Shiyan wrote:
> This patch fixes following warning:
> drivers/mtd/nand/nand_write.c: In function 'nand_do_write_ops':
> drivers/mtd/nand/nand_write.c:272: warning: 'ret' may be used uninitialized in this function
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied, thanks
> ---
> drivers/mtd/nand/nand_write.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c
> index eea5113..0e2f98f 100644
> --- a/drivers/mtd/nand/nand_write.c
> +++ b/drivers/mtd/nand/nand_write.c
> @@ -269,7 +269,7 @@ int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
> uint32_t writelen = ops->len;
> uint8_t *oob = ops->oobbuf;
> uint8_t *buf = ops->datbuf;
> - int ret, subpage;
> + int ret = 0, subpage;
>
> ops->retlen = 0;
> if (!writelen)
> --
> 1.7.12.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-06 8:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 15:09 [PATCH 1/2] mtd: nand: Fix compiler warning Alexander Shiyan
2013-03-05 15:09 ` [PATCH 2/2] w1: " Alexander Shiyan
2013-03-06 8:05 ` [PATCH 1/2] mtd: nand: " Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox