diff --git a/Makefile b/Makefile index 1ce50d0..a504dae 100644 --- a/Makefile +++ b/Makefile @@ -307,7 +307,7 @@ 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 f12a0b9..b115c4a 100644 --- a/arch/arm/boards/a9m2440/a9m2410dev.c +++ b/arch/arm/boards/a9m2440/a9m2410dev.c @@ -28,6 +28,8 @@ #include #include +#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 2c25e3f..8f494ae 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 73f023b..b9b91f3 100644 --- a/arch/arm/cpu/interrupts.c +++ b/arch/arm/cpu/interrupts.c @@ -28,6 +28,14 @@ #include #include +/* 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 f6f0c9d..e8475d2 100644 --- a/arch/arm/cpu/interrupts_64.c +++ b/arch/arm/cpu/interrupts_64.c @@ -25,6 +25,16 @@ #include #include +/* 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 69d1b20..99ddd5a 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 +#include #include #include #include diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c index 1c8197a..c4c8c64 100644 --- a/arch/arm/cpu/psci.c +++ b/arch/arm/cpu/psci.c @@ -156,6 +156,10 @@ 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 @@ 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 6fad30a..633c9e8 100644 --- a/arch/arm/cpu/sm.c +++ b/arch/arm/cpu/sm.c @@ -94,7 +94,7 @@ #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 a79d64e..768fa9e 100644 --- a/arch/arm/cpu/start.c +++ b/arch/arm/cpu/start.c @@ -34,6 +34,8 @@ #include +#include "entry.h" + unsigned long arm_stack_top; static unsigned long arm_barebox_size; static void *barebox_boarddata; @@ -231,12 +233,16 @@ #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 be92bda..e527165 100644 --- a/arch/arm/cpu/uncompress.c +++ b/arch/arm/cpu/uncompress.c @@ -34,6 +34,8 @@ #include +#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 c0c749a..e065b47 100644 --- a/arch/arm/include/asm/barebox-arm.h +++ b/arch/arm/include/asm/barebox-arm.h @@ -85,6 +85,8 @@ 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 99833ac..417808b 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h @@ -56,5 +56,6 @@ 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 7fbd8d9..042e0ce 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h @@ -23,6 +23,8 @@ 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 b8352c1..4391188 100644 --- a/arch/arm/lib64/stacktrace.c +++ b/arch/arm/lib64/stacktrace.c @@ -11,6 +11,7 @@ #include #include +#include #define THREAD_SIZE 16384 @@ -45,7 +46,7 @@ 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 4fd5481..b76e379 100644 --- a/arch/arm/mach-imx/imx50.c +++ b/arch/arm/mach-imx/imx50.c @@ -86,7 +86,7 @@ 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 dc53794..be58da4 100644 --- a/arch/arm/mach-imx/include/mach/generic.h +++ b/arch/arm/mach-imx/include/mach/generic.h @@ -19,6 +19,7 @@ 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 f298a36..7574fe8 100644 --- a/arch/arm/mach-imx/nand.c +++ b/arch/arm/mach-imx/nand.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #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 5e3df10..4236bcb 100644 --- a/arch/arm/mach-imx/usb-imx6.c +++ b/arch/arm/mach-imx/usb-imx6.c @@ -20,6 +20,7 @@ #include #include #include +#include #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 1fd7222..29e13de 100644 --- a/arch/arm/mach-omap/am33xx_bbu_emmc.c +++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c @@ -18,6 +18,7 @@ #include #include #include +#include #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 6fc6e7e..4c1a28d 100644 --- a/arch/arm/mach-omap/am33xx_bbu_nand.c +++ b/arch/arm/mach-omap/am33xx_bbu_nand.c @@ -22,6 +22,7 @@ #include #include #include +#include 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 03477db..7d2ef1f 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 #include #include +#include /* * 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 ad735cb..e63e936 100644 --- a/arch/arm/mach-omap/am33xx_clock.c +++ b/arch/arm/mach-omap/am33xx_clock.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #define PRCM_MOD_EN 0x2 diff --git a/arch/arm/mach-samsung/clocks-s3c24xx.c b/arch/arm/mach-samsung/clocks-s3c24xx.c index 13e6867..34b38f3 100644 --- a/arch/arm/mach-samsung/clocks-s3c24xx.c +++ b/arch/arm/mach-samsung/clocks-s3c24xx.c @@ -109,15 +109,6 @@ } /** - * 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 @@ /** * 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 f9c6d91..52642ee 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 @@ * @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 3342e0e..6338dc1 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -12,7 +12,7 @@ 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 8842ba6..8c276a4 100644 --- a/common/imx-bbu-nand-fcb.c +++ b/common/imx-bbu-nand-fcb.c @@ -204,7 +204,7 @@ 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 @@ 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 abd714c..269d175 100644 --- a/common/state/state_variables.c +++ b/common/state/state_variables.c @@ -492,19 +492,6 @@ 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 4e72048..d445d1e 100644 --- a/drivers/aiodev/mc13xxx_adc.c +++ b/drivers/aiodev/mc13xxx_adc.c @@ -75,8 +75,9 @@ 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 be9ef92..a3fccb2 100644 --- a/drivers/bus/omap-gpmc.c +++ b/drivers/bus/omap-gpmc.c @@ -187,7 +187,7 @@ 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 f2e704c..8d5ed7e 100644 --- a/drivers/clk/imx/clk-gate2.c +++ b/drivers/clk/imx/clk-gate2.c @@ -87,7 +87,7 @@ .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 @@ 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 79f2510..72c2f36 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -67,7 +67,7 @@ /* * 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 64e8031..4dd28a7 100644 --- a/drivers/mtd/nand/nand_omap_bch_decoder.c +++ b/drivers/mtd/nand/nand_omap_bch_decoder.c @@ -15,6 +15,8 @@ #include +#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 0000000..74d24be --- /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 d0b1699..323a9c7 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -71,6 +71,8 @@ #include #include +#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 8bb2c9f..6de9851 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -1115,7 +1115,7 @@ 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 ce74a8b..c0f2db5 100644 --- a/drivers/net/e1000/eeprom.c +++ b/drivers/net/e1000/eeprom.c @@ -407,7 +407,7 @@ 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 @@ 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 3201eb9..11e0083 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -32,6 +32,7 @@ #include #include +#include #include @@ -46,14 +47,6 @@ 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 f630397..beea772 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -67,7 +67,7 @@ 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 @@ 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 @@ 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 @@ 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 55a2ed2..c84525e 100644 --- a/drivers/usb/musb/phy-am335x-control.c +++ b/drivers/usb/musb/phy-am335x-control.c @@ -4,10 +4,7 @@ #include #include -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 ec8c0f5..df31255 100644 --- a/drivers/usb/musb/phy-am335x.c +++ b/drivers/usb/musb/phy-am335x.c @@ -5,6 +5,7 @@ #include #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 99ad180..82ceeeb 100644 --- a/drivers/video/vpl.c +++ b/drivers/video/vpl.c @@ -36,7 +36,7 @@ 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 717e66c..81ae2c2 100644 --- a/fs/devfs.c +++ b/fs/devfs.c @@ -193,7 +193,7 @@ 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 2fe2f3f..fd1b645 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -37,14 +37,6 @@ #include "ubifs.h" #include -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 @@ 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 bbe382d..7545dd4 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -401,7 +401,7 @@ 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 0ec2f05..32ea46e 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -40,6 +40,10 @@ /* 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 fa89808..78a34db 100644 --- a/lib/gui/lodepng.c +++ b/lib/gui/lodepng.c @@ -74,34 +74,6 @@ 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 @@ /* ////////////////////////////////////////////////////////////////////////// */ -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 @@ 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 @@ 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 50d5303..7f636f0 100644 --- a/lib/gui/lodepng.h +++ b/lib/gui/lodepng.h @@ -856,6 +856,34 @@ #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