Thread (16 messages) flat view 16 messages, 3 authors, 2014-03-15

Re: [PATCH net-next V5 0/9] Altera Triple Speed Ethernet (TSE) Driver

From: Vince Bridgers <hidden>
Date: 2014-03-15 20:52:15
Also in: linux-devicetree

Hi Dave

On Fri, Mar 14, 2014 at 2:15 PM, David Miller [off-list ref] wrote:
From: David Miller <davem@davemloft.net>
Date: Fri, 14 Mar 2014 15:07:20 -0400 (EDT)
quoted
From: Vince Bridgers <redacted>
Date: Fri, 14 Mar 2014 09:04:38 -0500
quoted
This is the version 5 submission for the Altera Triple Speed Ethernet (TSE)
driver. All comments received during the version 2, 3, and 4 submissions have
been accepted. Please find the change log and a description of the submission
below.
Series applied to net-next, thanks.
Actually, I had to revert, your driver adds new warnings to the build:

drivers/net/ethernet/altera/altera_tse_main.c: In function 'altera_tse_probe':
drivers/net/ethernet/altera/altera_tse_main.c:1238:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   priv->tx_dma_desc = (void *)descmap;
                       ^
drivers/net/ethernet/altera/altera_tse_main.c:1242:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   priv->rx_dma_desc = (void *)(descmap+priv->txdescmem);
                       ^

A pointer can be larger than an "unsigned int", you therefore cannot
cast it to a pointer.

In fact this code path has a lot of problems, we pass a pointer to an unsigned int
as a "void __iomem *" to request_and_map().  It's not, don't pretend that it is,
and don't use casts to try and make the compiler also not see the problem.
Thank for catching this, another oversight on my part. I'll address
the issue in our pre-submission process, correct the problem and
resubmit. For what it's worth, we did not see the compiler warnings
before submitting.

All the best,

Vince
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help