summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-08-18drivers/w1/w1_int.c: call put_device if device_register failsLevente Kurusa
Currently, memsetting and kfreeing the device is bad behaviour. The device will have a reference count of 1 and hence can cause trouble because it has kfree'd. Proper way to handle a failed device_register is to call put_device right after it fails. Signed-off-by: Levente Kurusa <levex@linux.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-08-18drivers/gpio/gpio-zevio.c: fix buildAndrew Morton
Unbreak i386 allmodconfig. This is a hack - please fix properly ;) Cc: Fabian Vogt <fabian@ritter-vogt.de> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-08-18Merge branch 'akpm-current/current'Stephen Rothwell
2014-08-18staging: rtl8188eu: using unique names is goodStephen Rothwell
fixes: drivers/staging/built-in.o:(.opd+0xaab8): multiple definition of `rtl88e_phy_rf_config' drivers/net/built-in.o:(.opd+0x78840): first defined here drivers/staging/built-in.o:(.opd+0xa9f8): multiple definition of `rtl88e_download_fw' drivers/net/built-in.o:(.opd+0x781b0): first defined here drivers/staging/built-in.o: In function `.rtl88e_phy_rf_config': (.text+0xe0a00): multiple definition of `.rtl88e_phy_rf_config' drivers/net/built-in.o:(.text+0xe85a48): first defined here drivers/staging/built-in.o: In function `.rtl88e_download_fw': (.text+0xdf28c): multiple definition of `.rtl88e_download_fw' drivers/net/built-in.o:(.text+0xe6f330): first defined here drivers/staging/built-in.o: In function `.rtl88e_phy_mac_config': (.text+0xdf984): multiple definition of `.rtl88e_phy_mac_config' drivers/net/built-in.o:(.text+0xe84a8c): first defined here drivers/staging/built-in.o: In function `.rtl88e_phy_bb_config': (.text+0xdfa2c): multiple definition of `.rtl88e_phy_bb_config' drivers/net/built-in.o:(.text+0xe84d14): first defined here drivers/staging/built-in.o:(.opd+0xaa58): multiple definition of `rtl88e_phy_bb_config' drivers/net/built-in.o:(.opd+0x78828): first defined here drivers/staging/built-in.o:(.opd+0xaa28): multiple definition of `rtl88e_phy_mac_config' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2014-08-18Merge remote-tracking branch 'dma-buf/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'gpio/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'pinctrl/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'target-updates/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'scsi/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'staging/staging-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'leds/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'regmap/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'xen-tip/linux-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'irqchip/irqchip/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
Conflicts: arch/x86/kernel/cpu/perf_event_intel_uncore.c kernel/trace/trace.c
2014-08-18Merge remote-tracking branch 'spi/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'devicetree/devicetree/next'Stephen Rothwell
2014-08-18next-20140815/regulatorStephen Rothwell
2014-08-18Merge remote-tracking branch 'device-mapper/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'mtd/master'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'bluetooth/master'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'dmaengine/next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'libata/for-next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'v4l-dvb/master'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'pci/next'Stephen Rothwell
2014-08-18Merge remote-tracking branch 's390/features'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'staging.current/staging-linus'Stephen Rothwell
2014-08-18Merge remote-tracking branch 'net/master'Stephen Rothwell
2014-08-17irqchip: gic: Allow gic_arch_extn hooks to call into schedulerStephen Boyd
Commit 1a6b69b6548c (ARM: gic: add CPU migration support, 2012-04-12) introduced an acquisition of the irq_controller_lock in gic_raise_softirq() which can lead to a spinlock recursion if the gic_arch_extn hooks call into the scheduler (via complete() or wake_up(), etc.). This happens because gic_arch_extn hooks are normally called with the irq_controller_lock held and calling into the scheduler may cause us to call smp_send_reschedule() which will grab the irq_controller_lock again. Here's an example from a vendor kernel (note that the gic_arch_extn hook code here isn't actually in mainline): BUG: spinlock recursion on CPU#0, swapper/0/1 lock: irq_controller_lock+0x0/0x18, .magic: dead4ead, .owner: sw er_cpu: 0 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.10-00430-g3d433c4e Call trace: [<ffffffc000087e1c>] dump_backtrace+0x0/0x140 [<ffffffc000087f6c>] show_stack+0x10/0x1c [<ffffffc00064732c>] dump_stack+0x74/0xc4 [<ffffffc0006446c0>] spin_dump+0x78/0x88 [<ffffffc0006446f4>] spin_bug+0x24/0x34 [<ffffffc0000d47d0>] do_raw_spin_lock+0x58/0x148 [<ffffffc00064d398>] _raw_spin_lock_irqsave+0x24/0x38 [<ffffffc0002c9d7c>] gic_raise_softirq+0x2c/0xbc [<ffffffc00008daa4>] smp_send_reschedule+0x34/0x40 [<ffffffc0000c1e94>] try_to_wake_up+0x224/0x288 [<ffffffc0000c1f4c>] default_wake_function+0xc/0x18 [<ffffffc0000ceef0>] __wake_up_common+0x50/0x8c [<ffffffc0000cef3c>] __wake_up_locked+0x10/0x1c [<ffffffc0000cf734>] complete+0x3c/0x5c [<ffffffc0002f0e78>] msm_mpm_enable_irq_exclusive+0x1b8/0x1c8 [<ffffffc0002f0f58>] __msm_mpm_enable_irq+0x4c/0x7c [<ffffffc0002f0f94>] msm_mpm_enable_irq+0xc/0x18 [<ffffffc0002c9bb0>] gic_unmask_irq+0x40/0x7c [<ffffffc0000de5f4>] irq_enable+0x2c/0x48 [<ffffffc0000de65c>] irq_startup+0x4c/0x74 [<ffffffc0000dd2fc>] __setup_irq+0x264/0x3f0 [<ffffffc0000dd5e0>] request_threaded_irq+0xcc/0x11c [<ffffffc0000df254>] devm_request_threaded_irq+0x68/0xb4 [<ffffffc000471520>] msm_iommu_ctx_probe+0x124/0x2d4 [<ffffffc000337374>] platform_drv_probe+0x20/0x54 [<ffffffc00033598c>] driver_probe_device+0x158/0x340 [<ffffffc000335c20>] __driver_attach+0x60/0x90 [<ffffffc000333c9c>] bus_for_each_dev+0x6c/0x8c [<ffffffc000335304>] driver_attach+0x1c/0x28 [<ffffffc000334f14>] bus_add_driver+0x120/0x204 [<ffffffc0003362e4>] driver_register+0xbc/0x10c [<ffffffc000337348>] __platform_driver_register+0x5c/0x68 [<ffffffc00094c478>] msm_iommu_driver_init+0x54/0x7c [<ffffffc0000813ec>] do_one_initcall+0xa4/0x130 [<ffffffc00091d928>] kernel_init_freeable+0x138/0x1dc [<ffffffc000642578>] kernel_init+0xc/0xd4 We really just want to synchronize the sending of an SGI with the update of the gic_cpu_map[], so introduce a new SGI lock that we can use to synchronize the two code paths. Three main events are happening that we have to consider: 1. We're updating the gic_cpu_mask to point to an incoming CPU 2. We're (potentially) sending an SGI to the outgoing CPU 3. We're redirecting any pending SGIs for the outgoing CPU to the incoming CPU. Events 1 and 3 are already ordered within the same CPU by means of program order and use of I/O accessors. Events 1 and 2 don't need to be ordered, but events 2 and 3 do because any SGIs for the outgoing CPU need to be pending before we can redirect them. Synchronize by acquiring a new lock around event 2 and before event 3. Use smp_mb__after_unlock_lock() before event 3 to ensure that event 1 is seen before event 3 on other CPUs that may be executing event 2. We put this all behind the b.L switcher config option so that if we're not using this feature we don't have to acquire any locks at all in the IPI path. Cc: Nicolas Pitre <nico@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Nicolas Pitre <nico@linaro.org> Link: https://lkml.kernel.org/r/1407938238-21413-1-git-send-email-sboyd@codeaurora.org Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-08-17irqchip: crossbar: Off by one bugs in initDan Carpenter
My static checker complains that the ">" should be ">=" or else we go beyond the end of the cb->irq_map[] array on the next line. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-08-17irq: gic-v3: Tag all low level accessors __maybe_unusedMark Brown
This is only really needed for gic_write_sgi1r in the !SMP case since it is only referenced in the SMP initialisation code but it seems better to have these functions all next to each other and declared consistently. Signed-off-by: Mark Brown <broonie@linaro.org> Link: https://lkml.kernel.org/r/1406748194-21094-1-git-send-email-broonie@kernel.org Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-08-17irqchip: gic-v3: Only define gic_peek_irq() when building SMPMark Brown
If building with CONFIG_SMP disbled (for example, with allnoconfig) then GCC complains that the static function gic_peek_irq() is defined but not used since the only reference is in the SMP initialisation code. Fix this by moving the function definition inside the ifdef. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Link: https://lkml.kernel.org/r/1406480224-24628-1-git-send-email-broonie@kernel.org Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-08-17staging: dgnc: Remove unnecessary dgnc_Major_Control_Registered variableKonrad Zapalowicz
The dgnc_Major_Control_Registered variable purpose was to act as a flag to indicate if the character device has been successfully registered into the kernel. This flag was later checked in the module cleanup function to know if the character device needs to be deregistered. However the {device,class}_destroy and unregister_chrdev functions may be called with 'invalid' data perfectly fine. This means that this variable is not needed and can safely be removed which is what this commit does. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove not needed dgnc_driver_start variableKonrad Zapalowicz
The dgnc_driver_start variable purpose was to indicate if the driver 'start' routine has been called. Now, because the 'start' routine can only be called once this variable is not needed thus this commit removes it. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove driver-wide polling counter variableKonrad Zapalowicz
The polling counter variable is only exposed via sysfs and has no other purpose. Now, since the polling shall be implemented as a board specific feature rather than being global in the driver this counter is obsolete. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove driver-wide state variableKonrad Zapalowicz
This commit removes the driver's global state variable. This is ok because the state was changed only once at the end of init phase thus the future usage of this variable is pointless. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: android: fix attribute as suggested by checkpatchPurnendu Kapadia
we should use __packed attribute Signed-off-by: Purnendu Kapadia <pro8linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: wlan-ng: prism2mgmt.c Fix break not usefulJeshwanth Kumar N K
Fixed up warnings, break is not useful after return statement. And the exit Label is deleted, now returning inline. Signed-off-by: Jeshwanth Kumar N K <jeshkumar555@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: lustre: lustre: libcfs: pr_warn instead printkHema Prathaban
This patch fixes the following warning using checkpatch.pl WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: lustre: lustre: libcfs: do not use assignment in if conditionHema Prathaban
This patch fixes the following error using checkpatch.pl Error: do not use assignment in if condition Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre: get rid of obd_* typedefsOleg Drokin
We have a bunch of typedefs for common things that made no sense and hid the actual type from plain view. Replace them with proper uXX or sXX types. Exception is in lustre_idl.h where they are replaced with __uXX and __sXX to be able to be included in userspace Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre: get rid of seqno_t and mdsno_t typedefsOleg Drokin
seqno_t is u64 and mdsno_t is u32 so just use them as such. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: vt6655: Convert DBG_PRT to pr_<level>Joe Perches
DBG_PRT uses are unnecessarily complex. Convert DBG_PRT msglevel to pr_<level>. This changes the KERN_<level> type of several uses. It also enables dynamic_debug for the pr_debug conversions. This patch can be a prelude to converting these pr_<level> uses to dev_<level> as appropriate. Other changes: Realign arguments of these conversions. Remove now unused static int msglevel declarations. Remove now unused DBG_PRT #define. Compile tested only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: Fix integer overflow in ll_fid2pathOleg Drokin
Reported by Dan Carpenter <dan.carpenter@oracle.com> outsize = sizeof(*gfout) + gfin->gf_pathlen; Where outsize is int and gf_pathlen is u32 from userspace can lead to integer overflowwhere outsize is some small number less than sizeof(*gfout) Add a check for pathlen to be of sensical size. Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Reviewed-on: http://review.whamcloud.com/11412 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5476 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: optimize ll_fid2path()Frank Zago
The only parameter from userspace that matters is the length of the buffer. We don't need to allocate then import the whole structure. By importing only that length, we can save a memory allocation. Add sparse annotations to that function. Signed-off-by: frank zago <fzago@cray.com> Reviewed-on: http://review.whamcloud.com/11167 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5389 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: hold inode mutex around ll_setattr_raw()John L. Hammond
ll_setattr_raw() expects to be called with the inode mutex held so do when calling it from ll_hsm_import(). Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/11349 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5456 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/clio: reorder initialization in cl_req_alloc()John L. Hammond
In cl_req_alloc() ensure that the list heads crq_pages and crq_layers have been initialized before passing the request to cl_req_completion(). This fixes an oops in the error path. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/11009 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5290 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/ldlm: drop redundant ibits lock interoperability checkFan Yong
In very old release (older than Lustre-1.8), if the client talks with the server that does not support ibits lock, then the client needs to convert it as plain lock. Such interoperability check and convertion is out of date for a long time. Drop it. Signed-off-by: Fan Yong <fan.yong@intel.com> Reviewed-on: http://review.whamcloud.com/11004 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4971 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wangdi <di.wang@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: Make sure ft_flags is validPaul Cassella
In ll_fault0, the 'fault' struct is mostly cleared before the call to cl_io_loop, but ft_flags is not reset. It is ordinarily set by the call to filemap_fault in vvp_io_kernel_fault, but if Lustre returns before calling filemap_fault, it still has the old value of ft_flags. ll_fault0 will then consume the ft_flags field. If it has the VM_FAULT_RETRY bit set, it will be used as ll_fault0() and ll_fault()'s return value. This is a problem when VM_FAULT_RETRY is in ft_flags: When fault/filemap_fault return with that flag set, they have already released the mmap semaphore, and do_page_fault does not need to release it. Incorrectly returning this flag from ll_fault means mmap_sem is not upped in the kernel's do_page_fault(). In addition to clearing ft_flags, this patch does not use it unless it is valid. It's potentially misleading to return ft_flags in "fault_ret" if ft_flags has not been set by filemap_fault. This adds clarity, but does not change the current behavior: When not valid, ft_flags is replaced by fault_ret, which is zero, as is ft_flags when not set by filemap_fault. Signed-off-by: Patrick Farrell <paf@cray.com> Reviewed-on: http://review.whamcloud.com/10956 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5291 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>