summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-12-07 08:12:40 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-07 08:12:40 +0100
commit05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25 (patch)
treea5131c0eb8e7e59c00e0c941b3830814cb23040b
parentb9dcb4ae01b034da77ba56b1886c8d04971f5cec (diff)
parent1ef8adb77b36153b996c09294310d1b662291ba5 (diff)
downloadbarebox-05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25.tar.gz
barebox-05bc268ec5c5bcf1eca52f2aaa9ebdcaf2edee25.tar.xz
Merge branch 'for-next/missing-prototypes'
-rw-r--r--Makefile2
-rw-r--r--arch/arm/boards/a9m2440/a9m2410dev.c2
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/ddr.h1
-rw-r--r--arch/arm/cpu/interrupts.c8
-rw-r--r--arch/arm/cpu/interrupts_64.c10
-rw-r--r--arch/arm/cpu/mmu_64.c1
-rw-r--r--arch/arm/cpu/psci.c7
-rw-r--r--arch/arm/cpu/sm.c2
-rw-r--r--arch/arm/cpu/start.c6
-rw-r--r--arch/arm/cpu/uncompress.c2
-rw-r--r--arch/arm/include/asm/barebox-arm.h2
-rw-r--r--arch/arm/include/asm/mmu.h1
-rw-r--r--arch/arm/include/asm/ptrace.h2
-rw-r--r--arch/arm/lib64/stacktrace.c3
-rw-r--r--arch/arm/mach-imx/imx50.c2
-rw-r--r--arch/arm/mach-imx/include/mach/generic.h1
-rw-r--r--arch/arm/mach-imx/nand.c1
-rw-r--r--arch/arm/mach-imx/usb-imx6.c2
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_emmc.c1
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_nand.c1
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_spi_mlo.c1
-rw-r--r--arch/arm/mach-omap/am33xx_clock.c1
-rw-r--r--arch/arm/mach-samsung/clocks-s3c24xx.c11
-rw-r--r--arch/arm/mach-samsung/include/mach/s3c24xx-nand.h2
-rw-r--r--arch/mips/Makefile2
-rw-r--r--common/imx-bbu-nand-fcb.c4
-rw-r--r--common/state/state_variables.c13
-rw-r--r--drivers/aiodev/mc13xxx_adc.c5
-rw-r--r--drivers/bus/omap-gpmc.c2
-rw-r--r--drivers/clk/imx/clk-gate2.c9
-rw-r--r--drivers/dma/apbh_dma.c2
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.c2
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.h6
-rw-r--r--drivers/mtd/nand/nand_omap_gpmc.c4
-rw-r--r--drivers/net/cpsw.c2
-rw-r--r--drivers/net/e1000/eeprom.c4
-rw-r--r--drivers/pinctrl/pinctrl-at91.c9
-rw-r--r--drivers/spi/omap3_spi.c8
-rw-r--r--drivers/usb/musb/phy-am335x-control.c5
-rw-r--r--drivers/usb/musb/phy-am335x.c1
-rw-r--r--drivers/video/vpl.c2
-rw-r--r--fs/devfs.c2
-rw-r--r--fs/ubifs/super.c10
-rw-r--r--fs/ubifs/ubifs.c2
-rw-r--r--include/linux/nvmem-consumer.h4
-rw-r--r--lib/gui/lodepng.c42
-rw-r--r--lib/gui/lodepng.h28
47 files changed, 123 insertions, 117 deletions
diff --git a/Makefile b/Makefile
index 1ce50d025e..a504dae471 100644
--- a/Makefile
+++ b/Makefile
@@ -307,7 +307,7 @@ CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffre
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
- -fno-strict-aliasing -fno-common -Os -pipe
+ -fno-strict-aliasing -fno-common -Os -pipe -Wmissing-prototypes
AFLAGS := -D__ASSEMBLY__
LDFLAGS_barebox := -Map barebox.map
diff --git a/arch/arm/boards/a9m2440/a9m2410dev.c b/arch/arm/boards/a9m2440/a9m2410dev.c
index f12a0b9652..b115c4a954 100644
--- a/arch/arm/boards/a9m2440/a9m2410dev.c
+++ b/arch/arm/boards/a9m2440/a9m2410dev.c
@@ -28,6 +28,8 @@
#include <mach/s3c-busctl.h>
#include <mach/s3c24xx-gpio.h>
+#include "baseboards.h"
+
/**
* Initialize the CPU to be able to work with the a9m2410dev evaluation board
*/
diff --git a/arch/arm/boards/nxp-imx8mq-evk/ddr.h b/arch/arm/boards/nxp-imx8mq-evk/ddr.h
index 2c25e3f98c..8f494ae7a2 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/ddr.h
+++ b/arch/arm/boards/nxp-imx8mq-evk/ddr.h
@@ -19,6 +19,7 @@
#define ddr_cfg_phy nxp_imx8mq_evk_ddr_cfg_phy
void nxp_imx8mq_evk_ddr_init(void);
+void nxp_imx8mq_evk_ddr_cfg_phy(void);
#define FW_1D_IMAGE imx_lpddr4_pmu_train_1d_imem_bin, \
imx_lpddr4_pmu_train_1d_dmem_bin
diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c
index 73f023bd71..b9b91f3153 100644
--- a/arch/arm/cpu/interrupts.c
+++ b/arch/arm/cpu/interrupts.c
@@ -28,6 +28,14 @@
#include <asm/unwind.h>
#include <init.h>
+/* Avoid missing prototype warning, called from assembly */
+void do_undefined_instruction (struct pt_regs *pt_regs);
+void do_software_interrupt (struct pt_regs *pt_regs);
+void do_prefetch_abort (struct pt_regs *pt_regs);
+void do_data_abort (struct pt_regs *pt_regs);
+void do_fiq (struct pt_regs *pt_regs);
+void do_irq (struct pt_regs *pt_regs);
+
/**
* Display current register set content
* @param[in] regs Guess what
diff --git a/arch/arm/cpu/interrupts_64.c b/arch/arm/cpu/interrupts_64.c
index f6f0c9d095..e8475d2e47 100644
--- a/arch/arm/cpu/interrupts_64.c
+++ b/arch/arm/cpu/interrupts_64.c
@@ -25,6 +25,16 @@
#include <asm/system.h>
#include <asm/esr.h>
+/* Avoid missing prototype warning, called from assembly */
+void do_bad_sync (struct pt_regs *pt_regs);
+void do_bad_irq (struct pt_regs *pt_regs);
+void do_bad_fiq (struct pt_regs *pt_regs);
+void do_bad_error (struct pt_regs *pt_regs);
+void do_fiq (struct pt_regs *pt_regs);
+void do_irq (struct pt_regs *pt_regs);
+void do_error (struct pt_regs *pt_regs);
+void do_sync(struct pt_regs *pt_regs, unsigned int esr, unsigned long far);
+
static const char *esr_class_str[] = {
[0 ... ESR_ELx_EC_MAX] = "UNRECOGNIZED EC",
[ESR_ELx_EC_UNKNOWN] = "Unknown/Uncategorized",
diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c
index 69d1b20718..99ddd5a441 100644
--- a/arch/arm/cpu/mmu_64.c
+++ b/arch/arm/cpu/mmu_64.c
@@ -19,6 +19,7 @@
#define pr_fmt(fmt) "mmu: " fmt
#include <common.h>
+#include <dma.h>
#include <dma-dir.h>
#include <init.h>
#include <mmu.h>
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 1c8197aa3f..c4c8c64cbe 100644
--- a/arch/arm/cpu/psci.c
+++ b/arch/arm/cpu/psci.c
@@ -156,6 +156,10 @@ static unsigned long psci_system_reset(void)
restart_machine();
}
+/* Avoid missing prototype warning, called from assembly */
+void psci_entry(u32 r0, u32 r1, u32 r2, u32 r3, u32 r4, u32 r5, u32 r6,
+ struct arm_smccc_res *res);
+
void psci_entry(u32 r0, u32 r1, u32 r2, u32 r3, u32 r4, u32 r5, u32 r6,
struct arm_smccc_res *res)
{
@@ -209,6 +213,9 @@ static int of_psci_fixup(struct device_node *root, void *unused)
return 0;
}
+/* Avoid missing prototype warning, called from assembly */
+int psci_cpu_entry_c(void);
+
int psci_cpu_entry_c(void)
{
void (*entry)(u32 context);
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c
index 6fad30adab..633c9e8c83 100644
--- a/arch/arm/cpu/sm.c
+++ b/arch/arm/cpu/sm.c
@@ -94,7 +94,7 @@ static unsigned long get_gicc_base_address(void)
#define GICD_IGROUPRn 0x0080
-int armv7_init_nonsec(void)
+static int armv7_init_nonsec(void)
{
void __iomem *gicd = IOMEM(get_gicd_base_address());
unsigned itlinesnr, i;
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index a79d64eaa6..768fa9e1b2 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -34,6 +34,8 @@
#include <debug_ll.h>
+#include "entry.h"
+
unsigned long arm_stack_top;
static unsigned long arm_barebox_size;
static void *barebox_boarddata;
@@ -231,12 +233,16 @@ __noreturn void barebox_non_pbl_start(unsigned long membase,
#ifndef CONFIG_PBL_IMAGE
+void start(void);
+
void NAKED __section(.text_entry) start(void)
{
barebox_arm_head();
}
#else
+
+void start(unsigned long membase, unsigned long memsize, void *boarddata);
/*
* First function in the uncompressed image. We get here from
* the pbl. The stack already has been set up by the pbl.
diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index be92bda4e8..e52716557b 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -34,6 +34,8 @@
#include <debug_ll.h>
+#include "entry.h"
+
unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr;
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index c0c749ae34..e065b479e3 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -85,6 +85,8 @@ static inline void boarddata_create(void *adr, u32 machine)
u32 barebox_arm_machine(void);
+unsigned long arm_mem_ramoops_get(void);
+
struct barebox_arm_boarddata_compressed_dtb {
#define BAREBOX_ARM_BOARDDATA_COMPRESSED_DTB_MAGIC 0x7b66bcbd
u32 magic;
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 99833ac5b4..417808bfcc 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -56,5 +56,6 @@ void __dma_inv_range(unsigned long, unsigned long);
void mmu_early_enable(unsigned long membase, unsigned long memsize,
unsigned long ttb);
+void mmu_early_disable(void);
#endif /* __ASM_MMU_H */
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
index 7fbd8d9b6f..042e0cef70 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -23,6 +23,8 @@ struct pt_regs {
unsigned long regs[31];
};
+void show_regs(struct pt_regs *);
+
#endif /* __ASSEMBLY__ */
#else /* CONFIG_CPU_64 */
diff --git a/arch/arm/lib64/stacktrace.c b/arch/arm/lib64/stacktrace.c
index b8352c1454..4391188446 100644
--- a/arch/arm/lib64/stacktrace.c
+++ b/arch/arm/lib64/stacktrace.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/stacktrace.h>
+#include <asm/unwind.h>
#define THREAD_SIZE 16384
@@ -45,7 +46,7 @@ int unwind_frame(struct stackframe *frame)
return 0;
}
-void dump_backtrace_entry(unsigned long where, unsigned long from)
+static void dump_backtrace_entry(unsigned long where, unsigned long from)
{
#ifdef CONFIG_KALLSYMS
printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
index 4fd5481670..b76e3794e3 100644
--- a/arch/arm/mach-imx/imx50.c
+++ b/arch/arm/mach-imx/imx50.c
@@ -86,7 +86,7 @@ int imx50_devices_init(void)
return 0;
}
-void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
+static void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
{
void __iomem *ccm = IOMEM(MX50_CCM_BASE_ADDR);
u32 r;
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
index dc537941a7..be58da4da2 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -19,6 +19,7 @@ void vf610_boot_save_loc(void);
void imx8_boot_save_loc(void);
void imx25_get_boot_source(enum bootsource *src, int *instance);
+void imx27_get_boot_source(enum bootsource *src, int *instance);
void imx35_get_boot_source(enum bootsource *src, int *instance);
void imx51_get_boot_source(enum bootsource *src, int *instance);
void imx53_get_boot_source(enum bootsource *src, int *instance);
diff --git a/arch/arm/mach-imx/nand.c b/arch/arm/mach-imx/nand.c
index f298a36046..7574fe80b2 100644
--- a/arch/arm/mach-imx/nand.c
+++ b/arch/arm/mach-imx/nand.c
@@ -17,6 +17,7 @@
#include <mach/imx25-regs.h>
#include <mach/imx27-regs.h>
#include <mach/imx35-regs.h>
+#include <mach/imx-nand.h>
#include <io.h>
#define RCSR_NFC_FMS (1 << 8)
diff --git a/arch/arm/mach-imx/usb-imx6.c b/arch/arm/mach-imx/usb-imx6.c
index 5e3df10e44..4236bcb772 100644
--- a/arch/arm/mach-imx/usb-imx6.c
+++ b/arch/arm/mach-imx/usb-imx6.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <io.h>
#include <mach/imx6-regs.h>
+#include <mach/usb.h>
#define SET 0x4
#define CLR 0x8
@@ -33,7 +34,6 @@
#define USB_UH1_USBCMD 0x340
#define USB_CMD_RUNSTOP (1 << 0)
-#define USB_CMD_RESET (1 << 1)
#define USB_OVER_CUR_DIS (1 << 7)
#define USBPHY_CTRL_SFTRST (1 << 31)
diff --git a/arch/arm/mach-omap/am33xx_bbu_emmc.c b/arch/arm/mach-omap/am33xx_bbu_emmc.c
index 1fd7222ddc..29e13de778 100644
--- a/arch/arm/mach-omap/am33xx_bbu_emmc.c
+++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c
@@ -18,6 +18,7 @@
#include <fs.h>
#include <fcntl.h>
#include <filetype.h>
+#include <mach/bbu.h>
#define PART_TABLE_SIZE 66
#define PART_TABLE_OFFSET 0x1BE
diff --git a/arch/arm/mach-omap/am33xx_bbu_nand.c b/arch/arm/mach-omap/am33xx_bbu_nand.c
index 6fc6e7e40f..4c1a28d37e 100644
--- a/arch/arm/mach-omap/am33xx_bbu_nand.c
+++ b/arch/arm/mach-omap/am33xx_bbu_nand.c
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <libfile.h>
#include <filetype.h>
+#include <mach/bbu.h>
struct nand_bbu_handler {
struct bbu_handler bbu_handler;
diff --git a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
index 03477dbaf1..7d2ef1f0f2 100644
--- a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
+++ b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
@@ -20,6 +20,7 @@
#include <fs.h>
#include <fcntl.h>
#include <linux/stat.h>
+#include <mach/bbu.h>
/*
* AM35xx, AM33xx chips use big endian MLO for SPI NOR flash
diff --git a/arch/arm/mach-omap/am33xx_clock.c b/arch/arm/mach-omap/am33xx_clock.c
index ad735cb216..e63e93601e 100644
--- a/arch/arm/mach-omap/am33xx_clock.c
+++ b/arch/arm/mach-omap/am33xx_clock.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <asm/io.h>
#include <mach/am33xx-clock.h>
+#include <mach/am33xx-generic.h>
#include <asm-generic/div64.h>
#define PRCM_MOD_EN 0x2
diff --git a/arch/arm/mach-samsung/clocks-s3c24xx.c b/arch/arm/mach-samsung/clocks-s3c24xx.c
index 13e68678e1..34b38f345c 100644
--- a/arch/arm/mach-samsung/clocks-s3c24xx.c
+++ b/arch/arm/mach-samsung/clocks-s3c24xx.c
@@ -109,15 +109,6 @@ uint32_t s3c_get_pclk(void)
}
/**
- * Calculate the UCLK frequency used by the USB host device
- * @return Current frequency in Hz
- */
-uint32_t s3c24_get_uclk(void)
-{
- return s3c_get_upllclk();
-}
-
-/**
* Return correct UART frequency based on the UCON register
*/
unsigned s3c_get_uart_clk(unsigned src)
@@ -137,7 +128,7 @@ unsigned s3c_get_uart_clk(unsigned src)
/**
* Show the user the current clock settings
*/
-int s3c24xx_dump_clocks(void)
+static int s3c24xx_dump_clocks(void)
{
printf("refclk: %7d kHz\n", S3C24XX_CLOCK_REFERENCE / 1000);
printf("mpll: %7d kHz\n", s3c_get_mpllclk() / 1000);
diff --git a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
index f9c6d91b5b..52642ee81f 100644
--- a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
+++ b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
@@ -52,4 +52,6 @@ struct s3c24x0_nand_platform_data {
* @brief Basic declaration to use the s3c24x0 NAND driver
*/
+void nand_boot(void);
+
#endif /* MACH_S3C24XX_NAND_H */
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 3342e0eafd..6338dc174d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -12,7 +12,7 @@ endif
CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+cflags-y += -Wall -Wstrict-prototypes \
-Wno-uninitialized -Wno-format -Wno-main
ifdef CONFIG_32BIT
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 8842ba6c58..8c276a43c0 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -204,7 +204,7 @@ static void encode_bch_ecc(void *buf, struct fcb_block *fcb, int eccbits)
free_bch(bch);
}
-struct fcb_block *read_fcb_bch(void *rawpage, int eccbits)
+static struct fcb_block *read_fcb_bch(void *rawpage, int eccbits)
{
int i, j, ret, errbit, m = 13;
int blocksize = 128;
@@ -308,7 +308,7 @@ static uint32_t calc_chksum(void *buf, size_t size)
return ~chksum;
}
-struct fcb_block *read_fcb_hamming_13_8(void *rawpage)
+static struct fcb_block *read_fcb_hamming_13_8(void *rawpage)
{
int i;
int bitflips = 0, bit_to_flip;
diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index abd714ceda..269d175874 100644
--- a/common/state/state_variables.c
+++ b/common/state/state_variables.c
@@ -492,19 +492,6 @@ struct variable_type *state_find_type_by_name(const char *name)
return NULL;
}
-struct variable_type *state_find_type(const enum state_variable_type type)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(types); i++) {
- if (type == types[i].type) {
- return &types[i];
- }
- }
-
- return NULL;
-}
-
struct state_variable *state_find_var(struct state *state, const char *name)
{
struct state_variable *sv;
diff --git a/drivers/aiodev/mc13xxx_adc.c b/drivers/aiodev/mc13xxx_adc.c
index 4e72048169..d445d1ec6e 100644
--- a/drivers/aiodev/mc13xxx_adc.c
+++ b/drivers/aiodev/mc13xxx_adc.c
@@ -75,8 +75,9 @@ to_mc13xx_adc_data(struct aiochannel *chan)
return container_of(chan->aiodev, struct mc13xx_adc_data, aiodev);
}
-int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
- unsigned int channel, unsigned int *sample)
+static int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
+ unsigned int channel,
+ unsigned int *sample)
{
int i;
int timeout = 100;
diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index be9ef92851..a3fccb2182 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -187,7 +187,7 @@ static unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
return (time_ns * 1000 + tick_ps - 1) / tick_ps;
}
-int gpmc_calc_divider(unsigned int sync_clk)
+static int gpmc_calc_divider(unsigned int sync_clk)
{
int div;
u32 l;
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index f2e704cdb2..8d5ed7e05c 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -87,7 +87,7 @@ static struct clk_ops clk_gate2_ops = {
.is_enabled = clk_gate2_is_enabled,
};
-struct clk *clk_gate2_alloc(const char *name, const char *parent,
+static struct clk *clk_gate2_alloc(const char *name, const char *parent,
void __iomem *reg, u8 shift, u8 cgr_val,
unsigned long flags)
{
@@ -106,13 +106,6 @@ struct clk *clk_gate2_alloc(const char *name, const char *parent,
return &g->clk;
}
-void clk_gate2_free(struct clk *clk)
-{
- struct clk_gate2 *g = to_clk_gate2(clk);
-
- free(g);
-}
-
struct clk *clk_gate2(const char *name, const char *parent, void __iomem *reg,
u8 shift, u8 cgr_val, unsigned long flags)
{
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 79f25109f9..72c2f364c5 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -67,7 +67,7 @@ static struct apbh_dma *apbh_dma;
/*
* Test is the DMA channel is valid channel
*/
-int mxs_dma_validate_chan(int channel)
+static int mxs_dma_validate_chan(int channel)
{
struct mxs_dma_chan *pchan;
diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.c b/drivers/mtd/nand/nand_omap_bch_decoder.c
index 64e8031785..4dd28a7704 100644
--- a/drivers/mtd/nand/nand_omap_bch_decoder.c
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.c
@@ -15,6 +15,8 @@
#include <common.h>
+#include "nand_omap_bch_decoder.h"
+
#define mm 13
#define kk_shorten 4096
#define nn 8191 /* Length of codeword, n = 2**mm - 1 */
diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.h b/drivers/mtd/nand/nand_omap_bch_decoder.h
new file mode 100644
index 0000000000..74d24be028
--- /dev/null
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.h
@@ -0,0 +1,6 @@
+#ifndef MTD_OMAP_GPMC_DECODE_BCH_H
+#define MTD_OMAP_GPMC_DECODE_BCH_H
+
+int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
+
+#endif /* MTD_OMAP_GPMC_DECODE_BCH_H */ \ No newline at end of file
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index d0b1699839..323a9c7532 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -71,6 +71,8 @@
#include <mach/gpmc.h>
#include <mach/gpmc_nand.h>
+#include "nand_omap_bch_decoder.h"
+
#define GPMC_ECC_CONFIG_ECCENABLE (1 << 0)
#define GPMC_ECC_CONFIG_ECCCS(x) (((x) & 0x7) << 1)
#define GPMC_ECC_CONFIG_ECCTOPSECTOR(x) (((x) & 0x7) << 4)
@@ -90,8 +92,6 @@
static const uint8_t bch8_vector[] = {0xf3, 0xdb, 0x14, 0x16, 0x8b, 0xd2,
0xbe, 0xcc, 0xac, 0x6b, 0xff, 0x99, 0x7b};
-int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
-
static const char *ecc_mode_strings[] = {
"software",
"hamming_hw_romcode",
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 8bb2c9f2a3..6de9851fda 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -1115,7 +1115,7 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
return 0;
}
-int cpsw_probe(struct device_d *dev)
+static int cpsw_probe(struct device_d *dev)
{
struct resource *iores;
struct cpsw_platform_data *data = (struct cpsw_platform_data *)dev->platform_data;
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index ce74a8b200..c0f2db552a 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -407,7 +407,7 @@ static void e1000_eeprom_uses_microwire(struct e1000_eeprom_info *eeprom,
eeprom->read = e1000_read_eeprom_microwire;
}
-size_t e1000_igb_get_flash_size(struct e1000_hw *hw)
+static size_t e1000_igb_get_flash_size(struct e1000_hw *hw)
{
struct device_node *node =
hw->pdev->dev.device_node;
@@ -1504,7 +1504,7 @@ static int e1000_mtd_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
return e1000_mtd_sr_rmw(mtd, SR_BPALL, 0x0);
}
-int e1000_register_invm(struct e1000_hw *hw)
+static int e1000_register_invm(struct e1000_hw *hw)
{
int ret;
u16 word;
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 3201eb9cb1..11e00833c5 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -32,6 +32,7 @@
#include <mach/at91_pio.h>
#include <mach/gpio.h>
+#include <mach/iomux.h>
#include <pinctrl.h>
@@ -46,14 +47,6 @@ struct at91_gpio_chip {
struct at91_pinctrl_mux_ops *ops; /* ops */
};
-enum at91_mux {
- AT91_MUX_GPIO = 0,
- AT91_MUX_PERIPH_A = 1,
- AT91_MUX_PERIPH_B = 2,
- AT91_MUX_PERIPH_C = 3,
- AT91_MUX_PERIPH_D = 4,
-};
-
#define MAX_GPIO_BANKS 5
#define to_at91_pinctrl(c) container_of(c, struct at91_pinctrl, pctl);
#define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip)
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index f63039718f..beea772aa9 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -67,7 +67,7 @@ static void spi_reset(struct spi_master *master)
writel(OMAP3_MCSPI_WAKEUPENABLE_WKEN, regs + OMAP3_MCSPI_WAKEUPENABLE);
}
-int spi_claim_bus(struct spi_device *spi)
+static int spi_claim_bus(struct spi_device *spi)
{
struct spi_master *master = spi->master;
struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master);
@@ -144,7 +144,7 @@ int spi_claim_bus(struct spi_device *spi)
return 0;
}
-int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
+static int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
unsigned long flags)
{
struct spi_master *master = spi->master;
@@ -198,7 +198,7 @@ int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
return 0;
}
-int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
+static int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
unsigned long flags)
{
struct spi_master *master = spi->master;
@@ -245,7 +245,7 @@ int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
return 0;
}
-int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags)
+static int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags)
{
struct spi_master *master = spi->master;
struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master);
diff --git a/drivers/usb/musb/phy-am335x-control.c b/drivers/usb/musb/phy-am335x-control.c
index 55a2ed27b7..c84525ec7e 100644
--- a/drivers/usb/musb/phy-am335x-control.c
+++ b/drivers/usb/musb/phy-am335x-control.c
@@ -4,10 +4,7 @@
#include <linux/err.h>
#include <linux/spinlock.h>
-struct phy_control {
- void (*phy_power)(struct phy_control *phy_ctrl, u32 id, bool on);
- void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
-};
+#include "am35x-phy-control.h"
struct am335x_control_usb {
struct device_d *dev;
diff --git a/drivers/usb/musb/phy-am335x.c b/drivers/usb/musb/phy-am335x.c
index ec8c0f538b..df31255d89 100644
--- a/drivers/usb/musb/phy-am335x.c
+++ b/drivers/usb/musb/phy-am335x.c
@@ -5,6 +5,7 @@
#include <linux/err.h>
#include "am35x-phy-control.h"
#include "musb_core.h"
+#include "phy-am335x.h"
struct am335x_usbphy {
void __iomem *base;
diff --git a/drivers/video/vpl.c b/drivers/video/vpl.c
index 99ad180eec..82ceeebada 100644
--- a/drivers/video/vpl.c
+++ b/drivers/video/vpl.c
@@ -36,7 +36,7 @@ int vpl_register(struct vpl *vpl)
return 0;
}
-struct vpl *of_find_vpl(struct device_node *node)
+static struct vpl *of_find_vpl(struct device_node *node)
{
struct vpl *vpl;
diff --git a/fs/devfs.c b/fs/devfs.c
index 717e66c5dc..81ae2c25a5 100644
--- a/fs/devfs.c
+++ b/fs/devfs.c
@@ -193,7 +193,7 @@ static struct inode *devfs_alloc_inode(struct super_block *sb)
return &node->inode;
}
-int devfs_iterate(struct file *file, struct dir_context *ctx)
+static int devfs_iterate(struct file *file, struct dir_context *ctx)
{
struct cdev *cdev;
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 2fe2f3f640..fd1b645f9f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -37,14 +37,6 @@
#include "ubifs.h"
#include <mtd/ubi-user.h>
-int ubifs_iput(struct inode *inode)
-{
- list_del_init(&inode->i_sb_list);
-
- free(inode);
- return 0;
-}
-
/* from include/linux/fs.h */
static inline void i_uid_write(struct inode *inode, uid_t uid)
{
@@ -56,7 +48,7 @@ static inline void i_gid_write(struct inode *inode, gid_t gid)
inode->i_gid = gid;
}
-void unlock_new_inode(struct inode *inode)
+static void unlock_new_inode(struct inode *inode)
{
return;
}
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index bbe382dab0..7545dd4c9b 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -401,7 +401,7 @@ static loff_t ubifs_lseek(struct device_d *dev, FILE *f, loff_t pos)
return pos;
}
-void ubifs_set_rootarg(struct ubifs_priv *priv, struct fs_device_d *fsdev)
+static void ubifs_set_rootarg(struct ubifs_priv *priv, struct fs_device_d *fsdev)
{
struct ubi_volume_info vi = {};
struct ubi_device_info di = {};
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 0ec2f05b97..32ea46e3bf 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -40,6 +40,10 @@ int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
/* direct nvmem device read/write interface */
struct nvmem_device *nvmem_device_get(struct device_d *dev, const char *name);
void nvmem_device_put(struct nvmem_device *nvmem);
+ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *info, void *buf);
+int nvmem_device_cell_write(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *info, void *buf);
#else
diff --git a/lib/gui/lodepng.c b/lib/gui/lodepng.c
index fa8980883b..78a34db473 100644
--- a/lib/gui/lodepng.c
+++ b/lib/gui/lodepng.c
@@ -74,34 +74,6 @@ static void myfree(void* ptr)
free(ptr);
}
-/*
-Declaration of the custom functions used if LODEPNG_COMPILE_ZLIB isn't defined
-or LODEPNG_CUSTOM_ZLIB_DECODER or LODEPNG_CUSTOM_ZLIB_ENCODER are enabled.
-
-In that case, you need to define these yourself (which you can do in one of your
-own source files) so that LodePNG can link to it.
-
-By default, this is not needed. If LODEPNG_COMPILE_ZLIB isn't defined, then only
-the two zlib related ones are needed.
-
-If needed, the functions must act as follows:
-*out must be NULL and *outsize must be 0 initially, and after the function is done,
-*out must point to the decompressed data, *outsize must be the size of it, and must
-be the size of the useful data in bytes, not the alloc size.
-*/
-unsigned lodepng_custom_zlib_decompress(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGDecompressSettings* settings);
-unsigned lodepng_custom_zlib_compress(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGCompressSettings* settings);
-unsigned lodepng_custom_inflate(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGDecompressSettings* settings);
-unsigned lodepng_custom_deflate(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGCompressSettings* settings);
-
/* ////////////////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////////////////// */
/* // Tools for C, and common code for PNG and Zlib. // */
@@ -348,7 +320,7 @@ static void string_set(char** out, const char* in)
/* ////////////////////////////////////////////////////////////////////////// */
-unsigned lodepng_read32bitInt(const unsigned char* buffer)
+static unsigned lodepng_read32bitInt(const unsigned char* buffer)
{
return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
}
@@ -2662,11 +2634,6 @@ size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* colo
return (w * h * lodepng_get_bpp(color) + 7) / 8;
}
-size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
-{
- return (w * h * lodepng_get_bpp_lct(colortype, bitdepth) + 7) / 8;
-}
-
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
static void LodePNGUnknownChunks_init(LodePNGInfo* info)
@@ -2900,13 +2867,6 @@ unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source)
return 0;
}
-void lodepng_info_swap(LodePNGInfo* a, LodePNGInfo* b)
-{
- LodePNGInfo temp = *a;
- *a = *b;
- *b = temp;
-}
-
/* ////////////////////////////////////////////////////////////////////////// */
/*index: bitgroup index, bits: bitgroup size(1, 2 or 4, in: bitgroup value, out: octet array to add bits to*/
diff --git a/lib/gui/lodepng.h b/lib/gui/lodepng.h
index 50d5303055..7f636f0a73 100644
--- a/lib/gui/lodepng.h
+++ b/lib/gui/lodepng.h
@@ -856,6 +856,34 @@ unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned ch
#endif /*LODEPNG_COMPILE_CPP*/
/*
+Declaration of the custom functions used if LODEPNG_COMPILE_ZLIB isn't defined
+or LODEPNG_CUSTOM_ZLIB_DECODER or LODEPNG_CUSTOM_ZLIB_ENCODER are enabled.
+
+In that case, you need to define these yourself (which you can do in one of your
+own source files) so that LodePNG can link to it.
+
+By default, this is not needed. If LODEPNG_COMPILE_ZLIB isn't defined, then only
+the two zlib related ones are needed.
+
+If needed, the functions must act as follows:
+*out must be NULL and *outsize must be 0 initially, and after the function is done,
+*out must point to the decompressed data, *outsize must be the size of it, and must
+be the size of the useful data in bytes, not the alloc size.
+*/
+unsigned lodepng_custom_zlib_decompress(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGDecompressSettings* settings);
+unsigned lodepng_custom_zlib_compress(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGCompressSettings* settings);
+unsigned lodepng_custom_inflate(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGDecompressSettings* settings);
+unsigned lodepng_custom_deflate(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGCompressSettings* settings);
+
+/*
TODO:
[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often
[.] check compatibility with vareous compilers - done but needs to be redone for every newer version