All of lore.kernel.org
 help / color / mirror / Atom feed
* SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1")
@ 2015-02-11  1:44 Linus Torvalds
  2015-02-11  2:54 ` [PATCH] sata_dwc_460ex: disable COMPILE_TEST Tejun Heo
  2015-02-11 11:53 ` SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Torvalds @ 2015-02-11  1:44 UTC (permalink / raw)
  To: Andy Shevchenko, Tejun Heo; +Cc: IDE-ML

This COMPILE_TEST thing is beyond annoying.

It was already disabled for ARM and ARM64. And I'm going to disable it
entirely, because the driver noisy as hell, and I don't want to see
the insane warnings from it in my allmodconfig build.

I'm talking about these things:

  drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
     lli[idx].sar = cpu_to_le32((u32)dmadr_addr);
                                ^

and as far as I can tell (but maybe I didn't trace things right) that
"dmadr_addr" really is a pointer, and doesn't necessarily fit in 32
bits. It's somewhat obscure with the random casting to "void __iomem
*") etc, but the source of it seems to be

 &hsdev->sata_dwc_regs->dmadr

which looks to come from this:

  hsdev->sata_dwc_regs = (void *__iomem)(base + SATA_DWC_REG_OFFSET);

so that whole thing is basically

    base + SATA_DWC_REG_OFFSET + offsetof(dmadr)

Fine. But it also does

    base = of_iomap(np, 0);

so the whole driver seems to basically depend on the low 32 bits of
the "of_iomap()" thing being meaningful. And I'm not at all sure it
is.

So I'm not at all sure that can possibly make sense, but I *am* sure
that it causes very noisy warnings. And the warnings are just hiding
other warnings that might be more relevant, so right now enabling that
driver on other architectures is not an improvement, it just sucks.

You guys can try again when the driver has actually been cleaned up
and might compile cleanly. Right now it's just nasty, and looking at
the code I think that the thing is fundamentally wrong and cannot work
outside of its original environment (ppc 460ex, apparently) anyway.

                           Linus

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

* [PATCH] sata_dwc_460ex: disable COMPILE_TEST
  2015-02-11  1:44 SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Linus Torvalds
@ 2015-02-11  2:54 ` Tejun Heo
  2015-02-11 11:53 ` SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2015-02-11  2:54 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andy Shevchenko, IDE-ML

84683a7e081f ("sata_dwc_460ex: enable COMPILE_TEST for the driver")
enabled COMPILE_TEST for the driver and 2de5a9c004e9 ("sata_dwc_460ex:
disable compilation on ARM and ARM64") subsequently turned it off for
ARMs but it still triggers compile warnings on 64bits.

   drivers/ata/sata_dwc_460ex.c:652:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      lli[idx].sar = cpu_to_le32((u32)dmadr_addr);
                                 ^
Disable it completely for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Sorry about the trouble.  In case you haven't done it already, here's
the patch.

Thanks.

 drivers/ata/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index e7f338a..5f60155 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -269,7 +269,7 @@ config ATA_PIIX
 
 config SATA_DWC
 	tristate "DesignWare Cores SATA support"
-	depends on 460EX || (COMPILE_TEST && !(ARM || ARM64))
+	depends on 460EX
 	help
 	  This option enables support for the on-chip SATA controller of the
 	  AppliedMicro processor 460EX.

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

* Re: SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1")
  2015-02-11  1:44 SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Linus Torvalds
  2015-02-11  2:54 ` [PATCH] sata_dwc_460ex: disable COMPILE_TEST Tejun Heo
@ 2015-02-11 11:53 ` Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2015-02-11 11:53 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Tejun Heo, IDE-ML

On Tue, 2015-02-10 at 17:44 -0800, Linus Torvalds wrote:

[]

> You guys can try again when the driver has actually been cleaned up
> and might compile cleanly. Right now it's just nasty, and looking at
> the code I think that the thing is fundamentally wrong and cannot work
> outside of its original environment (ppc 460ex, apparently) anyway.

Sorry, that was my idea to get it compile tested since I'm trying to
clean up this piece of code that produces nasty warnings.

-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy


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

end of thread, other threads:[~2015-02-11 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-11  1:44 SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Linus Torvalds
2015-02-11  2:54 ` [PATCH] sata_dwc_460ex: disable COMPILE_TEST Tejun Heo
2015-02-11 11:53 ` SATA_DWC COMPILE_TEST is nasty horrid stuff (was "GIT PULL] libata changes for v3.20-rc1") Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.