From 30705cd89271ea05ff6c65552af3dc4f0680a03c Mon Sep 17 00:00:00 2001 From: Nicolas Heemeryck Date: Wed, 20 Apr 2022 23:58:39 +0200 Subject: [PATCH 01/12] tools/imagetool: Fix segfault when tparams->verify_header is NULL On some image types like i.MX8 and i.MX8M, the verify_header function is not implemented. Before this commit, no check on tparams->verify_header was done causing a segfault if NULL. Now, a proper error message is printed. Signed-off-by: Nicolas Heemeryck --- tools/imagetool.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/tools/imagetool.c b/tools/imagetool.c index 5ad6d7413fe..f14ca2fb979 100644 --- a/tools/imagetool.c +++ b/tools/imagetool.c @@ -80,27 +80,33 @@ static int imagetool_verify_print_header_by_type( struct image_type_params *tparams, struct image_tool_params *params) { - int retval; + int retval = -1; - retval = tparams->verify_header((unsigned char *)ptr, sbuf->st_size, - params); + if (tparams->verify_header) { + retval = tparams->verify_header((unsigned char *)ptr, + sbuf->st_size, params); - if (retval == 0) { - /* - * Print the image information if verify is successful - */ - if (tparams->print_header) { - if (!params->quiet) - tparams->print_header(ptr); + if (retval == 0) { + /* + * Print the image information if verify is successful + */ + if (tparams->print_header) { + if (!params->quiet) + tparams->print_header(ptr); + } else { + fprintf(stderr, + "%s: print_header undefined for %s\n", + params->cmdname, tparams->name); + } } else { fprintf(stderr, - "%s: print_header undefined for %s\n", - params->cmdname, tparams->name); + "%s: verify_header failed for %s with exit code %d\n", + params->cmdname, tparams->name, retval); } + } else { - fprintf(stderr, - "%s: verify_header failed for %s with exit code %d\n", - params->cmdname, tparams->name, retval); + fprintf(stderr, "%s: print_header undefined for %s\n", + params->cmdname, tparams->name); } return retval; From bfae2744dd136198a97b480bc0cc1814663fe33b Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Fri, 22 Apr 2022 14:50:23 -0400 Subject: [PATCH 02/12] serial: smh: Check return value of strndup strndup can fail. Check for it. Fixes: 4855b39be ("serial: smh: Implement puts for DM") Signed-off-by: Sean Anderson --- drivers/serial/serial_semihosting.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/serial/serial_semihosting.c b/drivers/serial/serial_semihosting.c index 4328b3dac5b..2561414e40f 100644 --- a/drivers/serial/serial_semihosting.c +++ b/drivers/serial/serial_semihosting.c @@ -54,6 +54,9 @@ static ssize_t smh_serial_puts(struct udevice *dev, const char *s, size_t len) } buf = strndup(s, len); + if (!buf) + return -ENOMEM; + smh_puts(buf); free(buf); return len; From 90c52423be9933d5e85c20c6a0266b2c565f030a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sun, 24 Apr 2022 11:34:56 +0200 Subject: [PATCH 03/12] lib/date: Make rtc_mktime and mktime64 Y2038-ready We currently overflow due to wrong types used internally in rtc_mktime, on all platforms, and we return a too small type on 32-bit. One consumer that directly benefits from this is mktime64. Many others may still store the result in a wrong type. While at it, drop the redundant cast of mon in rtc_mktime (obsoleted by 714209832db1). Signed-off-by: Jan Kiszka --- include/linux/time.h | 3 --- include/rtc.h | 8 +++++--- lib/date.c | 13 +++++-------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/linux/time.h b/include/linux/time.h index 702dd276aea..14ff5b6f481 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -152,9 +152,6 @@ _DEFUN (ctime_r, (tim_p, result), return asctime_r (localtime_r (tim_p, &tm), result); } -/* for compatibility with linux code */ -typedef __s64 time64_t; - #ifdef CONFIG_LIB_DATE time64_t mktime64(const unsigned int year, const unsigned int mon, const unsigned int day, const unsigned int hour, diff --git a/include/rtc.h b/include/rtc.h index 6c7fcadd488..10104e3bf5a 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -16,6 +16,8 @@ #include #include +typedef int64_t time64_t; + #ifdef CONFIG_DM_RTC struct udevice; @@ -301,7 +303,7 @@ int rtc_calc_weekday(struct rtc_time *time); void rtc_to_tm(u64 time_t, struct rtc_time *time); /** - * rtc_mktime() - Convert a broken-out time into a time_t value + * rtc_mktime() - Convert a broken-out time into a time64_t value * * The following fields need to be valid for this function to work: * tm_sec, tm_min, tm_hour, tm_mday, tm_mon, tm_year @@ -309,9 +311,9 @@ void rtc_to_tm(u64 time_t, struct rtc_time *time); * Note that tm_wday and tm_yday are ignored. * * @time: Broken-out time to convert - * Return: corresponding time_t value, seconds since 1970-01-01 00:00:00 + * Return: corresponding time64_t value, seconds since 1970-01-01 00:00:00 */ -unsigned long rtc_mktime(const struct rtc_time *time); +time64_t rtc_mktime(const struct rtc_time *time); /** * rtc_month_days() - The number of days in the month diff --git a/lib/date.c b/lib/date.c index c589d9ed3a2..e3d22459cd0 100644 --- a/lib/date.c +++ b/lib/date.c @@ -71,19 +71,16 @@ int rtc_calc_weekday(struct rtc_time *tm) * -year / 100 + year / 400 terms, and add 10.] * * This algorithm was first published by Gauss (I think). - * - * WARNING: this function will overflow on 2106-02-07 06:28:16 on - * machines where long is 32-bit! (However, as time_t is signed, we - * will already get problems at other places on 2038-01-19 03:14:08) */ -unsigned long rtc_mktime(const struct rtc_time *tm) +time64_t rtc_mktime(const struct rtc_time *tm) { int mon = tm->tm_mon; int year = tm->tm_year; - int days, hours; + unsigned long days; + time64_t hours; mon -= 2; - if (0 >= (int)mon) { /* 1..12 -> 11, 12, 1..10 */ + if (0 >= mon) { /* 1..12 -> 11, 12, 1..10 */ mon += 12; /* Puts Feb last since it has leap day */ year -= 1; } @@ -109,5 +106,5 @@ time64_t mktime64(const unsigned int year, const unsigned int mon, time.tm_min = min; time.tm_sec = sec; - return (time64_t)rtc_mktime((const struct rtc_time *)&time); + return rtc_mktime((const struct rtc_time *)&time); } From e4269636bec4e64dc363e237c2d1efa0e8645310 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 25 Apr 2022 18:35:05 +0200 Subject: [PATCH 04/12] cmd: fix long text for fdt command We don't have an option -cq but two distinct options -c and -q. Fixes: e9496ec37440 ("fdt: Add -q option to fdt addr for distro_bootcmd") Signed-off-by: Heinrich Schuchardt --- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fdt.c b/cmd/fdt.c index c07342cf25f..842e6cb634b 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -1071,7 +1071,7 @@ static int fdt_print(const char *pathp, char *prop, int depth) /********************************************************************/ #ifdef CONFIG_SYS_LONGHELP static char fdt_help_text[] = - "addr [-cq] [] - Set the [control] fdt location to \n" + "addr [-c] [-q] [] - Set the [control] fdt location to \n" #ifdef CONFIG_OF_LIBFDT_OVERLAY "fdt apply - Apply overlay to the DT\n" #endif From 54d24d72601321f4470c4edf31c6b29adae424a7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 25 Apr 2022 22:26:45 +0200 Subject: [PATCH 05/12] cmd: simplify do_adc_single() If argc is not < 3, it must be >= 3. If argc >= 3, argv[2] cannot be NULL. Fixes: 9de612ae4ded ("cmd: adc: Add support for storing ADC result in env variable") Signed-off-by: Heinrich Schuchardt --- cmd/adc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/adc.c b/cmd/adc.c index 8de9121cad6..195efa8661c 100644 --- a/cmd/adc.c +++ b/cmd/adc.c @@ -71,7 +71,6 @@ static int do_adc_info(struct cmd_tbl *cmdtp, int flag, int argc, static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - char *varname = NULL; struct udevice *dev; unsigned int data; int ret, uV, val; @@ -79,9 +78,6 @@ static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 3) return CMD_RET_USAGE; - if (argc >= 3) - varname = argv[2]; - ret = adc_channel_single_shot(argv[1], simple_strtol(argv[2], NULL, 0), &data); if (ret) { @@ -99,8 +95,7 @@ static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, printf("%u\n", data); } - if (varname) - env_set_ulong(varname, val); + env_set_ulong(argv[2], val); return CMD_RET_SUCCESS; } From 6d81319728c6a20b3e6d3dc828cb351fb5dcb1c6 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 25 Apr 2022 23:01:44 +0200 Subject: [PATCH 06/12] cmd: onenand: fix printf codes For printing size_t use %zu or %zx. Signed-off-by: Heinrich Schuchardt --- cmd/onenand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/onenand.c b/cmd/onenand.c index 592985a7ee3..d633f19d3bb 100644 --- a/cmd/onenand.c +++ b/cmd/onenand.c @@ -53,7 +53,7 @@ static int arg_off_size_onenand(int argc, char *const argv[], ulong *off, if (*size == mtd->size) puts("whole chip\n"); else - printf("offset 0x%lx, size 0x%x\n", *off, *size); + printf("offset 0x%lx, size 0x%zx\n", *off, *size); return 0; } @@ -401,7 +401,7 @@ static int do_onenand_read(struct cmd_tbl *cmdtp, int flag, int argc, ret = onenand_block_read(ofs, len, &retlen, (u8 *)addr, oob); - printf(" %d bytes read: %s\n", retlen, ret ? "ERROR" : "OK"); + printf(" %zu bytes read: %s\n", retlen, ret ? "ERROR" : "OK"); return ret == 0 ? 0 : 1; } @@ -428,7 +428,7 @@ static int do_onenand_write(struct cmd_tbl *cmdtp, int flag, int argc, ret = onenand_block_write(ofs, len, &retlen, (u8 *)addr, withoob); - printf(" %d bytes written: %s\n", retlen, ret ? "ERROR" : "OK"); + printf(" %zu bytes written: %s\n", retlen, ret ? "ERROR" : "OK"); return ret == 0 ? 0 : 1; } From 274347030631141f3e6259b2ec4fcd11365dd9a3 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 25 Apr 2022 23:11:06 +0200 Subject: [PATCH 07/12] cmd: mmc: don't assign unused values Don't assign a value to variable speedmode which is never used. Signed-off-by: Heinrich Schuchardt --- cmd/mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/mmc.c b/cmd/mmc.c index 7464f8d00cd..63bf69b0bd0 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -501,11 +501,12 @@ static int do_mmc_rescan(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct mmc *mmc; - enum bus_mode speed_mode = MMC_MODES_END; if (argc == 1) { mmc = init_mmc_device(curr_device, true); } else if (argc == 2) { + enum bus_mode speed_mode; + speed_mode = (int)dectoul(argv[1], NULL); mmc = __init_mmc_device(curr_device, true, speed_mode); } else { @@ -543,7 +544,6 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag, { int dev, part = 0, ret; struct mmc *mmc; - enum bus_mode speed_mode = MMC_MODES_END; if (argc == 1) { dev = curr_device; @@ -561,6 +561,8 @@ static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag, } mmc = init_mmc_device(dev, true); } else if (argc == 4) { + enum bus_mode speed_mode; + dev = (int)dectoul(argv[1], NULL); part = (int)dectoul(argv[2], NULL); if (part > PART_ACCESS_MASK) { From 8b42439ad19f1b3920541c357d5d7e9593adc420 Mon Sep 17 00:00:00 2001 From: Oliver Graute Date: Tue, 26 Apr 2022 09:26:12 +0200 Subject: [PATCH 08/12] rtc: rv8803: fix off-by-one in month counting tm_mon has a range from 0..11, but the RTC expects 1..12. So we adapt the month accordingly. This was determined when comparing the driver with the corresponding linux kernel driver. Signed-off-by: Oliver Graute Reviewed-by: Michael Walle Reviewed-by: Heiko Schocher --- drivers/rtc/rv8803.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c index 5bae39d6e09..06a4ae89fa9 100644 --- a/drivers/rtc/rv8803.c +++ b/drivers/rtc/rv8803.c @@ -49,7 +49,7 @@ static int rv8803_rtc_set(struct udevice *dev, const struct rtc_time *tm) printf("WARNING: year should be between 2000 and 2099!\n"); buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); - buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon); + buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon + 1); buf[RTC_DAY_REG_ADDR] = 1 << (tm->tm_wday & 0x7); buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); @@ -90,7 +90,7 @@ static int rv8803_rtc_get(struct udevice *dev, struct rtc_time *tm) tm->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); tm->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); - tm->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F); + tm->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F) - 1; tm->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + 2000; tm->tm_wday = fls(buf[RTC_DAY_REG_ADDR] & 0x7F) - 1; tm->tm_yday = 0; From 616571804a01f032bc43fa4fdeb42f00cb90513c Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 26 Apr 2022 19:24:38 +0200 Subject: [PATCH 09/12] tools: mkimage: Avoid ENODATA in host tools ENODATA isn't part of POSIX. Use EINVAL instead. Signed-off-by: Mark Kettenis Reviewed-by: Tom Rini --- tools/image-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/image-host.c b/tools/image-host.c index ab6f756cf1b..698adfb3e1d 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -1205,7 +1205,7 @@ int fit_pre_load_data(const char *keydir, void *keydest, void *fit) if (!key_name) printf("The property key-name is missing in the node %s\n", IMAGE_PRE_LOAD_PATH); - ret = -ENODATA; + ret = -EINVAL; goto out; } From d6577668196a130787291682ff9202721396ec1b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 26 Apr 2022 23:26:31 +0200 Subject: [PATCH 10/12] clk: scmi: fix scmi_clk_get_attibute() Local variable out.name lives on the stack and therefore cannot be returned directly. Move the strdup() call into the function. (Coverity 352460) Fixes: 7c33f78983c3 ("clk: scmi: register scmi clocks with CCF") Signed-off-by: Heinrich Schuchardt Reviewed-by: Sean Anderson --- drivers/clk/clk_scmi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index 57022685e23..5aaabcf0b44 100644 --- a/drivers/clk/clk_scmi.c +++ b/drivers/clk/clk_scmi.c @@ -53,7 +53,7 @@ static int scmi_clk_get_attibute(struct udevice *dev, int clkid, char **name) if (ret) return ret; - *name = out.clock_name; + *name = strdup(out.clock_name); return 0; } @@ -152,11 +152,9 @@ static int scmi_clk_probe(struct udevice *dev) return ret; for (i = 0; i < num_clocks; i++) { - char *name; - - if (!scmi_clk_get_attibute(dev, i, &name)) { - char *clock_name = strdup(name); + char *clock_name; + if (!scmi_clk_get_attibute(dev, i, &clock_name)) { clk = kzalloc(sizeof(*clk), GFP_KERNEL); if (!clk || !clock_name) ret = -ENOMEM; From 0be4b0b6516c82f53bb3e8546ea8f213cf2fe2ac Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 26 Apr 2022 23:43:30 +0200 Subject: [PATCH 11/12] reset: Return 0 if ops unimplemented and remove empty functions In case the ops is not implemented, return 0 in the core right away. This is better than having multiple copies of functions which just return 0 in each reset driver. Drop all those empty functions. Signed-off-by: Marek Vasut Cc: Simon Glass Cc: Tom Rini --- drivers/reset/reset-ast2500.c | 18 ------------------ drivers/reset/reset-ast2600.c | 18 ------------------ drivers/reset/reset-bcm6345.c | 6 ------ drivers/reset/reset-dra7.c | 12 ------------ drivers/reset/reset-hisilicon.c | 12 ------------ drivers/reset/reset-hsdk.c | 8 -------- drivers/reset/reset-imx7.c | 12 ------------ drivers/reset/reset-ipq4019.c | 12 ------------ drivers/reset/reset-mediatek.c | 12 ------------ drivers/reset/reset-meson.c | 6 ------ drivers/reset/reset-mtmips.c | 12 ------------ drivers/reset/reset-raspberrypi.c | 12 ------------ drivers/reset/reset-rockchip.c | 9 --------- drivers/reset/reset-scmi.c | 6 ------ drivers/reset/reset-sifive.c | 11 ----------- drivers/reset/reset-socfpga.c | 18 ------------------ drivers/reset/reset-sunxi.c | 8 -------- drivers/reset/reset-ti-sci.c | 14 -------------- drivers/reset/reset-uclass.c | 12 ++++++------ drivers/reset/reset-uniphier.c | 12 ------------ drivers/reset/reset-zynqmp.c | 11 ----------- drivers/reset/sti-reset.c | 12 ------------ drivers/reset/stm32-reset.c | 12 ------------ drivers/reset/tegra-car-reset.c | 17 ----------------- drivers/reset/tegra186-reset.c | 26 -------------------------- 25 files changed, 6 insertions(+), 302 deletions(-) diff --git a/drivers/reset/reset-ast2500.c b/drivers/reset/reset-ast2500.c index c3d650fc6b0..0a1dd236aff 100644 --- a/drivers/reset/reset-ast2500.c +++ b/drivers/reset/reset-ast2500.c @@ -18,22 +18,6 @@ struct ast2500_reset_priv { struct ast2500_scu *scu; }; -static int ast2500_reset_request(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - -static int ast2500_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static int ast2500_reset_assert(struct reset_ctl *reset_ctl) { struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -93,8 +77,6 @@ static const struct udevice_id ast2500_reset_ids[] = { }; struct reset_ops ast2500_reset_ops = { - .request = ast2500_reset_request, - .rfree = ast2500_reset_free, .rst_assert = ast2500_reset_assert, .rst_deassert = ast2500_reset_deassert, }; diff --git a/drivers/reset/reset-ast2600.c b/drivers/reset/reset-ast2600.c index 195ddd18e05..985235a3ac4 100644 --- a/drivers/reset/reset-ast2600.c +++ b/drivers/reset/reset-ast2600.c @@ -17,22 +17,6 @@ struct ast2600_reset_priv { struct ast2600_scu *scu; }; -static int ast2600_reset_request(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - -static int ast2600_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static int ast2600_reset_assert(struct reset_ctl *reset_ctl) { struct ast2600_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -92,8 +76,6 @@ static const struct udevice_id ast2600_reset_ids[] = { }; struct reset_ops ast2600_reset_ops = { - .request = ast2600_reset_request, - .rfree = ast2600_reset_free, .rst_assert = ast2600_reset_assert, .rst_deassert = ast2600_reset_deassert, }; diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c index f69189822bf..5383f59ca37 100644 --- a/drivers/reset/reset-bcm6345.c +++ b/drivers/reset/reset-bcm6345.c @@ -42,11 +42,6 @@ static int bcm6345_reset_deassert(struct reset_ctl *rst) return 0; } -static int bcm6345_reset_free(struct reset_ctl *rst) -{ - return 0; -} - static int bcm6345_reset_request(struct reset_ctl *rst) { if (rst->id >= MAX_RESETS) @@ -56,7 +51,6 @@ static int bcm6345_reset_request(struct reset_ctl *rst) } struct reset_ops bcm6345_reset_reset_ops = { - .rfree = bcm6345_reset_free, .request = bcm6345_reset_request, .rst_assert = bcm6345_reset_assert, .rst_deassert = bcm6345_reset_deassert, diff --git a/drivers/reset/reset-dra7.c b/drivers/reset/reset-dra7.c index 585f8323c52..a9589d448dc 100644 --- a/drivers/reset/reset-dra7.c +++ b/drivers/reset/reset-dra7.c @@ -18,16 +18,6 @@ struct dra7_reset_priv { u8 nreset; }; -static int dra7_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int dra7_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static inline void dra7_reset_rmw(u32 addr, u32 value, u32 mask) { writel(((readl(addr) & (~mask)) | (value & mask)), addr); @@ -63,8 +53,6 @@ static int dra7_reset_assert(struct reset_ctl *reset_ctl) } struct reset_ops dra7_reset_ops = { - .request = dra7_reset_request, - .rfree = dra7_reset_free, .rst_assert = dra7_reset_assert, .rst_deassert = dra7_reset_deassert, }; diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c index 3f9da8cc8d3..8152cec2271 100644 --- a/drivers/reset/reset-hisilicon.c +++ b/drivers/reset/reset-hisilicon.c @@ -46,16 +46,6 @@ static int hisi_reset_assert(struct reset_ctl *rst) return 0; } -static int hisi_reset_free(struct reset_ctl *rst) -{ - return 0; -} - -static int hisi_reset_request(struct reset_ctl *rst) -{ - return 0; -} - static int hisi_reset_of_xlate(struct reset_ctl *rst, struct ofnode_phandle_args *args) { @@ -74,8 +64,6 @@ static int hisi_reset_of_xlate(struct reset_ctl *rst, static const struct reset_ops hisi_reset_reset_ops = { .of_xlate = hisi_reset_of_xlate, - .request = hisi_reset_request, - .rfree = hisi_reset_free, .rst_assert = hisi_reset_assert, .rst_deassert = hisi_reset_deassert, }; diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c index 8318d0a20b4..74b1173e887 100644 --- a/drivers/reset/reset-hsdk.c +++ b/drivers/reset/reset-hsdk.c @@ -76,15 +76,7 @@ static int hsdk_reset_reset(struct reset_ctl *rst_ctl) return hsdk_reset_do(rst); } -static int hsdk_reset_noop(struct reset_ctl *rst_ctl) -{ - return 0; -} - static const struct reset_ops hsdk_reset_ops = { - .request = hsdk_reset_noop, - .rfree = hsdk_reset_noop, - .rst_assert = hsdk_reset_noop, .rst_deassert = hsdk_reset_reset, }; diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index e5085ae17c4..eaef2cc2cdf 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -264,19 +264,7 @@ static int imx7_reset_deassert(struct reset_ctl *rst) return priv->ops.rst_deassert(rst); } -static int imx7_reset_free(struct reset_ctl *rst) -{ - return 0; -} - -static int imx7_reset_request(struct reset_ctl *rst) -{ - return 0; -} - static const struct reset_ops imx7_reset_reset_ops = { - .request = imx7_reset_request, - .rfree = imx7_reset_free, .rst_assert = imx7_reset_assert, .rst_deassert = imx7_reset_deassert, }; diff --git a/drivers/reset/reset-ipq4019.c b/drivers/reset/reset-ipq4019.c index 15858f3cb1e..7f0bd85ad68 100644 --- a/drivers/reset/reset-ipq4019.c +++ b/drivers/reset/reset-ipq4019.c @@ -130,19 +130,7 @@ static int ipq4019_reset_deassert(struct reset_ctl *rst) return 0; } -static int ipq4019_reset_free(struct reset_ctl *rst) -{ - return 0; -} - -static int ipq4019_reset_request(struct reset_ctl *rst) -{ - return 0; -} - static const struct reset_ops ipq4019_reset_ops = { - .request = ipq4019_reset_request, - .rfree = ipq4019_reset_free, .rst_assert = ipq4019_reset_assert, .rst_deassert = ipq4019_reset_deassert, }; diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c index 7427013ab60..8b62d917778 100644 --- a/drivers/reset/reset-mediatek.c +++ b/drivers/reset/reset-mediatek.c @@ -24,16 +24,6 @@ struct mediatek_reset_priv { u32 nr_resets; }; -static int mediatek_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int mediatek_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int mediatek_reset_assert(struct reset_ctl *reset_ctl) { struct mediatek_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -59,8 +49,6 @@ static int mediatek_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops mediatek_reset_ops = { - .request = mediatek_reset_request, - .rfree = mediatek_reset_free, .rst_assert = mediatek_reset_assert, .rst_deassert = mediatek_reset_deassert, }; diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 5896bcb4218..64bc696f137 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -30,11 +30,6 @@ static int meson_reset_request(struct reset_ctl *reset_ctl) return 0; } -static int meson_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert) { struct meson_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -65,7 +60,6 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops meson_reset_ops = { .request = meson_reset_request, - .rfree = meson_reset_free, .rst_assert = meson_reset_assert, .rst_deassert = meson_reset_deassert, }; diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c index 4e71d525584..7bb8469823c 100644 --- a/drivers/reset/reset-mtmips.c +++ b/drivers/reset/reset-mtmips.c @@ -18,16 +18,6 @@ struct mtmips_reset_priv { void __iomem *base; }; -static int mtmips_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int mtmips_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int mtmips_reset_assert(struct reset_ctl *reset_ctl) { struct mtmips_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -47,8 +37,6 @@ static int mtmips_reset_deassert(struct reset_ctl *reset_ctl) } static const struct reset_ops mtmips_reset_ops = { - .request = mtmips_reset_request, - .rfree = mtmips_reset_free, .rst_assert = mtmips_reset_assert, .rst_deassert = mtmips_reset_deassert, }; diff --git a/drivers/reset/reset-raspberrypi.c b/drivers/reset/reset-raspberrypi.c index 6a80179b822..804e32b8dd1 100644 --- a/drivers/reset/reset-raspberrypi.c +++ b/drivers/reset/reset-raspberrypi.c @@ -18,11 +18,6 @@ static int raspberrypi_reset_request(struct reset_ctl *reset_ctl) return 0; } -static int raspberrypi_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int raspberrypi_reset_assert(struct reset_ctl *reset_ctl) { switch (reset_ctl->id) { @@ -34,16 +29,9 @@ static int raspberrypi_reset_assert(struct reset_ctl *reset_ctl) } } -static int raspberrypi_reset_deassert(struct reset_ctl *reset_ctl) -{ - return 0; -} - struct reset_ops raspberrypi_reset_ops = { .request = raspberrypi_reset_request, - .rfree = raspberrypi_reset_free, .rst_assert = raspberrypi_reset_assert, - .rst_deassert = raspberrypi_reset_deassert, }; static const struct udevice_id raspberrypi_reset_ids[] = { diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c index eeb3d2eea77..e0a95edd80a 100644 --- a/drivers/reset/reset-rockchip.c +++ b/drivers/reset/reset-rockchip.c @@ -40,14 +40,6 @@ static int rockchip_reset_request(struct reset_ctl *reset_ctl) return 0; } -static int rockchip_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static int rockchip_reset_assert(struct reset_ctl *reset_ctl) { struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -80,7 +72,6 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops rockchip_reset_ops = { .request = rockchip_reset_request, - .rfree = rockchip_reset_free, .rst_assert = rockchip_reset_assert, .rst_deassert = rockchip_reset_deassert, }; diff --git a/drivers/reset/reset-scmi.c b/drivers/reset/reset-scmi.c index 850cb188868..81d195a06a9 100644 --- a/drivers/reset/reset-scmi.c +++ b/drivers/reset/reset-scmi.c @@ -65,14 +65,8 @@ static int scmi_reset_request(struct reset_ctl *rst) return scmi_to_linux_errno(out.status); } -static int scmi_reset_rfree(struct reset_ctl *rst) -{ - return 0; -} - static const struct reset_ops scmi_reset_domain_ops = { .request = scmi_reset_request, - .rfree = scmi_reset_rfree, .rst_assert = scmi_reset_assert, .rst_deassert = scmi_reset_deassert, }; diff --git a/drivers/reset/reset-sifive.c b/drivers/reset/reset-sifive.c index eec840d677f..23513b2f541 100644 --- a/drivers/reset/reset-sifive.c +++ b/drivers/reset/reset-sifive.c @@ -63,16 +63,6 @@ static int sifive_reset_request(struct reset_ctl *rst) return 0; } -static int sifive_reset_free(struct reset_ctl *rst) -{ - struct sifive_reset_priv *priv = dev_get_priv(rst->dev); - - debug("%s(rst=%p) (dev=%p, id=%lu) (nr_reset=%d)\n", __func__, - rst, rst->dev, rst->id, priv->nr_reset); - - return 0; -} - static int sifive_reset_probe(struct udevice *dev) { struct sifive_reset_priv *priv = dev_get_priv(dev); @@ -105,7 +95,6 @@ int sifive_reset_bind(struct udevice *dev, ulong count) const struct reset_ops sifive_reset_ops = { .request = sifive_reset_request, - .rfree = sifive_reset_free, .rst_assert = sifive_reset_assert, .rst_deassert = sifive_reset_deassert, }; diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 98450db94b2..6e3f03e2484 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -89,25 +89,7 @@ static int socfpga_reset_deassert(struct reset_ctl *reset_ctl) false, 500, false); } -static int socfpga_reset_request(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, - reset_ctl, reset_ctl->dev, reset_ctl->id); - - return 0; -} - -static int socfpga_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static const struct reset_ops socfpga_reset_ops = { - .request = socfpga_reset_request, - .rfree = socfpga_reset_free, .rst_assert = socfpga_reset_assert, .rst_deassert = socfpga_reset_deassert, }; diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index 8b95938dfe3..e2a9c2a142b 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -41,13 +41,6 @@ static int sunxi_reset_request(struct reset_ctl *reset_ctl) return 0; } -static int sunxi_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s: (RST#%ld)\n", __func__, reset_ctl->id); - - return 0; -} - static int sunxi_set_reset(struct reset_ctl *reset_ctl, bool on) { struct sunxi_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -85,7 +78,6 @@ static int sunxi_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops sunxi_reset_ops = { .request = sunxi_reset_request, - .rfree = sunxi_reset_free, .rst_assert = sunxi_reset_assert, .rst_deassert = sunxi_reset_deassert, }; diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c index d8510a4abb2..f35332767b2 100644 --- a/drivers/reset/reset-ti-sci.c +++ b/drivers/reset/reset-ti-sci.c @@ -63,18 +63,6 @@ static int ti_sci_reset_of_xlate(struct reset_ctl *rst, return 0; } -static int ti_sci_reset_request(struct reset_ctl *rst) -{ - debug("%s(rst=%p)\n", __func__, rst); - return 0; -} - -static int ti_sci_reset_free(struct reset_ctl *rst) -{ - debug("%s(rst=%p)\n", __func__, rst); - return 0; -} - /** * ti_sci_reset_set() - program a device's reset * @rst: Handle to a single reset signal @@ -193,8 +181,6 @@ static const struct udevice_id ti_sci_reset_of_match[] = { static struct reset_ops ti_sci_reset_ops = { .of_xlate = ti_sci_reset_of_xlate, - .request = ti_sci_reset_request, - .rfree = ti_sci_reset_free, .rst_assert = ti_sci_reset_assert, .rst_deassert = ti_sci_reset_deassert, .rst_status = ti_sci_reset_status, diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c index ca9f00a8f24..bcef46039c2 100644 --- a/drivers/reset/reset-uclass.c +++ b/drivers/reset/reset-uclass.c @@ -68,7 +68,7 @@ static int reset_get_by_index_tail(int ret, ofnode node, return ret; } - ret = ops->request(reset_ctl); + ret = ops->request ? ops->request(reset_ctl) : 0; if (ret) { debug("ops->request() failed: %d\n", ret); return ret; @@ -168,7 +168,7 @@ int reset_request(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->request(reset_ctl); + return ops->request ? ops->request(reset_ctl) : 0; } int reset_free(struct reset_ctl *reset_ctl) @@ -177,7 +177,7 @@ int reset_free(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->rfree(reset_ctl); + return ops->rfree ? ops->rfree(reset_ctl) : 0; } int reset_assert(struct reset_ctl *reset_ctl) @@ -186,7 +186,7 @@ int reset_assert(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->rst_assert(reset_ctl); + return ops->rst_assert ? ops->rst_assert(reset_ctl) : 0; } int reset_assert_bulk(struct reset_ctl_bulk *bulk) @@ -208,7 +208,7 @@ int reset_deassert(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->rst_deassert(reset_ctl); + return ops->rst_deassert ? ops->rst_deassert(reset_ctl) : 0; } int reset_deassert_bulk(struct reset_ctl_bulk *bulk) @@ -230,7 +230,7 @@ int reset_status(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->rst_status(reset_ctl); + return ops->rst_status ? ops->rst_status(reset_ctl) : 0; } int reset_release_all(struct reset_ctl *reset_ctl, int count) diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c index c5af995b4bd..7adae51873f 100644 --- a/drivers/reset/reset-uniphier.c +++ b/drivers/reset/reset-uniphier.c @@ -184,16 +184,6 @@ struct uniphier_reset_priv { const struct uniphier_reset_data *data; }; -static int uniphier_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int uniphier_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert) { struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -239,8 +229,6 @@ static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) } static const struct reset_ops uniphier_reset_ops = { - .request = uniphier_reset_request, - .rfree = uniphier_reset_free, .rst_assert = uniphier_reset_assert, .rst_deassert = uniphier_reset_deassert, }; diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c index 57652346738..4e3f907980f 100644 --- a/drivers/reset/reset-zynqmp.c +++ b/drivers/reset/reset-zynqmp.c @@ -59,16 +59,6 @@ static int zynqmp_reset_request(struct reset_ctl *rst) return 0; } -static int zynqmp_reset_free(struct reset_ctl *rst) -{ - struct zynqmp_reset_priv *priv = dev_get_priv(rst->dev); - - dev_dbg(rst->dev, "%s(rst=%p) (id=%lu) (nr_reset=%d)\n", __func__, - rst, rst->id, priv->nr_reset); - - return 0; -} - static int zynqmp_reset_probe(struct udevice *dev) { struct zynqmp_reset_priv *priv = dev_get_priv(dev); @@ -80,7 +70,6 @@ static int zynqmp_reset_probe(struct udevice *dev) const struct reset_ops zynqmp_reset_ops = { .request = zynqmp_reset_request, - .rfree = zynqmp_reset_free, .rst_assert = zynqmp_reset_assert, .rst_deassert = zynqmp_reset_deassert, }; diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c index 9287f28952c..ea449bbaaf0 100644 --- a/drivers/reset/sti-reset.c +++ b/drivers/reset/sti-reset.c @@ -280,16 +280,6 @@ static int sti_reset_program_hw(struct reset_ctl *reset_ctl, int assert) return 0; } -static int sti_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int sti_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int sti_reset_assert(struct reset_ctl *reset_ctl) { return sti_reset_program_hw(reset_ctl, true); @@ -301,8 +291,6 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops sti_reset_ops = { - .request = sti_reset_request, - .rfree = sti_reset_free, .rst_assert = sti_reset_assert, .rst_deassert = sti_reset_deassert, }; diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c index bbc6b135a93..0bbde29810b 100644 --- a/drivers/reset/stm32-reset.c +++ b/drivers/reset/stm32-reset.c @@ -27,16 +27,6 @@ struct stm32_reset_priv { fdt_addr_t base; }; -static int stm32_reset_request(struct reset_ctl *reset_ctl) -{ - return 0; -} - -static int stm32_reset_free(struct reset_ctl *reset_ctl) -{ - return 0; -} - static int stm32_reset_assert(struct reset_ctl *reset_ctl) { struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev); @@ -80,8 +70,6 @@ static int stm32_reset_deassert(struct reset_ctl *reset_ctl) } static const struct reset_ops stm32_reset_ops = { - .request = stm32_reset_request, - .rfree = stm32_reset_free, .rst_assert = stm32_reset_assert, .rst_deassert = stm32_reset_deassert, }; diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c index a33d4533a82..501e9cab8f7 100644 --- a/drivers/reset/tegra-car-reset.c +++ b/drivers/reset/tegra-car-reset.c @@ -23,14 +23,6 @@ static int tegra_car_reset_request(struct reset_ctl *reset_ctl) return 0; } -static int tegra_car_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static int tegra_car_reset_assert(struct reset_ctl *reset_ctl) { debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, @@ -53,21 +45,12 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops tegra_car_reset_ops = { .request = tegra_car_reset_request, - .rfree = tegra_car_reset_free, .rst_assert = tegra_car_reset_assert, .rst_deassert = tegra_car_reset_deassert, }; -static int tegra_car_reset_probe(struct udevice *dev) -{ - debug("%s(dev=%p)\n", __func__, dev); - - return 0; -} - U_BOOT_DRIVER(tegra_car_reset) = { .name = "tegra_car_reset", .id = UCLASS_RESET, - .probe = tegra_car_reset_probe, .ops = &tegra_car_reset_ops, }; diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c index c60a03f0bfa..d43da454114 100644 --- a/drivers/reset/tegra186-reset.c +++ b/drivers/reset/tegra186-reset.c @@ -11,22 +11,6 @@ #include #include -static int tegra186_reset_request(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - -static int tegra186_reset_free(struct reset_ctl *reset_ctl) -{ - debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, - reset_ctl->dev, reset_ctl->id); - - return 0; -} - static int tegra186_reset_common(struct reset_ctl *reset_ctl, enum mrq_reset_commands cmd) { @@ -61,22 +45,12 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl) } struct reset_ops tegra186_reset_ops = { - .request = tegra186_reset_request, - .rfree = tegra186_reset_free, .rst_assert = tegra186_reset_assert, .rst_deassert = tegra186_reset_deassert, }; -static int tegra186_reset_probe(struct udevice *dev) -{ - debug("%s(dev=%p)\n", __func__, dev); - - return 0; -} - U_BOOT_DRIVER(tegra186_reset) = { .name = "tegra186_reset", .id = UCLASS_RESET, - .probe = tegra186_reset_probe, .ops = &tegra186_reset_ops, }; From aa5ea20c71921e062aa91d5c7f924cef5d742ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Fri, 29 Apr 2022 16:36:23 +0200 Subject: [PATCH 12/12] misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drivers/misc/fs_loader.c: In function ‘mount_ubifs’: drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration] int ret = ubi_part(mtdpart, NULL); ^~~~~~~~ drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration] return cmd_ubifs_mount(ubivol); ^~~~~~~~~~~~~~~ drivers/misc/fs_loader.c: In function ‘umount_ubifs’: drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration] return cmd_ubifs_umount(); ^~~~~~~~~~~~~~~~ Signed-off-by: Pali Rohár --- drivers/misc/fs_loader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index 0139bd66ba7..5b4d03639c3 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -20,6 +20,10 @@ #include #include +#ifdef CONFIG_CMD_UBIFS +#include +#endif + DECLARE_GLOBAL_DATA_PTR; /**