Re: [PATCH v4] staging: Mediatek: Use individual config flags in Makefile

2019-01-15 Thread kbuild test robot
Hi George,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[cannot apply to v5.0-rc2 next-20190115]
[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/George-Hilliard/staging-Mediatek-Use-individual-config-flags-in-Makefile/20190116-084915
config: x86_64-randconfig-e0-201902 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from drivers/staging/mt7621-mmc/dbg.c:51:
   drivers/staging/mt7621-mmc/mt6575_sd.h: In function 'sdr_set_bits':
   drivers/staging/mt7621-mmc/mt6575_sd.h:459:12: error: implicit declaration 
of function 'readl'; did you mean 'd_real'? 
[-Werror=implicit-function-declaration]
 u32 val = readl(reg);
   ^
   d_real
>> drivers/staging/mt7621-mmc/mt6575_sd.h:462:2: error: implicit declaration of 
>> function 'writel'; did you mean 'wrmsrl'? 
>> [-Werror=implicit-function-declaration]
 writel(val, reg);
 ^~
 wrmsrl
   cc1: some warnings being treated as errors

vim +462 drivers/staging/mt7621-mmc/mt6575_sd.h

8b634a9c John Crispin  2018-03-15  456  
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  457  static inline void 
sdr_set_bits(void __iomem *reg, u32 bs)
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  458  {
0b78f05d Christian Lütke-Stetzkamp 2018-04-24 @459  u32 val = readl(reg);
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  460  
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  461  val |= bs;
0b78f05d Christian Lütke-Stetzkamp 2018-04-24 @462  writel(val, reg);
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  463  }
0b78f05d Christian Lütke-Stetzkamp 2018-04-24  464  

:: The code at line 462 was first introduced by commit
:: 0b78f05d510b01e353481f5bccb63661d2cb5c32 staging: mt7621-mmc: Correct 
datatypes for io and sanitize io access

:: TO: Christian Lütke-Stetzkamp 
:: CC: Greg Kroah-Hartman 

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


.config.gz
Description: application/gzip


Re: [PATCH v4] staging: Mediatek: Use individual config flags in Makefile

2019-01-15 Thread Greg Kroah-Hartman
On Tue, Jan 15, 2019 at 10:29:18AM -0700, George Hilliard wrote:
> These drivers can be useful on other MT76xx SoCs, which have compatible
> peripherals.  The drivers were selectable in Kconfig, but they were
> quietly excluded from the build because the SOC_MT7621 chip was not
> selected.  So, make the Makefiles use the same flags as Kconfig for
> these drivers.
> 
> mt7621-dma and mt7621-dts are left alone because they truly do require
> that SoC.
> 
> I have personally confirmed that the mt7621-spi driver works on the
> MT7688, which was what prompted this change.
> 
> Cc: linux-kernel@vger.kernel.org
> Cc: de...@driverdev.osuosl.org
> Cc: NeilBrown 
> Cc: sergio.paracuel...@gmail.com
> Signed-off-by: George Hilliard 
> ---
> Changes in v2..v4:
>   - Also use individual flags for mt7621-pci and the new mt7621-pci-phy
>   - Slightly revise commit message

You also rebased this patch, right?

Anyway, applying this patch, I get the following build error:

  CC [M]  drivers/staging/mt7621-mmc/sd.o
  CC [M]  drivers/staging/mt7621-mmc/dbg.o
drivers/staging/mt7621-mmc/sd.c:48:10: fatal error: 
asm/mach-ralink/ralink_regs.h: No such file or directory
 #include 
  ^~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:277: drivers/staging/mt7621-mmc/sd.o] 
Error 1
make[3]: *** Waiting for unfinished jobs
drivers/staging/mt7621-mmc/dbg.c: In function ‘msdc_debug_proc_write’:
drivers/staging/mt7621-mmc/dbg.c:237:12: warning: unused variable ‘size’ 
[-Wunused-variable]
  int mode, size;
