Skip to content

Kernel 3.8.4 (/linux-rpi-3.8.y-temp) Compile issues ( No Cross compile ) - void violations , byte order  #267

Closed

Description

@hvenzke

arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [- Wcpp]
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [- Wcpp]


arch/arm/mach-bcm2708/bcm2708.c: In function 'bcm2708_restart':
arch/arm/mach-bcm2708/bcm2708.c:671:2: warning: passing argument 1 of '__raw_readl' makes pointer from inte ger without a cast [enabled by default]
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/mach-bcm2708/bcm2708.c:23:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:104:19: note: expected 'const volatile void *' but argument is of type 'unsigned int'
arch/arm/mach-bcm2708/bcm2708.c:676:2: warning: passing argument 2 of '__raw_writel' makes pointer from int eger without a cast [enabled by default]
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/mach-bcm2708/bcm2708.c:23:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argumen t is of type 'unsigned int'
arch/arm/mach-bcm2708/bcm2708.c:677:2: warning: passing argument 2 of '__raw_writel' makes pointer from int eger without a cast [enabled by default]
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/mach-bcm2708/bcm2708.c:23:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argumen t is of type 'unsigned int'
arch/arm/mach-bcm2708/bcm2708.c: In function 'bcm2708_power_off':
arch/arm/mach-bcm2708/bcm2708.c:684:2: warning: passing argument 1 of '__raw_readl' makes pointer from inte ger without a cast [enabled by default]
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/mach-bcm2708/bcm2708.c:23:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:104:19: note: expected 'const volatile void *' but argument is of type 'unsigned int'
arch/arm/mach-bcm2708/bcm2708.c:686:2: warning: passing argument 2 of '__raw_writel' makes pointer from int eger without a cast [enabled by default]
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/mach-bcm2708/bcm2708.c:23:

/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argumen t is of type 'unsigned int'

In file included from include/linux/byteorder/little_endian.h:6:0,
from /usr/src/linux-rpi-3.8.y-temp/arch/arm/include/uapi/asm/byteorder.h:21,
from include/asm-generic/bitops/le.h:5,
from /usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/bitops.h:308,
from include/linux/bitops.h:22,
from include/linux/kernel.h:10,
from include/asm-generic/bug.h:13,
from /usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/bug.h:59,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/wait.h:7,
from include/linux/fs.h:6,
from fs/cifs/cifssmb.c:30:
fs/cifs/cifssmb.c: In function 'CIFSSMBGetCIFSACL':
include/linux/byteorder/generic.h:165:7: warning: 'pSMB' may be used uninitialized in this function [-Wmaybe-uninitialized]

fs/cifs/cifssmb.c:3673:22: note: 'pSMB' was declared here

drivers/cpufreq/bcm2835-cpufreq.c: In function 'bcm2835_cpufreq_driver_target':
drivers/cpufreq/bcm2835-cpufreq.c:180:15: warning: unused variable 'cur' [-Wunused-variable]


CC drivers/mmc/host/sdhci-bcm2708.o
drivers/mmc/host/sdhci-bcm2708.c: In function 'sdhci_bcm2708_platdma_reset':
drivers/mmc/host/sdhci-bcm2708.c:650:16: warning: unused variable 'flags' [-Wunused-variable]
drivers/mmc/host/sdhci-bcm2708.c: In function 'sdhci_bcm2708_dma_complete_irq':
drivers/mmc/host/sdhci-bcm2708.c:747:16: warning: unused variable 'flags' [-Wunused-variable]


CC [M] drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.o
drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c: In function 'dwc_otg_pcd_handle_out_ep_intr':

drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c:4279:21: warning: operation on 'status.d32' may be undefined [-Wsequence-point]

