aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-11sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirkMarek Szyprowski1-0/+1
This patch enables SDHCI_QUIRK_NO_HISPD_BIT on Samsung SDHCI driver. This solves detection problems with some external SD cards. This change has been tested on S5PC100 and S5PC110. It has no inpact on driver speed. Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: add support for the non standard minimal clock valueMarek Szyprowski2-2/+28
S3C SDHCI host controller can change the source for generating mmc clock. By default host bus clock is used, what causes some problems on machines with 133MHz bus, because the SDHCI divider cannot be as high get proper clock value for identification mode. This is not a problem for the controller, because it can generate lower frequencies from other clock sources. This patch changes sdhci driver to use get_min_clock() call if it has been provided. This fixes the flood of the following warnings on Samsung S5PV210 SoCs: mmc0: Minimum clock frequency too high for identification mode Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-s3c: add SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirkHyuk Lee1-7/+3
On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need any more. Signed-off-by: Hyuk Lee <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Cc: Ben Dooks <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap hsmmc: fix processing of all dma interrupts as block completionVenkatraman S1-2/+5
If other informative interrupts are enabled for the DMA channel used by hsmmc, those are incorrectly treated as block completion. This patch lets only the block completion interrupt to be processed. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Madhusudhan Chikkature <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/mmc/host/msm-sdcc: remove dead config optionsChristian Dietrich2-29/+0
CONFIG_MMC_MSM7X00A_RESUME_IN_WQ and CONFIG_MMC_EMBEDDED_SDIO don't exist in Kconfig and is never defined anywhere else, therefore removing all references for it from the source code. Signed-off-by: Christian Dietrich <[email protected]> Acked-by: David Brown <[email protected]> Cc: Daniel Walker <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap: pandora: pass wl1251 information to SDIO coreGrazvydas Ignotas3-0/+21
Pandora has TI WL1251 attached on MMC3, which is non-standard SDIO chip. Make use MMC_QUIRK_NONSTD_SDIO to tell SDIO core about it. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11omap_hsmmc: add init_card pass-through callbackGrazvydas Ignotas2-0/+12
This will allow us to set up special cards in machine drivers just after they are detected by MMC core. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdio: allow non-standard SDIO cardsGrazvydas Ignotas2-6/+32
There are some chips (like TI WL12xx series) that can be interfaced over SDIO but don't support the SDIO specification, meaning that they are missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO implementation relies on those registers to identify and configure the card, so non-standard cards can not function and cause lots of warnings from the core when it reads invalid data from non-existent registers. After this patch, init_card() host callback can now set new quirk MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access any standard SDIO registers and rely on init_card() to fill all SDIO structures instead. As those cards are usually embedded chips, all the required information can be obtained from machine board files by the host driver when it's called through init_card() callback. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: add support for CNS3xxx SoC devicesAnton Vorontsov5-0/+114
There's nothing special, just SoC-specific ops and quirks. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: reorganize Makefile entries to support SoC devicesAnton Vorontsov1-1/+3
Due to build system limitations, intermediate and final objects can't have the same names. And as we're going to start building SoC-specific objects, let's rename the module to sdhci-platform, into which we'll link sdhci-pltfm and SoC-specifc objects. There should be no issue in renaming as the driver uses modalias mechanism. This is exactly the same approach as in sdhci-of driver. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci-pltfm: switch to module device table matchingAnton Vorontsov2-1/+27
Sometimes want to place SoC-specific parts alongside with the generic driver, and to do so, we have to switch the driver over to the module device table matching. Note that drivers/mmc/host/sdhci-pltfm.h is so far empty, but it'll hold SoC-specific driver data handlers soon. Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard R?jfors <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: omap: fix for bus width which improves SD card's peformance.Kishore Kadiyala1-2/+15
This patch improves low speeds for SD cards. OMAP-MMC controller's can support maximum bus width of '8'. when bus width is mentioned as "8" in controller data,the SD stack will check whether bus width is "4" and if not it will set bus width to "1" and there by degrading performance. This patch fixes the issue and improves the performance of SD cards. Signed-off-by: Kishore Kadiyala <[email protected]> Signed-off-by: Venkatraman S <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Acked-by: Madhusudhan Chikkature <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: only set blockaddressed for > 2GiB cardsHanumath Prasad1-1/+3
A non-zero value of SEC_COUNT does not indicate that the card is sector addressed. According to the MMC specification, cards with a density greater than 2GiB are sector addressed. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Hanumath Prasad <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: don't assign mmc->caps at SDHCI directlyKyungmin Park1-1/+1
Some host controllers can set mmc->caps before sdhci_add_host(). Signed-off-by: Kyungmin Park <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: 8-bit data transfer width supportKyungmin Park2-0/+6
Some host controllers such as s5pc110 support the WIDE8 feature. Signed-off-by: Kyungmin Park <[email protected]> Cc: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11sdhci: remove useless set_clock() checkKyungmin Park1-1/+1
When using QUIRK_NONSTANDARD_CLOCK, it checks the set_clock() function which is not used actually. So delete it. Signed-off-by: Kyungmin Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: make sdhci work with ricoh mmc controllerMaxim Levitsky3-1/+47
The current way of disabling it is not well tested by vendor and has all kinds of bugs that show up on resume from ram/disk. A very good example is a dead SDHCI controller. Old way of disabling is still supported by continuing to use CONFIG_MMC_RICOH_MMC. Based on 'http://list.drzeus.cx/pipermail/sdhci-devel/2007-December/002085.html' Therefore most of the credit for this goes to Andrew de Quincey Signed-off-by: Maxim Levitsky <[email protected]> Cc: Andrew de Quincey <[email protected]> Acked-by: Philip Langdale <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resumeMaxim Levitsky3-26/+64
If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to suspend, the card will be removed, therefore this patch doesn't change the behavior of this option. However the removal will be done by pm notifier, which runs while userspace is still not frozen and thus can freely use del_gendisk, without the risk of deadlock which would happen otherwise. Card detect workqueue is now disabled while userspace is frozen, Therefore if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during suspend, the removal will be detected as soon as userspace is unfrozen, again at the moment it is safe to call del_gendisk. Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate. [[email protected]: clean up function prototype] [[email protected]: fix CONFIG_PM-n linkage, small cleanups] [[email protected]: coding-style fixes] Signed-off-by: Maxim Levitsky <[email protected]> Cc: David Brownell <[email protected]> Cc: Alan Stern <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: implement SD-combo (IO+mem) supportMichal Miroslaw4-23/+134
Signed-off-by: Michal Miroslaw <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: split mmc_sd_init_card()Michal Miroslaw3-119/+186
This series adds support for SD combo cards to MMC/SD driver stack. SD combo consists of SD memory and SDIO parts in one package. Since the parts have a separate SD command sets, after initialization, they can be treated as independent cards on one bus. Changes are divided into two patches. First is just moving initialization code around so that SD memory part init can be called from SDIO init. Second patch is a proper change enabling SD memory along SDIO. I tried to move as much no-op changes to the first patch so that it's easier to follow the required changes to initialization flow for SDIO cards. This is based on Simplified SDIO spec v.2.00. The init sequence is slightly modified to follow current SD memory init implementation. Command sequences, assuming SD memory and SDIO indeed ignore unknown commands, are the same as before for both parts. This patch: Prepare for SD-combo (IO+mem) support by splitting SD memory card init and related functions. Signed-off-by: Michal Miroslaw <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: recognize CSD structureKyungmin Park3-7/+21
The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure version 3 and version 3 have to check the CSD_STRUCTURE byte in the EXT_CSD register. Also fix EXT_CSD revision message. [[email protected]: fix comment, per Chris Ball] Signed-off-by: Kyungmin Park <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: use kmalloc() to allocate fdmem if possibleChangli Gao1-34/+23
Use kmalloc() to allocate fdmem if possible. vmalloc() is used as a fallback solution for fdmem allocation. A new helper function __free_fdtable() is introduced to reduce the lines of code. A potential bug, vfree() a memory allocated by kmalloc(), is fixed. [[email protected]: use __GFP_NOWARN, uninline alloc_fdmem() and free_fdmem()] Signed-off-by: Changli Gao <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Tetsuo Handa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: clarify that nonseekable_open() will never failDmitry Torokhov1-1/+3
Signed-off-by: Dmitry Torokhov <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: John Kacur <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: O_* bit numbers uniqueness checkWu Fengguang2-2/+17
The O_* bit numbers are defined in 20+ arch/*, and can silently overlap. Add a compile time check to ensure the uniqueness as suggested by David Miller. Signed-off-by: Wu Fengguang <[email protected]> Cc: David Miller <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Al Viro <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Eric Paris <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Jamie Lokier <[email protected]> Cc: Andreas Schwab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: improve comment describing fget_light()Tony Battersby1-5/+14
Improve the description of fget_light(), which is currently incorrect about needing a prior refcnt (judging by the way it is actually used). Signed-off-by: Tony Battersby <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11virtio_9p.h: include linux/types.hRandy Dunlap1-0/+1
Add <linux/types.h> to <linux/virtio_9p.h> so that types are explicitly defined: linux/virtio_9p.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Randy Dunlap <[email protected]> Cc: Eric Van Hensbergen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers: scsi: use newly introduced hex_to_bin() methodAndy Shevchenko3-21/+19
Signed-off-by: Andy Shevchenko <[email protected]> Cc: Adaptec OEM Raid Solutions <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: James Smart <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/scsi: use memdup_userJulia Lawall1-8/+3
Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Doug Gilbert <[email protected]> Cc: Boaz Harrosh <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: remove private BIT macrosAndrew Morton2-4/+2
A couple of scsi drivers define a BIT() macro, duplicating the one in bitops.h. Cc: Jing Huang <[email protected]> Cc: Robert Love <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: fix bnx2i build errorsRandy Dunlap1-1/+2
bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET. Also move the dependencies together. The "depends" change fixes multiple build errors when CONFIG_NET is not enabled: ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "netlink_kernel_create" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "netlink_kernel_release" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "skb_pull" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "init_net" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "__alloc_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "netlink_broadcast" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "kfree_skb" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "skb_put" [drivers/scsi/scsi_transport_iscsi.ko] undefined! Signed-off-by: Randy Dunlap <[email protected]> Cc: Anil Veerabhadrappa <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: fix pmcraid build errorsRandy Dunlap1-1/+1
pmcraid should depend on NET since it uses netlink interfaces. This fixes multiple build errors when CONFIG_NET is not enabled: ERROR: "genl_register_family" [drivers/scsi/pmcraid.ko] undefined! ERROR: "genl_unregister_family" [drivers/scsi/pmcraid.ko] undefined! ERROR: "nla_put" [drivers/scsi/pmcraid.ko] undefined! ERROR: "init_net" [drivers/scsi/pmcraid.ko] undefined! ERROR: "__alloc_skb" [drivers/scsi/pmcraid.ko] undefined! ERROR: "netlink_broadcast" [drivers/scsi/pmcraid.ko] undefined! ERROR: "kfree_skb" [drivers/scsi/pmcraid.ko] undefined! ERROR: "skb_put" [drivers/scsi/pmcraid.ko] undefined! Signed-off-by: Randy Dunlap <[email protected]> Cc: Anil Ravindranath <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: use __uX types for headers exported to user spacePeter Korsgaard2-6/+6
Commit 9e4f5e29 ("FC Pass Thru support") exported a number of header files in include/scsi to user space, but didn't change the uX types to the userspace-compatible __uX types. Without that you'll get compile errors when including them - E.G.: include/scsi/scsi.h:145: error: expected specifier-qualifier-list before `u8' Signed-off-by: Peter Korsgaard <[email protected]> Cc: Boaz Harrosh <[email protected]> Cc: James Smart <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11bfa: wrong fcport H2I message tested in bfa_fcport_isr()Roel Kluin1-1/+1
It appears that the wrong fcport H2I message was tested Signed-off-by: Roel Kluin <[email protected]> Acked-by: Jing Huang <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/scsi/ch.c: don't use vprintk as macroJoe Perches1-43/+44
It's an exported symbol of kernel/printk.c Rename vprintk and dprintk macros to more common VPRINTK and DPRINTK Add do { } while(0) around macros Add level to VPRINTK so KERN_CONT can be used a couple of times. Signed-off-by: Joe Perches <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: bfa: correct onstack wait_queue_head declarationYong Zhang1-2/+2
Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy Signed-off-by: Yong Zhang <[email protected]> Cc: Jing Huang <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Roel Kluin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/scsi/qla2xxx/qla_os.c: fix continuation line formatsJoe Perches1-2/+2
String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output. Signed-off-by: Joe Perches <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: Anirban Chakraborty <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi/sd.c: quiet all sparse noiseH Hartley Sweeten1-6/+6
In sd_store_cache_type the symbol 'len' is declared twice. Remove the second declaration to quiet the following sparse warning. warning: symbol 'len' shadows an earlier one In sd_probe the variable 'index' is declared as a u32. This variable is used in a call to ida_get_new which is expecting an int *. Make the variable an int to quiet the following sparse warning. warning: incorrect type in argument 2 (different signedness) There are 4 symbols in the file that are not exported and produce the following sparse warnings. warning: symbol 'sd_cdb_cache' was not declared. Should it be static? warning: symbol 'sd_cdb_pool' was not declared. Should it be static? warning: symbol 'sd_read_protection_type' was not declared. Should it be static? warning: symbol 'sd_read_app_tag_own' was not declared. Should it be static? Make them static to quiet the warnings. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: James E.J. Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: remove superfluous NULL pointer check from scsi_kill_request()Bartlomiej Zolnierkiewicz1-6/+0
Dan's list included: drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced in initializer 'cmd' drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced before check 'cmd' We dereference cmd (and possible OOPS if cmd == NULL) before starting the request so just remove the superfluous debugging code altogether. [ bart: the potential NULL pointer dereference was finally fixed in (much later than mine) commit 03b1470 but my patch is still valid ] Reported-by: Dan Carpenter <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Eugene Teo <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/scsi/aic94xx/aic94xx_init.c: correct the size argument to kmallocJulia Lawall2-3/+3
In each case, the destination of the allocation has type struct **, so the elements of the array should have pointer type, not structure type. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @disable sizeof_type_expr@ type T; T **x; @@ x = <+...sizeof( - T + *x )...+> // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Rolf Eike Beer <[email protected]> Cc: Joe Perches <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11dc395x: decrease iteration for tag_number of max_command in start_scsi()Roel Kluin1-1/+1
The tag_number reaches dcb->max_command + 1 after the loop, but when the tag_number equals dcb->max_command an error message is already issued. The last iteration therefore appears obsolete. Signed-off-by: Roel Kluin <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11g_NCR5380: fix broken MMIO compilationOndrej Zary2-23/+26
The ifdefs are broken so the MMIO code is never compiled and so it's broken too. Fix them all. Untested as I don't have the hardware. Signed-off-by: Ondrej Zary <[email protected]> Reviewed-by: Andy Walls <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11g_NCR5380: remove misleading pnp error messageOndrej Zary1-3/+1
Remove misleading error message that appears after pnp card has been detected correctly. Signed-off-by: Ondrej Zary <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mpt fusion: convert to seq_fileAlexey Dobriyan2-142/+119
Convert everything except ->proc_info() stuff, it is done within separate ->proc_info path series. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in /proc entries" Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Eric Moore <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/message: move dereference after NULL testJulia Lawall2-3/+3
If the NULL test on dev->i2o_dev or i2o_dev is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: James Bottomley <[email protected]> Cc: Kashyap Desai <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11drivers/scsi: remove unnecessary NULL testJulia Lawall1-1/+0
At the point where cmnd is initialized, it is tested for NULL, so it doesn't have to be tested again here. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11NCR5380: bit MR_DMA_MODE set twice in NCR5380_transfer_dma()Roel Kluin1-1/+3
Besides keeping the line short, the second setting of the MR_DMA_MODE bit was removed. Signed-off-by: Roel Kluin <[email protected]> Cc: James Bottomley <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11gdth: unmap ccb_phys when scsi_add_host() fails in gdth_eisa_probe_one()Roel Kluin1-1/+1
unmap ccb_phys as well when scsi_add_host() fails Signed-off-by: Roel Kluin <[email protected]> Cc: Achim Leubner <[email protected]> Cc: James E.J. Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11osst: fix read buffer overflowRoel Kluin1-1/+2
Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin <[email protected]> Cc: Willem Riede <[email protected]> Cc: James E.J. Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11include/linux/fs.h: complete hexification of FMODE_* constantsAndrew Morton1-1/+1
One straggler which was missed due to merge ordering issues. Cc: Wu Fengguang <[email protected]> Cc: Eric Paris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11fix "hwmon: coretemp: update hotplug condition check"Andrew Morton1-3/+0
In commit 0dca94baeab4 ("hwmon: coretemp: update hotplug condition check") we merged v2 of this patch. Update that to v3. The difference is to remove the new and unnecesary references to CPU_*_FROZEN. Cc: "Rafael J. Wysocki" <[email protected]> Cc: Chen Gong <[email protected]> Cc: Rudolf Marek <[email protected]> Cc: Huaxu Wan <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Guenter Roeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>