^~~~
drivers/staging/mt7621-mmc/dbg.c:237:6: warning: unused variable ‘mode’ 
[-Wunused-variable]
  int mode, size;
  ^~~~
make[2]: *** [scripts/Makefile.build:492: drivers/staging/mt7621-mmc] Error 2
make[2]: *** Waiting for unfinished jobs
make[1]: *** [scripts/Makefile.build:492: drivers/staging] Error 2
make[1]: *** Waiting for unfinished jobs

So I can't take this patch as is, sorry.

Please fix.

thanks,

greg k-h


[PATCH v4] staging: Mediatek: Use individual config flags in Makefile

2019-01-15 Thread George Hilliard
These drivers can be useful on other MT76xx SoCs, which have compatible
peripherals.  The drivers were selectable in Kconfig, but they were
quietly excluded from the build because the SOC_MT7621 chip was not
selected.  So, make the Makefiles use the same flags as Kconfig for
these drivers.

mt7621-dma and mt7621-dts are left alone because they truly do require
that SoC.

I have personally confirmed that the mt7621-spi driver works on the
MT7688, which was what prompted this change.

Cc: linux-kernel@vger.kernel.org
Cc: de...@driverdev.osuosl.org
Cc: NeilBrown 
Cc: sergio.paracuel...@gmail.com
Signed-off-by: George Hilliard 
---
Changes in v2..v4:
  - Also use individual flags for mt7621-pci and the new mt7621-pci-phy
  - Slightly revise commit message

 drivers/staging/Makefile| 14 +++---
 drivers/staging/mt7621-pci-phy/Makefile |  2 +-
 drivers/staging/mt7621-pci/Makefile |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 4d563ed0bc79..cc5530cc996b 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -41,14 +41,14 @@ obj-$(CONFIG_GREYBUS)   += greybus/
 obj-$(CONFIG_BCM2835_VCHIQ)+= vc04_services/
 obj-$(CONFIG_DRM_VBOXVIDEO)+= vboxvideo/
 obj-$(CONFIG_PI433)+= pi433/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-pci/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-pci-phy/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-pinctrl/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-spi/
+obj-$(CONFIG_PCI_MT7621)   += mt7621-pci/
+obj-$(CONFIG_PCI_MT7621_PHY)   += mt7621-pci-phy/
+obj-$(CONFIG_PINCTRL_RT2880)   += mt7621-pinctrl/
+obj-$(CONFIG_SPI_MT7621)   += mt7621-spi/
 obj-$(CONFIG_SOC_MT7621)   += mt7621-dma/
-obj-$(CONFIG_SOC_MT7621)   += ralink-gdma/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-mmc/
-obj-$(CONFIG_SOC_MT7621)   += mt7621-eth/
+obj-$(CONFIG_DMA_RALINK)   += ralink-gdma/
+obj-$(CONFIG_MTK_MMC)  += mt7621-mmc/
+obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
 obj-$(CONFIG_SOC_MT7621)   += mt7621-dts/
 obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
 obj-$(CONFIG_XIL_AXIS_FIFO)+= axis-fifo/
diff --git a/drivers/staging/mt7621-pci-phy/Makefile 
b/drivers/staging/mt7621-pci-phy/Makefile
index 2b82ccfc28c6..a970056f05c1 100644
--- a/drivers/staging/mt7621-pci-phy/Makefile
+++ b/drivers/staging/mt7621-pci-phy/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621)   += pci-mt7621-phy.o
+obj-$(CONFIG_PCI_MT7621_PHY)   += pci-mt7621-phy.o
diff --git a/drivers/staging/mt7621-pci/Makefile 
b/drivers/staging/mt7621-pci/Makefile
index 607b84bedcc3..d4655a726b61 100644
--- a/drivers/staging/mt7621-pci/Makefile
+++ b/drivers/staging/mt7621-pci/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621)   += pci-mt7621.o
+obj-$(CONFIG_PCI_MT7621)   += pci-mt7621.o
-- 
2.20.1