Thread (1 message) 1 message, 1 author, 2016-04-13

Re: [PATCH 1/2] [v4] net: emac: emac gigabit ethernet controller driver

From: Bjørn Mork <bjorn@mork.no>
Date: 2016-04-13 20:10:38
Also in: linux-arm-msm, linux-devicetree, lkml

Timur Tabi [off-list ref] writes:
Shanker Donthineni wrote:
quoted
quoted
quoted
quoted
quoted
    drivers/net/ethernet/qualcomm/emac/emac-mac.c: In function 'emac_mac_up':
quoted
quoted
quoted
quoted
quoted
quoted
quoted
quoted
drivers/net/ethernet/qualcomm/emac/emac-mac.c:1076:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
      writel(~DIS_INT, adpt->base + EMAC_INT_STATUS);
This doesn't happen on arm64, and I don't know how to fix it.  DIS_INT is defined as:

    #define DIS_INT          BIT(31)
Try with (1U<<31).
Except that Gilad was previously asked to use the BIT() macros:

	https://lkml.org/lkml/2015/12/15/797
So typecast it.

  writel((u32)~DIS_INT, adpt->base + EMAC_INT_STATUS);


I believe the reason you don't see this on arm64 is that the writel
macro includes the typecast there.  But it doesn't on x86_64


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