Subject: linux-next: build warning after merge of the ubi tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 14 Jun 2010 11:53:39 +1000

Hi Artem,

After merging the ubi tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/mtd/ubi/scan.c: In function 'check_what_we_have':
drivers/mtd/ubi/scan.c:960: warning: passing argument 1 of 'get_random_bytes' discards qualifiers from pointer target type

Introduced by commit 095751a6e0838a712393a74eb0b7b6559dbdbe81 ("UBI:
generate random image_seq when formatting MTD devices").  "ubi" is
declared const (as a paramater to check_what_we_have()), so
&ubi->image_seq is a pointer to a const int.  get_random_bytes() wants to
modify that ...

-- 
Cheers,
Stephen Rothwell                    [email-masked]
http://www.canb.auug.org.au/~sfr/