diff mbox

mmc: mmci: add missing include of mmci_qcom_dml.h

Message ID 1465409738-23113-1-git-send-email-ben.dooks@codethink.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Dooks June 8, 2016, 6:15 p.m. UTC
Fix the missing declarations of dml_start_xfer() and
dml_hw_init() by including mmci_qcom_dml.h to fix the
following warnings:

drivers/mmc/host/mmci_qcom_dml.c:57:6: warning: symbol 'dml_start_xfer' was not declared. Should it be static?
drivers/mmc/host/mmci_qcom_dml.c:122:5: warning: symbol 'dml_hw_init' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org
Cc: linux-arm-kernel@lists.infadead.org
---
 drivers/mmc/host/mmci_qcom_dml.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Dooks June 9, 2016, 5:16 p.m. UTC | #1
On 09/06/16 18:24, kbuild test robot wrote:
> Hi,
> 
> [auto build test ERROR on ulf.hansson-mmc/next]
> [also build test ERROR on v4.7-rc2 next-20160609]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Ben-Dooks/mmc-mmci-add-missing-include-of-mmci_qcom_dml-h/20160609-021829
> base:   https://git.linaro.org/people/ulf.hansson/mmc next
> config: arm64-allmodconfig (attached as .config)
> compiler: aarch64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=arm64 
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/mmc/host/mmci_qcom_dml.c:58:6: error: redefinition of 'dml_start_xfer'
>     void dml_start_xfer(struct mmci_host *host, struct mmc_data *data)
>          ^
>    In file included from drivers/mmc/host/mmci_qcom_dml.c:21:0:
>    drivers/mmc/host/mmci_qcom_dml.h:26:20: note: previous definition of 'dml_start_xfer' was here
>     static inline void dml_start_xfer(struct mmci_host *host, struct mmc_data *data)
>                        ^
>>> drivers/mmc/host/mmci_qcom_dml.c:123:5: error: redefinition of 'dml_hw_init'
>     int dml_hw_init(struct mmci_host *host, struct device_node *np)
>         ^
>    In file included from drivers/mmc/host/mmci_qcom_dml.c:21:0:
>    drivers/mmc/host/mmci_qcom_dml.h:22:19: note: previous definition of 'dml_hw_init' was here
>     static inline int dml_hw_init(struct mmci_host *host, struct device_node *np)
>                       

Looks like this driver is going to fail to build
when CONFIG_MMC_QCOM_DML=m as it'll not trigger
the config in QCOM_DML properly.

Shall I push a second patch to fix this?
kernel test robot June 9, 2016, 5:24 p.m. UTC | #2
Hi,

[auto build test ERROR on ulf.hansson-mmc/next]
[also build test ERROR on v4.7-rc2 next-20160609]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ben-Dooks/mmc-mmci-add-missing-include-of-mmci_qcom_dml-h/20160609-021829
base:   https://git.linaro.org/people/ulf.hansson/mmc next
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

>> drivers/mmc/host/mmci_qcom_dml.c:58:6: error: redefinition of 'dml_start_xfer'
    void dml_start_xfer(struct mmci_host *host, struct mmc_data *data)
         ^
   In file included from drivers/mmc/host/mmci_qcom_dml.c:21:0:
   drivers/mmc/host/mmci_qcom_dml.h:26:20: note: previous definition of 'dml_start_xfer' was here
    static inline void dml_start_xfer(struct mmci_host *host, struct mmc_data *data)
                       ^
>> drivers/mmc/host/mmci_qcom_dml.c:123:5: error: redefinition of 'dml_hw_init'
    int dml_hw_init(struct mmci_host *host, struct device_node *np)
        ^
   In file included from drivers/mmc/host/mmci_qcom_dml.c:21:0:
   drivers/mmc/host/mmci_qcom_dml.h:22:19: note: previous definition of 'dml_hw_init' was here
    static inline int dml_hw_init(struct mmci_host *host, struct device_node *np)
                      ^

vim +/dml_start_xfer +58 drivers/mmc/host/mmci_qcom_dml.c

9cb15142 Srinivas Kandagatla 2014-07-29   52  /* other definitions */
9cb15142 Srinivas Kandagatla 2014-07-29   53  #define PRODUCER_PIPE_LOGICAL_SIZE	4096
9cb15142 Srinivas Kandagatla 2014-07-29   54  #define CONSUMER_PIPE_LOGICAL_SIZE	4096
9cb15142 Srinivas Kandagatla 2014-07-29   55  
9cb15142 Srinivas Kandagatla 2014-07-29   56  #define DML_OFFSET			0x800
9cb15142 Srinivas Kandagatla 2014-07-29   57  
9cb15142 Srinivas Kandagatla 2014-07-29  @58  void dml_start_xfer(struct mmci_host *host, struct mmc_data *data)
9cb15142 Srinivas Kandagatla 2014-07-29   59  {
9cb15142 Srinivas Kandagatla 2014-07-29   60  	u32 config;
9cb15142 Srinivas Kandagatla 2014-07-29   61  	void __iomem *base = host->base + DML_OFFSET;
9cb15142 Srinivas Kandagatla 2014-07-29   62  
9cb15142 Srinivas Kandagatla 2014-07-29   63  	if (data->flags & MMC_DATA_READ) {
9cb15142 Srinivas Kandagatla 2014-07-29   64  		/* Read operation: configure DML for producer operation */
9cb15142 Srinivas Kandagatla 2014-07-29   65  		/* Set producer CRCI-x and disable consumer CRCI */
9cb15142 Srinivas Kandagatla 2014-07-29   66  		config = readl_relaxed(base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   67  		config = (config & ~PRODUCER_CRCI_MSK) | PRODUCER_CRCI_X_SEL;
9cb15142 Srinivas Kandagatla 2014-07-29   68  		config = (config & ~CONSUMER_CRCI_MSK) | CONSUMER_CRCI_DISABLE;
9cb15142 Srinivas Kandagatla 2014-07-29   69  		writel_relaxed(config, base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   70  
9cb15142 Srinivas Kandagatla 2014-07-29   71  		/* Set the Producer BAM block size */
9cb15142 Srinivas Kandagatla 2014-07-29   72  		writel_relaxed(data->blksz, base + DML_PRODUCER_BAM_BLOCK_SIZE);
9cb15142 Srinivas Kandagatla 2014-07-29   73  
9cb15142 Srinivas Kandagatla 2014-07-29   74  		/* Set Producer BAM Transaction size */
9cb15142 Srinivas Kandagatla 2014-07-29   75  		writel_relaxed(data->blocks * data->blksz,
9cb15142 Srinivas Kandagatla 2014-07-29   76  			       base + DML_PRODUCER_BAM_TRANS_SIZE);
9cb15142 Srinivas Kandagatla 2014-07-29   77  		/* Set Producer Transaction End bit */
9cb15142 Srinivas Kandagatla 2014-07-29   78  		config = readl_relaxed(base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   79  		config |= PRODUCER_TRANS_END_EN;
9cb15142 Srinivas Kandagatla 2014-07-29   80  		writel_relaxed(config, base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   81  		/* Trigger producer */
9cb15142 Srinivas Kandagatla 2014-07-29   82  		writel_relaxed(1, base + DML_PRODUCER_START);
9cb15142 Srinivas Kandagatla 2014-07-29   83  	} else {
9cb15142 Srinivas Kandagatla 2014-07-29   84  		/* Write operation: configure DML for consumer operation */
9cb15142 Srinivas Kandagatla 2014-07-29   85  		/* Set consumer CRCI-x and disable producer CRCI*/
9cb15142 Srinivas Kandagatla 2014-07-29   86  		config = readl_relaxed(base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   87  		config = (config & ~CONSUMER_CRCI_MSK) | CONSUMER_CRCI_X_SEL;
9cb15142 Srinivas Kandagatla 2014-07-29   88  		config = (config & ~PRODUCER_CRCI_MSK) | PRODUCER_CRCI_DISABLE;
9cb15142 Srinivas Kandagatla 2014-07-29   89  		writel_relaxed(config, base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   90  		/* Clear Producer Transaction End bit */
9cb15142 Srinivas Kandagatla 2014-07-29   91  		config = readl_relaxed(base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   92  		config &= ~PRODUCER_TRANS_END_EN;
9cb15142 Srinivas Kandagatla 2014-07-29   93  		writel_relaxed(config, base + DML_CONFIG);
9cb15142 Srinivas Kandagatla 2014-07-29   94  		/* Trigger consumer */
9cb15142 Srinivas Kandagatla 2014-07-29   95  		writel_relaxed(1, base + DML_CONSUMER_START);
9cb15142 Srinivas Kandagatla 2014-07-29   96  	}
9cb15142 Srinivas Kandagatla 2014-07-29   97  
9cb15142 Srinivas Kandagatla 2014-07-29   98  	/* make sure the dml is configured before dma is triggered */
9cb15142 Srinivas Kandagatla 2014-07-29   99  	wmb();
9cb15142 Srinivas Kandagatla 2014-07-29  100  }
9cb15142 Srinivas Kandagatla 2014-07-29  101  
9cb15142 Srinivas Kandagatla 2014-07-29  102  static int of_get_dml_pipe_index(struct device_node *np, const char *name)
9cb15142 Srinivas Kandagatla 2014-07-29  103  {
9cb15142 Srinivas Kandagatla 2014-07-29  104  	int index;
9cb15142 Srinivas Kandagatla 2014-07-29  105  	struct of_phandle_args	dma_spec;
9cb15142 Srinivas Kandagatla 2014-07-29  106  
9cb15142 Srinivas Kandagatla 2014-07-29  107  	index = of_property_match_string(np, "dma-names", name);
9cb15142 Srinivas Kandagatla 2014-07-29  108  
9cb15142 Srinivas Kandagatla 2014-07-29  109  	if (index < 0)
9cb15142 Srinivas Kandagatla 2014-07-29  110  		return -ENODEV;
9cb15142 Srinivas Kandagatla 2014-07-29  111  
9cb15142 Srinivas Kandagatla 2014-07-29  112  	if (of_parse_phandle_with_args(np, "dmas", "#dma-cells", index,
9cb15142 Srinivas Kandagatla 2014-07-29  113  				       &dma_spec))
9cb15142 Srinivas Kandagatla 2014-07-29  114  		return -ENODEV;
9cb15142 Srinivas Kandagatla 2014-07-29  115  
9cb15142 Srinivas Kandagatla 2014-07-29  116  	if (dma_spec.args_count)
9cb15142 Srinivas Kandagatla 2014-07-29  117  		return dma_spec.args[0];
9cb15142 Srinivas Kandagatla 2014-07-29  118  
9cb15142 Srinivas Kandagatla 2014-07-29  119  	return -ENODEV;
9cb15142 Srinivas Kandagatla 2014-07-29  120  }
9cb15142 Srinivas Kandagatla 2014-07-29  121  
9cb15142 Srinivas Kandagatla 2014-07-29  122  /* Initialize the dml hardware connected to SD Card controller */
9cb15142 Srinivas Kandagatla 2014-07-29 @123  int dml_hw_init(struct mmci_host *host, struct device_node *np)
9cb15142 Srinivas Kandagatla 2014-07-29  124  {
9cb15142 Srinivas Kandagatla 2014-07-29  125  	u32 config;
9cb15142 Srinivas Kandagatla 2014-07-29  126  	void __iomem *base;

:::::: The code at line 58 was first introduced by commit
:::::: 9cb15142d0e336874ecc753e9a4e5696c46a67d9 mmc: mmci: Add qcom dml support to the driver.

:::::: TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
:::::: CC: Ulf Hansson <ulf.hansson@linaro.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/mmc/host/mmci_qcom_dml.c b/drivers/mmc/host/mmci_qcom_dml.c
index 2b7fc37..54fd58b 100644
--- a/drivers/mmc/host/mmci_qcom_dml.c
+++ b/drivers/mmc/host/mmci_qcom_dml.c
@@ -18,6 +18,7 @@ 
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
 #include "mmci.h"
+#include "mmci_qcom_dml.h"
 
 /* Registers */
 #define DML_CONFIG			0x00