AS arch/arm/boot/compressed/head.o
arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:735: Warning: (null)
arch/arm/boot/compressed/head.S:978: Warning: (null)
arch/arm/boot/compressed/head.S:1017: Warning: (null)
arch/arm/boot/compressed/head.S:1018: Warning: (null)
arch/arm/boot/compressed/head.S:1048: Warning: (null)
arch/arm/boot/compressed/head.S:1055: Warning: (null)
arch/arm/boot/compressed/head.S:1063: Warning: (null)
arch/arm/boot/compressed/head.S:1074: Warning: (null)
arch/arm/boot/compressed/head.S:1088: Warning: (null)
arch/arm/boot/compressed/head.S:1120: Warning: (null)
arch/arm/boot/compressed/head.S:1122: Warning: (null)
arch/arm/boot/compressed/head.S:1123: Warning: (null)
arch/arm/boot/compressed/head.S:1130: Warning: (null)
arch/arm/boot/compressed/head.S:1162: Warning: (null)
XZKERN arch/arm/boot/compressed/piggy.xzkern
AS arch/arm/boot/compressed/piggy.xzkern.o
CC arch/arm/boot/compressed/misc.o
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h: In function 'putc':
arch/arm/mach-bcm2708/include/mach/uncompress.h:40:2: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:104:19: note: expected 'const volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h:43:2: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h: In function 'flush':
arch/arm/mach-bcm2708/include/mach/uncompress.h:51:3: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:104:19: note: expected 'const volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h: In function 'arch_decomp_setup':
arch/arm/mach-bcm2708/include/mach/uncompress.h:67:2: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h:70:2: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h:71:2: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h:74:2: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
In file included from arch/arm/boot/compressed/misc.c:33:0:
arch/arm/mach-bcm2708/include/mach/uncompress.h:78:4: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast [enabled by default]
In file included from include/linux/io.h:22:0,
from arch/arm/mach-bcm2708/include/mach/uncompress.h:22,
from arch/arm/boot/compressed/misc.c:33:
/usr/src/linux-rpi-3.8.y-temp/arch/arm/include/asm/io.h:88:20: note: expected 'volatile void *' but argument is of type 'int'
CC arch/arm/boot/compressed/decompress.o

Activity

  1. popcornmix commented on Apr 10, 2013

    @popcornmix
    Collaborator

    Is this causing a failure to build, or just warnings?
    This is purely an experimental tree, so making it compile without warnings isn't the highest priority.

  2. N8Fear commented on Apr 10, 2013

    @N8Fear

    They are just warnings, iirc - it's an relatively easy fix, though.Check the uncompress.h from my repo: https://github.com/N8Fear/rpi-sources/blob/e03d635a10600a2e08876234b6e9940e1e548fe2/arch/arm/mach-bcm2708/include/mach/uncompress.h

    It's just adding some explicit casts.

  3. popcornmix commented on Apr 10, 2013

    @popcornmix
    Collaborator

    @N8Fear
    I'm pretty sure the casts aren't the best solution. There's probably a kernel macro which will do what we want.
    I believe "volatile" is virtually banned when upstreaming kernel code (https://www.kernel.org/doc/Documentation/volatile-considered-harmful.txt)

  4. hvenzke commented on Apr 10, 2013

    @hvenzke
    Author

    Thats warnings at current compile the 3.8.4 in my PI Bseries ( 512M ram )

    Full compile take ~30h. No CrossCompiling.!!

    I just do "nohup make ; make zImage ; make modules ; &" .

    Let me call an tester of your Code :-) .

    Kernel Compile Violations - that I was tranied 20j ago starting with 0.4.2 series , shuold be reported.
    So i did...

    regards

  5. N8Fear commented on Apr 10, 2013

    @N8Fear

    @popcornmix
    I'm quite confident that it either doesn't matter (the underlying code makes extensive use of volatile even without the casting) or is even the right thing to do (as the code in question is implementing a barrier and therefore a construct that should ensure mutual exclusion. Because of that the use of volatile make sense to me as it ensures that the resulting binary uses the contents of the memory and not some cached values (to make sure that the value of the barrier is actually correct). There are cases in which the use of volatile simply is a necessity...

  6. hvenzke commented on Apr 10, 2013

    @hvenzke
    Author

    reopen #112 at kernel 3.8.4

    no warning and/or msg when CONFIG_USB_DWCOTG=m that this been not possible.

  7. hvenzke commented on Dec 22, 2013

    @hvenzke
    Author

    close , im using 3.11.6 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions