[source] kernel: fix compiler warning in mtdsplit_minor.c under 4.4

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 15 15:02:41 PST 2017


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/c13b4ef2c8a796fb1d1fb95e2ab5185a69479b22

commit c13b4ef2c8a796fb1d1fb95e2ab5185a69479b22
Author: Gabor Juhos <juhosg at freemail.hu>
AuthorDate: Wed Dec 13 21:56:03 2017 +0100

    kernel: fix compiler warning in mtdsplit_minor.c under 4.4
    
    When mtdsplit_minor.c is compiled under Linux 4.4, the compiler
    drops the following warning:
    
        CC      drivers/mtd/mtdsplit/mtdsplit_minor.o
      drivers/mtd/mtdsplit/mtdsplit_minor.c:106:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
        .parse_fn = mtdsplit_parse_minor,
                    ^
      drivers/mtd/mtdsplit/mtdsplit_minor.c:106:14: note: (near initialization for 'mtdsplit_minor_parser.parse_fn')
    
    The second parameter of the parser function must not have a 'const'
    qualifier in 4.4. The 001-mtdsplit_backport.patch removes the qualifier
    from other partition parsers. Update it to handle mtdsplit_minor.c as
    well.
    
    Signed-off-by: Gabor Juhos <juhosg at freemail.hu>
---
 target/linux/generic/pending-4.4/001-mtdsplit_backport.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch b/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch
index 97cd62d..f0839b6 100644
--- a/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch
+++ b/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch
@@ -140,3 +140,14 @@
  {
  	struct wrgg03_header hdr;
  	size_t hdr_len, retlen, kernel_ent_size;
+--- a/drivers/mtd/mtdsplit/mtdsplit_minor.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_minor.c
+@@ -49,7 +49,7 @@ struct minor_header {
+ };
+ 
+ static int mtdsplit_parse_minor(struct mtd_info *master,
+-				const struct mtd_partition **pparts,
++				struct mtd_partition **pparts,
+ 				struct mtd_part_parser_data *data)
+ {
+ 	struct minor_header hdr;



More information about the lede-commits mailing list