Clean-up MMC's W=1 build warnings
Subsystems (13)
cover Clean-up MMC's W=1 build warnings
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
After these patches are applied, the build system no longer complains about any W=0 nor W=1 level warnings in drivers/mmc.
Hurrah!
Lee Jones (15):
mmc: core: quirks: Mark fixups as __maybe_unused
mmc: core: sdio_io: Provide description for sdio_set_host_pm_flags()'s
'flag' arg
mmc: core: regulator: Add missing documetation for 'mmc' and 'ios'
mmc: host: sdhci-s3c: Provide documentation for missing struct
properties
mmc: host: mtk-sd: Demote msdc_recheck_sdio_irq() function header
mmc: host: atmel-mci: Provide 2 new and correct 1 existing property
description
mmc: core: queue: Correct misspelling of 'mq' in mmc_init_request()'s
docs
mmc: host: dw_mmc-exynos: Add kerneldoc descriptions of for 'dev' args
mmc: host: rtsx_pci_sdmmc: Remove set but unused variable 'err'
mmc: host: rtsx_usb_sdmmc: Remove set but unused variable 'err'
mmc: host: sdhci-of-arasan: Correct formatting and provide missing
function arg(s)
mmc: host: sdhci-msm: Staticify local function
sdhci_msm_dump_vendor_regs()
mmc: host: sdhci-msm: Demote faux kerneldoc header down to basic
comment block
mmc: host: cqhci: Demote faux kerneldoc header down to basic comment
block
mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not
be used
drivers/mmc/core/queue.c | 2 +- drivers/mmc/core/quirks.h | 6 +++--- drivers/mmc/core/regulator.c | 2 ++ drivers/mmc/core/sdio_io.c | 1 + drivers/mmc/host/atmel-mci.c | 4 +++- drivers/mmc/host/cqhci.c | 2 +- drivers/mmc/host/dw_mmc-exynos.c | 2 ++ drivers/mmc/host/mtk-sd.c | 3 +-- drivers/mmc/host/rtsx_pci_sdmmc.c | 4 ++-- drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ++--- drivers/mmc/host/sdhci-iproc.c | 2 +- drivers/mmc/host/sdhci-msm.c | 4 ++-- drivers/mmc/host/sdhci-of-arasan.c | 3 ++- drivers/mmc/host/sdhci-s3c.c | 4 ++++ 14 files changed, 27 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/15 mmc: core: quirks: Mark fixups as __maybe_unused
Not all source files which include quirks.h make use of the all of the available fixup information. When this happens the compiler complains that some constant variables are defined by never used. We can fix this by telling the compiler that this intentional by simply marking them as __maybe_unused.
Fixes the following W=1 kernel build warnings:
In file included from drivers/mmc/core/sdio.c:22:
drivers/mmc/core/quirks.h:105:31: warning: ‘mmc_ext_csd_fixups’ defined but not used [-Wunused-const-variable=] 105 | static const struct mmc_fixup mmc_ext_csd_fixups[] = {
| ^~~~~~~~~~~~~~~~~~
drivers/mmc/core/quirks.h:17:31: warning: ‘mmc_blk_fixups’ defined but not used [-Wunused-const-variable=] 17 | static const struct mmc_fixup mmc_blk_fixups[] = {
| ^~~~~~~~~~~~~~
In file included from drivers/mmc/core/mmc.c:25:
drivers/mmc/core/quirks.h:123:31: warning: ‘sdio_fixup_methods’ defined but not used [-Wunused-const-variable=] 123 | static const struct mmc_fixup sdio_fixup_methods[] = {
| ^~~~~~~~~~~~~~~~~~
drivers/mmc/core/quirks.h:17:31: warning: ‘mmc_blk_fixups’ defined but not used [-Wunused-const-variable=] 17 | static const struct mmc_fixup mmc_blk_fixups[] = {
| ^~~~~~~~~~~~~~
--- drivers/mmc/core/quirks.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/core/quirks.h +3 -3
@@ -14,7 +14,7 @@#include "card.h" -static const struct mmc_fixup mmc_blk_fixups[] = { +static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = { #define INAND_CMD38_ARG_EXT_CSD 113 #define INAND_CMD38_ARG_ERASE 0x00 #define INAND_CMD38_ARG_TRIM 0x01
@@ -102,7 +102,7 @@ static const struct mmc_fixup mmc_blk_fixups[] = {END_FIXUP }; -static const struct mmc_fixup mmc_ext_csd_fixups[] = { +static const struct mmc_fixup __maybe_unused mmc_ext_csd_fixups[] = {/* * Certain Hynix eMMC 4.41 cards might get broken when HPI feature * is used so disable the HPI feature for such buggy cards.
@@ -120,7 +120,7 @@ static const struct mmc_fixup mmc_ext_csd_fixups[] = { }; -static const struct mmc_fixup sdio_fixup_methods[] = { +static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = {SDIO_FIXUP (SDIO_VENDOR_ID_TI_WL1251 ,SDIO_DEVICE_ID_TI_WL1251 , add_quirk,MMC_QUIRK_NONSTD_FUNC_IF ),
Signature · 1 line
2.25.1
PATCH 2/15 mmc: core: sdio_io: Provide description for sdio_set_host_pm_flags()'s 'flag' arg
In reply to Lee JonesAdd missing kerneldoc entry for sdio_set_host_pm_flags()'s 'flag' function argument.
Fixes the following W=1 kernel build warning:
kernel/drivers/mmc/core/sdio_io.c:722: warning: Function parameter or member 'flags' not described in 'sdio_set_host_pm_flags'
--- drivers/mmc/core/sdio_io.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/core/sdio_io.c +1 -0
@@ -709,6 +709,7 @@ EXPORT_SYMBOL_GPL(sdio_get_host_pm_caps);/** * sdio_set_host_pm_flags - set wanted host power management capabilities * @func: SDIO function attached to host +* @flags: Power Management flags to set * * Set a capability bitmask corresponding to wanted host controller * power management features for the upcoming suspend state.
Signature · 1 line
2.25.1
PATCH 3/15 mmc: core: regulator: Add missing documetation for 'mmc' and 'ios'
In reply to Lee JonesRemainder of the kerneldoc descriptions look present and correct.
Fixes the following W=1 kernel build warnings:
drivers/mmc/core/regulator.c:178: warning: Function parameter or member 'mmc' not described in 'mmc_regulator_set_vqmmc' drivers/mmc/core/regulator.c:178: warning: Function parameter or member 'ios' not described in 'mmc_regulator_set_vqmmc'
--- drivers/mmc/core/regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mmc/core/regulator.c +2 -0
@@ -159,6 +159,8 @@ static int mmc_regulator_set_voltage_if_supported(struct regulator *regulator,/** * mmc_regulator_set_vqmmc - Set VQMMC as per the ios +* @mmc: the host to regulate +* @ios: io bus settings * * For 3.3V signaling, we try to match VQMMC to VMMC as closely as possible. * That will match the behavior of old boards where VQMMC and VMMC were supplied
Signature · 1 line
2.25.1
PATCH 4/15 mmc: host: sdhci-s3c: Provide documentation for missing struct properties
In reply to Lee JonesDescribe properties; ext_cd_irq, clk_rates and no_divider (x2).
Squashes the following W=1 kernel build warnings:
drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'ext_cd_irq' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'clk_rates' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:139: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c_drv_data'
--- drivers/mmc/host/sdhci-s3c.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/sdhci-s3c.c +4 -0
@@ -107,8 +107,11 @@* @ioarea: The resource created when we claimed the IO area. * @pdata: The platform data for this controller. * @cur_clk: The index of the current bus clock. +* @ext_cd_irq: External card detect interrupt. * @clk_io: The clock for the internal bus interface. +* @clk_rates: Clock frequencies. * @clk_bus: The clocks that are available for the SD/MMC bus clock. +* @no_divider: No or non-standard internal clock divider. */ struct sdhci_s3c {struct sdhci_host *host;
@@ -128,6 +131,7 @@ struct sdhci_s3c {/** * struct sdhci_s3c_driver_data - S3C SDHCI platform specific driver data * @sdhci_quirks: sdhci host specific quirks. +* @no_divider: no or non-standard internal clock divider. * * Specifies platform specific configuration of sdhci controller. * Note: A structure for driver specific platform data is used for future
Signature · 1 line
2.25.1
Re: [PATCH 04/15] mmc: host: sdhci-s3c: Provide documentation for missing struct properties
Quoted 9 lines · Lee Jones
Describe properties;
ext_cd_irq,clk_ratesandno_divider(x2).Squashes the following W=1 kernel build warnings:
drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'ext_cd_irq' not described in 'sdhci_s3c'drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'clk_rates' not described in 'sdhci_s3c'drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c'drivers/mmc/host/sdhci-s3c.c:139: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c_drv_data'
Quoted 4 lines
Cc Adrian Hunter <[email protected]>Cc Ben Dooks <[email protected]>Cc Jaehoon Chung <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 29 lines
--- drivers/mmc/host/sdhci-s3c.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/sdhci-s3c.c +4
-0@@ -107,8 +107,11 @@* @ioarea: The resource created when we claimed the IO area. * @pdata: The platform data for this controller. * @cur_clk: The index of the current bus clock. +* @ext_cd_irq: External card detect interrupt. * @clk_io: The clock for the internal bus interface. +* @clk_rates: Clock frequencies. * @clk_bus: The clocks that are available for the SD/MMC bus clock. +* @no_divider: No or non-standard internal clock divider. */ struct sdhci_s3c {struct sdhci_host *host;@@ -128,6 +131,7 @@ struct sdhci_s3c {/** * struct sdhci_s3c_driver_data - S3C SDHCI platform specific driver data * @sdhci_quirks: sdhci host specific quirks. +* @no_divider: no or non-standard internal clock divider. * * Specifies platform specific configuration of sdhci controller. * Note: A structure for driver specific platform data is used for future
PATCH 5/15 mmc: host: mtk-sd: Demote msdc_recheck_sdio_irq() function header
In reply to Lee JonesNo other function in the file is documented using kerneldoc and no effort to document the function arguments have been made. It's a bit of an oddity to say the least. Let's downgrade it from kerneldoc to a standard comment block instead.
Fixes the following W=1 kernel build warning:
drivers/mmc/host/mtk-sd.c:1030: warning: Function parameter or member 'host' not described in 'msdc_recheck_sdio_irq'
--- drivers/mmc/host/mtk-sd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/host/mtk-sd.c +1 -2
@@ -1018,13 +1018,12 @@ static int msdc_auto_cmd_done(struct msdc_host *host, int events,return cmd->error; } -/** +/* * msdc_recheck_sdio_irq - recheck whether the SDIO irq is lost * * Host controller may lost interrupt in some special case. * Add SDIO irq recheck mechanism to make sure all interrupts * can be processed immediately -* */ static void msdc_recheck_sdio_irq (struct msdc_host *host) {
Signature · 7 lines
2.25.1 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [PATCH 05/15] mmc: host: mtk-sd: Demote msdc_recheck_sdio_irq() function header
Quoted 5 lines · Lee Jones
No other function in the file is documented using kerneldoc and no effort to document the function arguments have been made. It's a bit of an oddity to say the least. Let's downgrade it from kerneldoc to a standard comment block instead.
Quoted 8 lines
Fixes the following W=1 kernel build warning:
drivers/mmc/host/mtk-sd.c:1030: warning: Function parameter or member 'host' not described in 'msdc_recheck_sdio_irq'Cc Chaotian Jing <[email protected]>Cc Matthias Brugger <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 24 lines
--- drivers/mmc/host/mtk-sd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mmc/host/mtk-sd.c +1
-2@@ -1018,13 +1018,12 @@ static int msdc_auto_cmd_done(struct msdc_host *host, int events,return cmd->error; } -/** +/* * msdc_recheck_sdio_irq - recheck whether the SDIO irq is lost * * Host controller may lost interrupt in some special case. * Add SDIO irq recheck mechanism to make sure all interrupts * can be processed immediately -* */ static void msdc_recheck_sdio_irq (struct msdc_host *host) {
PATCH 6/15 mmc: host: atmel-mci: Provide 2 new and correct 1 existing property description
In reply to Lee Jones'sg_len' and 'dma_conf' are missing correct kerneldoc documentation and 'buf_phys_addr' was misspelled. Correcting these issues fixes the following W=1 kernel build issues:
mmc/host/atmel-mci.c:352: warning: Function parameter or member 'sg_len' not described in 'atmel_mci' mmc/host/atmel-mci.c:352: warning: Function parameter or member 'buf_phys_addr' not described in 'atmel_mci' mmc/host/atmel-mci.c:352: warning: Function parameter or member 'dma_conf' not described in 'atmel_mci'
--- drivers/mmc/host/atmel-mci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/atmel-mci.c +3 -1
@@ -225,12 +225,13 @@ struct atmel_mci_dma {* @lock: Spinlock protecting the queue and associated data. * @regs: Pointer to MMIO registers. * @sg: Scatterlist entry currently being processed by PIO or PDC code. +* @sg_len: Size of the scatterlist * @pio_offset: Offset into the current scatterlist entry. * @buffer: Buffer used if we don't have the r/w proof capability. We * don't have the time to switch pdc buffers so we have to use only * one buffer for the full transaction. * @buf_size: size of the buffer. -* @phys_buf_addr: buffer address needed for pdc. +* @buf_phys_addr: buffer address needed for pdc. * @cur_slot: The slot which is currently using the controller. * @mrq: The request currently being processed on @cur_slot, * or NULL if the controller is idle.
@@ -240,6 +241,7 @@ struct atmel_mci_dma {* @data_size: just data->blocks * data->blksz. * @dma: DMA client state. * @data_chan: DMA channel being used for the current data transfer. +* @dma_conf: Configuration for the DMA slave * @cmd_status: Snapshot of SR taken upon completion of the current * command. Only valid when EVENT_CMD_COMPLETE is pending. * @data_status: Snapshot of SR taken upon completion of the current
Signature · 1 line
2.25.1
PATCH 7/15 mmc: core: queue: Correct misspelling of 'mq' in mmc_init_request()'s docs
In reply to Lee JonesCorrecting this misspelling squashes the following W=1 build warning(s):
mmc/core/queue.c:212: warning: Function parameter or member 'mq' not described in '__mmc_init_request' mmc/core/queue.c:212: warning: Excess function parameter 'q' description in '__mmc_init_request'
--- drivers/mmc/core/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/queue.c +1 -1
@@ -203,7 +203,7 @@ static unsigned int mmc_get_max_segments(struct mmc_host *host)/** * mmc_init_request() - initialize the MMC-specific per-request data -* @q: the request queue +* @mq: the request queue * @req: the request * @gfp: memory allocation policy */
Signature · 1 line
2.25.1
PATCH 8/15 mmc: host: dw_mmc-exynos: Add kerneldoc descriptions of for 'dev' args
In reply to Lee JonesProvide missing documentation for dw_mci_exynos_suspend_noirq() and dw_mci_exynos_resume_noirq() function headers.
Fixes the following W=1 kernel build warnings:
drivers/mmc/host/dw_mmc-exynos.c:184: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_suspend_noirq' drivers/mmc/host/dw_mmc-exynos.c:200: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_resume_noirq'
--- drivers/mmc/host/dw_mmc-exynos.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc-exynos.c +2 -0
@@ -176,6 +176,7 @@ static int dw_mci_exynos_runtime_resume(struct device *dev)#ifdef CONFIG_PM_SLEEP /** * dw_mci_exynos_suspend_noirq - Exynos-specific suspend code +* @dev: Device to suspend (this device) * * This ensures that device will be in runtime active state in * dw_mci_exynos_resume_noirq after calling pm_runtime_force_resume()
@@ -188,6 +189,7 @@ static int dw_mci_exynos_suspend_noirq(struct device *dev)/** * dw_mci_exynos_resume_noirq - Exynos-specific resume code +* @dev: Device to resume (this device) * * On exynos5420 there is a silicon errata that will sometimes leave the * WAKEUP_INT bit in the CLKSEL register asserted. This bit is 1 to indicate
Signature · 1 line
2.25.1
Re: [PATCH 08/15] mmc: host: dw_mmc-exynos: Add kerneldoc descriptions of for 'dev' args
Quoted 8 lines · Lee Jones
Provide missing documentation for
dw_mci_exynos_suspend_noirq()anddw_mci_exynos_resume_noirq()function headers.Fixes the following W=1 kernel build warnings:
drivers/mmc/host/dw_mmc-exynos.c:184: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_suspend_noirq'drivers/mmc/host/dw_mmc-exynos.c:200: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_resume_noirq'
Quoted 6 lines
Cc Jaehoon Chung <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Thomas Abraham <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 25 lines
--- drivers/mmc/host/dw_mmc-exynos.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mmc/host/dw_mmc-exynos.c +2
-0@@ -176,6 +176,7 @@ static int dw_mci_exynos_runtime_resume(struct device *dev)#ifdef CONFIG_PM_SLEEP /** * dw_mci_exynos_suspend_noirq - Exynos-specific suspend code +* @dev: Device to suspend (this device) * * This ensures that device will be in runtime active state in * dw_mci_exynos_resume_noirq after calling pm_runtime_force_resume() @@ -188,6 +189,7 @@ static int dw_mci_exynos_suspend_noirq(struct device *dev)/** * dw_mci_exynos_resume_noirq - Exynos-specific resume code +* @dev: Device to resume (this device) * * On exynos5420 there is a silicon errata that will sometimes leave the * WAKEUP_INT bit in the CLKSEL register asserted. This bit is 1 to indicate
PATCH 9/15 mmc: host: rtsx_pci_sdmmc: Remove set but unused variable 'err'
In reply to Lee JonesSeeing as sd_wait_data_idle() returns void and only a very specific read value is checked, there doesn't seem to be a good reason to check the return value of rtsx_pci_read_register(). So remove the assignment and definition of 'err'.
Squashes the following W=1 kernel build warning:
drivers/mmc/host/rtsx_pci_sdmmc.c: In function ‘sd_wait_data_idle’:
drivers/mmc/host/rtsx_pci_sdmmc.c:678:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 678 | int err, i;
| ^~~
--- drivers/mmc/host/rtsx_pci_sdmmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/rtsx_pci_sdmmc.c +2 -2
@@ -675,11 +675,11 @@ static u8 sd_search_final_phase(struct realtek_pci_sdmmc *host, u32 phase_map)static void sd_wait_data_idle (struct realtek_pci_sdmmc *host) { -int err, i; +int i;u8 val =0 ;for (i =0 ; i <100 ; i++) { - err =rtsx_pci_read_register (host->pcr,SD_DATA_STATE , &val); +rtsx_pci_read_register (host->pcr,SD_DATA_STATE , &val);if (val &SD_DATA_IDLE )return ;
Signature · 1 line
2.25.1
PATCH 10/15 mmc: host: rtsx_usb_sdmmc: Remove set but unused variable 'err'
In reply to Lee JonesSeeing as sd_wait_data_idle() returns void and only a very specific read value is checked, there doesn't seem to be a good reason to check the return value of rtsx_pci_read_register(). So remove the assignment and definition of 'err'.
Squashes the following W=1 kernel build warning:
drivers/mmc/host/rtsx_usb_sdmmc.c: In function ‘sd_wait_data_idle’:
drivers/mmc/host/rtsx_usb_sdmmc.c:657:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 657 | int err, i;
| ^~~
--- drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/rtsx_usb_sdmmc.c +2 -3
@@ -654,12 +654,11 @@ static u8 sd_search_final_phase(struct rtsx_usb_sdmmc *host, u32 phase_map)static void sd_wait_data_idle (struct rtsx_usb_sdmmc *host) { -int err, i; +int i;u8 val =0 ;for (i =0 ; i <100 ; i++) { - err =rtsx_usb_ep0_read_register (host->ucr, -SD_DATA_STATE , &val); +rtsx_usb_ep0_read_register (host->ucr,SD_DATA_STATE , &val);if (val &SD_DATA_IDLE )return ;
Signature · 1 line
2.25.1
PATCH 11/15 mmc: host: sdhci-of-arasan: Correct formatting and provide missing function arg(s)
In reply to Lee JonesKerneldoc expects arg descriptions to be in the format '@.*: '. If either the '@' or the ':' is omitted then kerneldoc complains that the description is missing. Add the missing ':' here and provide a new description for 'value'.
Fixes the following kernel build W=1 warnings:
drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'host' not described in 'sdhci_arasan_update_support64b' drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'value' not described in 'sdhci_arasan_update_support64b' drivers/mmc/host/sdhci-msm.c:1887:6: warning: no previous prototype for ‘sdhci_msm_dump_vendor_regs’ [-Wmissing-prototypes]
--- drivers/mmc/host/sdhci-of-arasan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-arasan.c +2 -1
@@ -1388,7 +1388,8 @@ static void sdhci_arasan_unregister_sdclk(struct device *dev)* - For Keem Bay, it is required to clear this bit. Its default value is 1'b1. * Keem Bay does not support 64-bit access. * -* @host The sdhci_host +* @host: The sdhci_host +* @value: The value to write */ static void sdhci_arasan_update_support64b (struct sdhci_host *host,u32 value) {
Signature · 1 line
2.25.1
Re: [PATCH 11/15] mmc: host: sdhci-of-arasan: Correct formatting and provide missing function arg(s)
Quoted 27 lines · Lee Jones
Kerneldoc expects arg descriptions to be in the format '@.*: '. If either the '@' or the ':' is omitted then kerneldoc complains that the description is missing. Add the missing ':' here and provide a new description for 'value'.
Fixes the following kernel build W=1 warnings:
drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'host' not described in 'sdhci_arasan_update_support64b'drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'value' not described in 'sdhci_arasan_update_support64b'drivers/mmc/host/sdhci-msm.c:1887:6: warning: no previous prototype for ‘sdhci_msm_dump_vendor_regs’ [-Wmissing-prototypes]Cc Adrian Hunter <[email protected]>Cc Michal Simek <[email protected]>Cc Xiaobo Xie <[email protected]>Cc Anton Vorontsov <[email protected]>Cc Soeren Brinkmann <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/sdhci-of-arasan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/host/sdhci-of-arasan.c +0
-0
drivers/mmc/host/sdhci-of-arasan.c static void sdhci_arasan_unregister_sdclk(struct device *dev) · line 1395
Quoted 9 lines
drivers/mmc/host/sdhci-of-arasan.c +2
-1@@ -1388,7 +1388,8 @@ static void sdhci_arasan_unregister_sdclk(struct device *dev)* - For Keem Bay, it is required to clear this bit. Its default value is 1'b1. * Keem Bay does not support 64-bit access. * -* @host The sdhci_host +* @host: The sdhci_host +* @value: The value to write */ static void sdhci_arasan_update_support64b (struct sdhci_host *host,u32 value) {
Thanks,
Michal
PATCH 12/15 mmc: host: sdhci-msm: Staticify local function sdhci_msm_dump_vendor_regs()
In reply to Lee Jonessdhci_msm_dump_vendor_regs() is only used via the .dump_vendor_regs() call-back. It is never exported nor used externally, so it can be static.
Squashes the following W=1 kernel build warning:
drivers/mmc/host/sdhci-msm.c:1887:6: warning: no previous prototype for ‘sdhci_msm_dump_vendor_regs’ [-Wmissing-prototypes] 1887 | void sdhci_msm_dump_vendor_regs(struct sdhci_host *host)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
--- drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-msm.c +1 -1
@@ -1884,7 +1884,7 @@ static void sdhci_msm_reset(struct sdhci_host *host, u8 mask) #define SDHCI_MSM_DUMP(f, x...) \ pr_err("%s: " DRIVER_NAME ": " f, mmc_hostname(host->mmc), ## x) -void sdhci_msm_dump_vendor_regs (struct sdhci_host *host) +static void sdhci_msm_dump_vendor_regs (struct sdhci_host *host) {struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host);struct sdhci_msm_host *msm_host =sdhci_pltfm_priv (pltfm_host);
Signature · 1 line
2.25.1
PATCH 13/15 mmc: host: sdhci-msm: Demote faux kerneldoc header down to basic comment block
In reply to Lee Jones__sdhci_msm_set_clock()'s function header is the only one in kerneldoc format. Which seems odd as it's not part of an external API and isn't referenced anywhere else. Seeing as there has also been no attempt to describe the expected function arguments either, we're going to assume that this is not actually a bona fide kerneldoc use-case.
Fixes the following W=1 kernel build warnings:
drivers/mmc/host/sdhci-msm.c:1595: warning: Function parameter or member 'host' not described in '__sdhci_msm_set_clock' drivers/mmc/host/sdhci-msm.c:1595: warning: Function parameter or member 'clock' not described in '__sdhci_msm_set_clock'
--- drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-msm.c +1 -1
@@ -1583,7 +1583,7 @@ static unsigned int sdhci_msm_get_min_clock(struct sdhci_host *host)return SDHCI_MSM_MIN_CLOCK ; } -/** +/* * __sdhci_msm_set_clock - sdhci_msm clock control. * * Description:
Signature · 1 line
2.25.1
PATCH 14/15 mmc: host: cqhci: Demote faux kerneldoc header down to basic comment block
In reply to Lee Jonescqhci_host_alloc_tdl()'s function header is the only one in kerneldoc format. Which seems odd as it's not part of an external API and isn't referenced anywhere else. Seeing as there has also been no attempt to describe the expected function arguments either, we're going to assume that this is not actually a bona fide kerneldoc use-case.
Fixes the following W=1 kernel build warning:
drivers/mmc/host/cqhci.c:163: warning: Function parameter or member 'cq_host' not described in 'cqhci_host_alloc_tdl'
--- drivers/mmc/host/cqhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/cqhci.c +1 -1
@@ -144,7 +144,7 @@ static void cqhci_dumpregs(struct cqhci_host *cq_host)CQHCI_DUMP (": ===========================================\n" ); } -/** +/* * The allocated descriptor table for task, link & transfer descritors * looks like: * |----------|
Signature · 1 line
2.25.1
Re: [PATCH 14/15] mmc: host: cqhci: Demote faux kerneldoc header down to basic comment block
Quoted 9 lines · Lee Jones
cqhci_host_alloc_tdl()'s function header is the only one in kerneldoc format. Which seems odd as it's not part of an external API and isn't referenced anywhere else. Seeing as there has also been no attempt to describe the expected function arguments either, we're going to assume that this is not actually a bona fide kerneldoc use-case.
Fixes the following W=1 kernel build warning:
Quoted 7 lines
drivers/mmc/host/cqhci.c:163: warning: Function parameter or member 'cq_host' not described in 'cqhci_host_alloc_tdl'Cc Adrian Hunter <[email protected]>Cc Ritesh Harjani <[email protected]>Cc Asutosh Das <[email protected]>Cc Venkat Gopalakrishnan <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 18 lines
--- drivers/mmc/host/cqhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/cqhci.c +1
-1@@ -144,7 +144,7 @@ static void cqhci_dumpregs(struct cqhci_host *cq_host)CQHCI_DUMP (": ===========================================\n" ); } -/** +/* * The allocated descriptor table for task, link & transfer descritors * looks like: * |----------|
PATCH 15/15 mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not be used
In reply to Lee Jones... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]
--- drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-iproc.c +1 -1
@@ -294,7 +294,7 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match); -static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { +static const struct acpi_device_id __maybe_unused sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ }
Signature · 1 line
2.25.1
Re: [PATCH 15/15] mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not be used
Hi Lee,
Quoted 20 lines · Lee Jones
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]Cc Adrian Hunter <[email protected]>Cc Ray Jui <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/sdhci-iproc.c +0
-0
drivers/mmc/host/sdhci-iproc.c static const struct of_device_id sdhci_iproc_of_match[] = { · line 296
Quoted 3 lines
drivers/mmc/host/sdhci-iproc.c +0
-0@@ -294,7 +294,7 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match);
Would it better to compile this in if CONFIG_ACPI is defined instead? #if CONFIG_ACPI
Quoted 5 lines
drivers/mmc/host/sdhci-iproc.c +1
-1-static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { +static const struct acpi_device_id __maybe_unused sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ }
Re: [PATCH 15/15] mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not be used
Quoted 18 lines · Scott Branden
Hi Lee,
Quoted 15 lines · Lee Jones
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]Cc Adrian Hunter <[email protected]>Cc Ray Jui <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 10 lines
drivers/mmc/host/sdhci-iproc.c static const struct of_device_id sdhci_iproc_of_match[] = { · line 295
Quoted 7 lines
drivers/mmc/host/sdhci-iproc.c +0
-0@@ -294,7 +294,7 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match);Would it better to compile this in if
CONFIG_ACPIis defined instead? #ifCONFIG_ACPI
Literally can't win.
Damned if we do, damned if we don't. ;)
Quoted 6 lines
Quoted 5 lines
drivers/mmc/host/sdhci-iproc.c +1
-1-static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { +static const struct acpi_device_id __maybe_unused sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ }
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 15/15] mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not be used
Quoted 29 lines · Lee Jones
Quoted 18 lines · Scott Branden
Hi Lee,
Quoted 15 lines · Lee Jones
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]Cc Adrian Hunter <[email protected]>Cc Ray Jui <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 9 lines
drivers/mmc/host/sdhci-iproc.c static const struct of_device_id sdhci_iproc_of_match[] = { · line 295
Quoted 7 lines
drivers/mmc/host/sdhci-iproc.c +0
-0@@ -294,7 +294,7 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match);Would it better to compile this in if
CONFIG_ACPIis defined instead? #ifCONFIG_ACPI
Quoted 5 lines
Literally can't win.
Damned if we do, damned if we don't. ;)
This is very minor in this one change here, but it's just more bloat of things that really should be compiled out if they're not used. I don't understand why __maybe_unused would be preferred approach - unless it is not linked in when it is not used?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mmc/host/sdhci-iproc.c +1
-1-static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { +static const struct acpi_device_id __maybe_unused sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ }
PATCH v2 15/15 mmc: host: sdhci-iproc: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
In reply to Lee JonesSince ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, 'struct sdhci_iproc_acpi_ids' becomes defined but unused.
Fixes the following W=1 kernel build warning:
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]
drivers/mmc/host/sdhci-iproc.c +2 -0
@@ -294,12 +294,14 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ } };MODULE_DEVICE_TABLE (acpi, sdhci_iproc_acpi_ids); +#endif static int sdhci_iproc_probe (struct platform_device *pdev) {
Re: [PATCH v2 15/15] mmc: host: sdhci-iproc: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
thanks
Quoted 5 lines · Lee Jones
Since
ACPI_PTR()is used to NULLify the value when !CONFIG_ACPI, 'structsdhci_iproc_acpi_ids' becomes defined but unused.Fixes the following W=1 kernel build warning:
Quoted 7 lines
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]Cc Adrian Hunter <[email protected]>Cc Ray Jui <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 20 lines
drivers/mmc/host/sdhci-iproc.c +2
-0@@ -294,12 +294,14 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ } };MODULE_DEVICE_TABLE (acpi, sdhci_iproc_acpi_ids); +#endif static int sdhci_iproc_probe (struct platform_device *pdev) {
Re: [PATCH v2 15/15] mmc: host: sdhci-iproc: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
In reply to Lee JonesQuoted 6 lines · Lee Jones
Since
ACPI_PTR()is used to NULLify the value when !CONFIG_ACPI, 'structsdhci_iproc_acpi_ids' becomes defined but unused.Fixes the following W=1 kernel build warning:
Quoted 7 lines
mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=]Cc Adrian Hunter <[email protected]>Cc Ray Jui <[email protected]>Cc Scott Branden <[email protected]>Signed-off-by Lee Jones <[email protected]>
Alright, so I have replaced v1 with this v2 on my next branch, thanks!
Kind regards
Uffe
Quoted 20 lines
drivers/mmc/host/sdhci-iproc.c +2
-0@@ -294,12 +294,14 @@ static const struct of_device_id sdhci_iproc_of_match[] = { };MODULE_DEVICE_TABLE (of, sdhci_iproc_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { { .id ="BRCM5871" , .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id ="BRCM5872" , .driver_data = (kernel_ulong_t)&iproc_data }, {/* sentinel */ } };MODULE_DEVICE_TABLE (acpi, sdhci_iproc_acpi_ids); +#endif static int sdhci_iproc_probe (struct platform_device *pdev) {
Quoted 52 lines · Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
After these patches are applied, the build system no longer complains about any W=0 nor W=1 level warnings in
drivers/mmc.Hurrah!
Lee Jones (15):
mmc: core: quirks: Mark fixups as__maybe_unused
mmc: core:sdio_io: Provide description for sdio_set_host_pm_flags()'s
'flag' arg
mmc: core: regulator: Add missing documetation for 'mmc' and 'ios'
mmc: host: sdhci-s3c: Provide documentation for missing struct
properties
mmc: host: mtk-sd: Demotemsdc_recheck_sdio_irq()function header
mmc: host: atmel-mci: Provide 2 new and correct 1 existing property
description
mmc: core: queue: Correct misspelling of 'mq' in mmc_init_request()'s
docs
mmc: host: dw_mmc-exynos: Add kerneldoc descriptions of for 'dev' args
mmc: host:rtsx_pci_sdmmc: Remove set but unused variable 'err'
mmc: host:rtsx_usb_sdmmc: Remove set but unused variable 'err'
mmc: host: sdhci-of-arasan: Correct formatting and provide missing
function arg(s)
mmc: host: sdhci-msm: Staticify local function
sdhci_msm_dump_vendor_regs()
mmc: host: sdhci-msm: Demote faux kerneldoc header down to basic
comment block
mmc: host: cqhci: Demote faux kerneldoc header down to basic comment
block
mmc: host: sdhci-iproc: Tell the compiler that ACPI functions may not
be useddrivers/mmc/core/queue.c | 2 +- drivers/mmc/core/quirks.h | 6 +++--- drivers/mmc/core/regulator.c | 2 ++ drivers/mmc/core/sdio_io.c | 1 + drivers/mmc/host/atmel-mci.c | 4 +++- drivers/mmc/host/cqhci.c | 2 +- drivers/mmc/host/dw_mmc-exynos.c | 2 ++ drivers/mmc/host/mtk-sd.c | 3 +-- drivers/mmc/host/rtsx_pci_sdmmc.c | 4 ++-- drivers/mmc/host/rtsx_usb_sdmmc.c | 5 ++--- drivers/mmc/host/sdhci-iproc.c | 2 +- drivers/mmc/host/sdhci-msm.c | 4 ++-- drivers/mmc/host/sdhci-of-arasan.c | 3 ++- drivers/mmc/host/sdhci-s3c.c | 4 ++++ 14 files changed, 27 insertions(+), 17 deletions(-)
Quoted 3 lines
--
2.25.1
Applied for next (except patch12, which I already had a patch for), thanks!
Kind regards
Uffe