diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-06-26 14:58:29 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-25 23:16:56 +0200 |
commit | 4bfaa5c4b99ddec00907e854d70453bd2aef39a0 (patch) | |
tree | 11bb5fd52975b67546bf5739102f7cab55aedc57 /drivers/parisc | |
parent | NCR53c406a: don't call free_dma() by default (diff) | |
download | linux-4bfaa5c4b99ddec00907e854d70453bd2aef39a0.tar.xz linux-4bfaa5c4b99ddec00907e854d70453bd2aef39a0.zip |
3w-xxxx: fix mis-aligned struct accesses
Building an allmodconfig ARM kernel, I get multiple such
warnings because of a spinlock contained in packed structure
in the 3w-xxxx driver:
../drivers/scsi/3w-xxxx.c: In function 'tw_chrdev_ioctl':
../drivers/scsi/3w-xxxx.c:1001:68: warning: mis-aligned access used for structure member [-fstrict-volatile-bitfields]
timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout);
^
../drivers/scsi/3w-xxxx.c:1001:68: note: when a volatile object spans multiple type-sized locations, the compiler must choose between using a single mis-aligned access to preserve the volatility, or using multiple aligned accesses to avoid runtime faults; this code may fail at runtime if the hardware does not allow this access
The same bug apparently was present in 3w-sas and 3w-9xxx, but has been
fixed in the past. This patch uses the same fix by moving the pragma
in front of the TW_Device_Extension definition, so it only covers
hardware structures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Adam Radford <aradford@gmail.com>
Cc: Adam Radford <linuxraid@lsi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/parisc')
0 files changed, 0 insertions, 0 deletions