On Thu, 01 Oct 2015 15:54:54 +0200, kbuild test robot wrote:
Hi Takashi,
[auto build test results on next-20151001 -- if it's inappropriate base, please ignore]
reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:23:16: sparse: cast to restricted __be32
sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:25:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:30:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32 sound/firewire/tascam/tascam.c:32:16: sparse: cast to restricted __be32
vim +23 sound/firewire/tascam/tascam.c
7 */ 8 9 #include "tascam.h" 10 11 MODULE_DESCRIPTION("TASCAM FireWire series Driver"); 12 MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>"); 13 MODULE_LICENSE("GPL v2"); 14 15 static int check_name(struct snd_tscm *tscm) 16 { 17 struct fw_device *fw_dev = fw_parent_device(tscm->unit); 18 char vendor[8]; 19 char model[8]; 20 __u32 data; 21 22 /* Retrieve model name. */
23 data = be32_to_cpu(fw_dev->config_rom[28]);
The code itself looks correct. data is CPU endian. The problem looks rather like that fw_dev->config_rom[] is u32.
Stefan, can it be changed to __be32 instead?
thanks,
Takashi