[V3,1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c
diff mbox series

Message ID 20190102144827.22930-1-ernest.zhang@bayhubtech.com
State New
Headers show
Series
  • [V3,1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c
Related show

Commit Message

Ernest Zhang(WH) Jan. 2, 2019, 2:48 p.m. UTC
Moving sdhci_o2 into sdhci-pci-o2micro.c

Signed-off-by: Ernest Zhang <ernest.zhang@bayhubtech.com>
---
Change in V3:
    1. Change the patches order to make this the first patch
    2. Remove the other unneeded o2 declarations in sdhci-pci.h

Change in V2:
	1. Moving sdhci_o2 into sdhci-pci-o2micro.c

Change in V1:
	N/A
---
 drivers/mmc/host/sdhci-pci-core.c    | 10 ----------
 drivers/mmc/host/sdhci-pci-o2micro.c | 10 ++++++++++
 drivers/mmc/host/sdhci-pci.h         |  6 +-----
 3 files changed, 11 insertions(+), 15 deletions(-)

Comments

kbuild test robot Jan. 2, 2019, 5:52 p.m. UTC | #1
Hi Ernest,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ulf.hansson-mmc/next]
[also build test ERROR on v4.20]
[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/Ernest-Zhang-WH/mmc-sdhci-Moving-sdhci_o2-into-sdhci-pci-o2micro-c/20190102-232703
base:   git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

Note: the linux-review/Ernest-Zhang-WH/mmc-sdhci-Moving-sdhci_o2-into-sdhci-pci-o2micro-c/20190102-232703 HEAD 8704ac493a865db09ca5f4ea50ea7e62cf64f1d9 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

>> drivers/mmc/host/sdhci-pci-o2micro.c:64:11: error: 'sdhci_pci_o2_probe' undeclared here (not in a function); did you mean 'sdhci_pci_priv'?
     .probe = sdhci_pci_o2_probe,
              ^~~~~~~~~~~~~~~~~~
              sdhci_pci_priv
>> drivers/mmc/host/sdhci-pci-o2micro.c:67:16: error: 'sdhci_pci_o2_probe_slot' undeclared here (not in a function); did you mean 'sdhci_pci_slot'?
     .probe_slot = sdhci_pci_o2_probe_slot,
                   ^~~~~~~~~~~~~~~~~~~~~~~
                   sdhci_pci_slot

vim +64 drivers/mmc/host/sdhci-pci-o2micro.c

    62	
    63	const struct sdhci_pci_fixes sdhci_o2 = {
  > 64		.probe = sdhci_pci_o2_probe,
    65		.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
    66		.quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
  > 67		.probe_slot = sdhci_pci_o2_probe_slot,
    68	#ifdef CONFIG_PM_SLEEP
    69		.resume = sdhci_pci_o2_resume,
    70	#endif
    71	};
    72	

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

Patch
diff mbox series

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 2a6eba74b94e..99b0fec2836b 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -1257,16 +1257,6 @@  static int jmicron_resume(struct sdhci_pci_chip *chip)
 }
 #endif
 
-static const struct sdhci_pci_fixes sdhci_o2 = {
-	.probe = sdhci_pci_o2_probe,
-	.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
-	.quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
-	.probe_slot = sdhci_pci_o2_probe_slot,
-#ifdef CONFIG_PM_SLEEP
-	.resume = sdhci_pci_o2_resume,
-#endif
-};
-
 static const struct sdhci_pci_fixes sdhci_jmicron = {
 	.probe		= jmicron_probe,
 
diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c
index cc3ffeffd7a2..73b49efa2316 100644
--- a/drivers/mmc/host/sdhci-pci-o2micro.c
+++ b/drivers/mmc/host/sdhci-pci-o2micro.c
@@ -60,6 +60,16 @@ 
 #define O2_SD_VENDOR_SETTING2	0x1C8
 #define O2_SD_HW_TUNING_DISABLE	BIT(4)
 
+const struct sdhci_pci_fixes sdhci_o2 = {
+	.probe = sdhci_pci_o2_probe,
+	.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
+	.probe_slot = sdhci_pci_o2_probe_slot,
+#ifdef CONFIG_PM_SLEEP
+	.resume = sdhci_pci_o2_resume,
+#endif
+};
+
 static void sdhci_o2_set_tuning_mode(struct sdhci_host *host)
 {
 	u16 reg;
diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h
index 2ef0bdca9197..4ddb69a15cd7 100644
--- a/drivers/mmc/host/sdhci-pci.h
+++ b/drivers/mmc/host/sdhci-pci.h
@@ -179,13 +179,9 @@  static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot)
 int sdhci_pci_resume_host(struct sdhci_pci_chip *chip);
 #endif
 int sdhci_pci_enable_dma(struct sdhci_host *host);
-int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot);
-int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip);
-#ifdef CONFIG_PM_SLEEP
-int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip);
-#endif
 
 extern const struct sdhci_pci_fixes sdhci_arasan;
 extern const struct sdhci_pci_fixes sdhci_snps;
+extern const struct sdhci_pci_fixes sdhci_o2;
 
 #endif /* __SDHCI_PCI_H */