linux-ide.vger.kernel.org archive mirror
 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

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 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).