linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST
@ 2020-12-01 11:20 Sergio Paracuellos
  2020-12-01 11:20 ` [PATCH v3 1/2] phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig Sergio Paracuellos
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2020-12-01 11:20 UTC (permalink / raw)
  To: vkoul; +Cc: kishon, linux-kernel, linux-next

Hi Vinod,

After merging the phy-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/phy/ralink/phy-mt7621-pci.c:17:10: fatal error: mt7621.h: No such file or directory
17 | #include <mt7621.h>
 |          ^~~~~~~~~~

This driver has two includes which are in
"arch/mips/include/asm/mach-ralink" and are directly included in the
driver:
* mt7621.h
* ralink_regs.h

This is because this path is directly included in 'arch/mips/ralink/Platform'
for "ralink".

Adding the include search path to the phy ralink directory fix the problem but
as you told me I finally end up removing COMPILE_TEST from Kconfig.

Making 'allmodconfig' in x86_64 also showed two warnings for this driver
because of pointer size and not valid name for MODULE_DEVICE_TABLE ids.

Ids for the macro has been also included in this series.

Changes in v3:
    - PATCH 1/3 completely changed:
        - Makefile is not touched.
        - Drop 'COMPILE_TEST' in Kconfig.
    - Drop PATCH 2/3 in previous series because COMPILE_TEST does not apply anymore.

Changes in v2:
    - Added 'Reported-by' tag in PATCH 1/3.

Best regards,
    Sergio Paracuellos

Sergio Paracuellos (2):
  phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig
  phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE
    macro

 drivers/phy/ralink/Kconfig          | 2 +-
 drivers/phy/ralink/phy-mt7621-pci.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig
  2020-12-01 11:20 [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Sergio Paracuellos
@ 2020-12-01 11:20 ` Sergio Paracuellos
  2020-12-01 11:20 ` [PATCH v3 2/2] phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro Sergio Paracuellos
  2020-12-01 11:44 ` [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2020-12-01 11:20 UTC (permalink / raw)
  To: vkoul; +Cc: kishon, linux-kernel, linux-next, Stephen Rothwell

This driver includes the following two files directly:
- mt7621.h
- ralink_regs.h

Compilation for its related platform properly works because
its real path is included in 'arch/mips/ralink/Platform' as
cflags.

This driver depends on RALINK but also is enabled for COMPILE_TEST
where nothing about its platform is known and this directly
included files are not found at all breaking compilation.

If we want 'COMPILE_TEST' we have to change cflags also inside
'phy/ralink' subdirectory Makefile which seems that does not
like to linux-phy maintainers. Hence remove COMPILE_TEST from
Kconfig to avoid the problem.

Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/phy/ralink/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ralink/Kconfig b/drivers/phy/ralink/Kconfig
index 2fabb14d2998..ecc309ba9fee 100644
--- a/drivers/phy/ralink/Kconfig
+++ b/drivers/phy/ralink/Kconfig
@@ -4,7 +4,7 @@
 #
 config PHY_MT7621_PCI
 	tristate "MediaTek MT7621 PCI PHY Driver"
-	depends on (RALINK || COMPILE_TEST) && OF
+	depends on RALINK && OF
 	select GENERIC_PHY
 	select REGMAP_MMIO
 	help
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro
  2020-12-01 11:20 [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Sergio Paracuellos
  2020-12-01 11:20 ` [PATCH v3 1/2] phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig Sergio Paracuellos
@ 2020-12-01 11:20 ` Sergio Paracuellos
  2020-12-01 11:44 ` [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2020-12-01 11:20 UTC (permalink / raw)
  To: vkoul; +Cc: kishon, linux-kernel, linux-next

Correct name passed into 'MODULE_DEVICE_TABLE' which was wrong and
was showing a warning when the driver is enabled for 'COMPILE_TEST'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/phy/ralink/phy-mt7621-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ralink/phy-mt7621-pci.c b/drivers/phy/ralink/phy-mt7621-pci.c
index db79088d5362..9a610b414b1f 100644
--- a/drivers/phy/ralink/phy-mt7621-pci.c
+++ b/drivers/phy/ralink/phy-mt7621-pci.c
@@ -335,7 +335,7 @@ static const struct of_device_id mt7621_pci_phy_ids[] = {
 	{ .compatible = "mediatek,mt7621-pci-phy" },
 	{},
 };
-MODULE_DEVICE_TABLE(of, mt7621_pci_ids);
+MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
 
 static struct platform_driver mt7621_pci_phy_driver = {
 	.probe = mt7621_pci_phy_probe,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST
  2020-12-01 11:20 [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Sergio Paracuellos
  2020-12-01 11:20 ` [PATCH v3 1/2] phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig Sergio Paracuellos
  2020-12-01 11:20 ` [PATCH v3 2/2] phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro Sergio Paracuellos
@ 2020-12-01 11:44 ` Vinod Koul
  2020-12-01 11:57   ` Sergio Paracuellos
  2 siblings, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2020-12-01 11:44 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: kishon, linux-kernel, linux-next

On 01-12-20, 12:20, Sergio Paracuellos wrote:
> Hi Vinod,
> 
> After merging the phy-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/phy/ralink/phy-mt7621-pci.c:17:10: fatal error: mt7621.h: No such file or directory
> 17 | #include <mt7621.h>
>  |          ^~~~~~~~~~
> 
> This driver has two includes which are in
> "arch/mips/include/asm/mach-ralink" and are directly included in the
> driver:
> * mt7621.h
> * ralink_regs.h
> 
> This is because this path is directly included in 'arch/mips/ralink/Platform'
> for "ralink".
> 
> Adding the include search path to the phy ralink directory fix the problem but
> as you told me I finally end up removing COMPILE_TEST from Kconfig.
> 
> Making 'allmodconfig' in x86_64 also showed two warnings for this driver
> because of pointer size and not valid name for MODULE_DEVICE_TABLE ids.
> 
> Ids for the macro has been also included in this series.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST
  2020-12-01 11:44 ` [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Vinod Koul
@ 2020-12-01 11:57   ` Sergio Paracuellos
  0 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2020-12-01 11:57 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Kishon Vijay Abraham I, linux-kernel, Linux Next Mailing List

On Tue, Dec 1, 2020 at 12:44 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 01-12-20, 12:20, Sergio Paracuellos wrote:
> > Hi Vinod,
> >
> > After merging the phy-next tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/phy/ralink/phy-mt7621-pci.c:17:10: fatal error: mt7621.h: No such file or directory
> > 17 | #include <mt7621.h>
> >  |          ^~~~~~~~~~
> >
> > This driver has two includes which are in
> > "arch/mips/include/asm/mach-ralink" and are directly included in the
> > driver:
> > * mt7621.h
> > * ralink_regs.h
> >
> > This is because this path is directly included in 'arch/mips/ralink/Platform'
> > for "ralink".
> >
> > Adding the include search path to the phy ralink directory fix the problem but
> > as you told me I finally end up removing COMPILE_TEST from Kconfig.
> >
> > Making 'allmodconfig' in x86_64 also showed two warnings for this driver
> > because of pointer size and not valid name for MODULE_DEVICE_TABLE ids.
> >
> > Ids for the macro has been also included in this series.
>
> Applied, thanks
>

Thanks for letting me know.

Best regards,
    Sergio Paracuellos
> --
> ~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-01 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 11:20 [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Sergio Paracuellos
2020-12-01 11:20 ` [PATCH v3 1/2] phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig Sergio Paracuellos
2020-12-01 11:20 ` [PATCH v3 2/2] phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro Sergio Paracuellos
2020-12-01 11:44 ` [PATCH v3 0/2] phy: ralink: phy-mt7621-pci: some fixes for COMPILE_TEST Vinod Koul
2020-12-01 11:57   ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).