Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GIT feed28415e95fbfad6dae876e927622db253672e commit eb9672f4a14bb7058c44efcc31c89737a7724d2c Author: Daniel Borkmann <dborkman@redhat.com> Date: Thu May 1 18:34:20 2014 +0200 net: filter: misc/various cleanups This contains only some minor misc cleanpus. We can spare us the extra variable declaration in __skb_get_pay_offset(), the cast in __get_random_u32() is rather unnecessary and in __sk_migrate_realloc() we can remove the memcpy() and do a direct assignment of the structs. Latter was suggested by Fengguang Wu found with coccinelle. Also, remaining pointer casts of long should be unsigned long instead. Suggested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 30743837dd204d2b04fd4e9d3db78cc7b118c81a Author: Daniel Borkmann <dborkman@redhat.com> Date: Thu May 1 18:34:19 2014 +0200 net: filter: make register naming more comprehensible The current code is a bit hard to parse on which registers can be used, how they are mapped and all play together. It makes much more sense to define this a bit more clearly so that the code is a bit more intuitive. This patch cleans this up, and makes naming a bit more consistent among the code. This also allows for moving some of the defines into the header file. Clearing of A and X registers in __sk_run_filter() do not get a particular register name assigned as they have not an 'official' function, but rather just result from the concrete initial mapping of old BPF programs. Since for BPF helper functions for BPF_CALL we already use small letters, so be consistent here as well. No functional changes. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 5bcfedf06f7fdf9efcf65dc11198e9012f7530f4 Author: Daniel Borkmann <dborkman@redhat.com> Date: Thu May 1 18:34:18 2014 +0200 net: filter: simplify label names from jump-table This patch simplifies label naming for the BPF jump-table. When we define labels via DL(), we just concatenate/textify the combination of instruction opcode which consists of the class, subclass, word size, target register and so on. Each time we leave BPF_ prefix intact, so that e.g. the preprocessor generates a label BPF_ALU_BPF_ADD_BPF_X for DL(BPF_ALU, BPF_ADD, BPF_X) whereas a label name of ALU_ADD_X is much more easy to grasp. Pure cleanup only. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit f6a082fed1e6407c2f4437d0d963b1bcbe5f9f58 Author: John Fastabend <john.fastabend@gmail.com> Date: Thu May 1 09:23:06 2014 -0700 net: sched: lock imbalance in hhf qdisc hhf_change() takes the sch_tree_lock and releases it but misses the error cases. Fix the missed case here. To reproduce try a command like this, # tc qdisc change dev p3p2 root hhf quantum 40960 non_hh_weight 300000 Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit dfee07cceff94af498a8465353554e0b63c3b152 Author: Alexei Starovoitov <ast@plumgrid.com> Date: Thu May 1 08:16:03 2014 -0700 net: filter: doc: expand and improve BPF documentation In particular, this patch tries to clarify internal BPF calling convention and adds internal BPF examples, JIT guide, use cases. Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit a3464ed2f14d19ba923930f7c0c284499d64eb5b Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Tue Apr 15 17:00:03 2014 +0200 ata: ahci_mvebu: new driver for Marvell Armada 380 AHCI interfaces The Marvell Armada 380 SoC includes two AHCI compatible interfaces. However, like all DMA-capable Marvell interface, they require special handling to configure MBus windows. Therefore, this commit adds a new ahci_mvebu driver, which relies on the libahci_platform.c code recently introduced. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Tejun Heo <tj@kernel.org> commit 5799d6d4cf86c11503aee909a1ec555453c7f22a Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Tue Apr 15 17:00:02 2014 +0200 Documentation: dt-bindings: reformat and order list of ahci-platform compatibles The ahci-platform.txt Device Tree binding documentation is gaining a growing number of compatible strings, and it will gain one more with the addition of the Marvell Armada 380 AHCI support. It is therefore time to reformat this list into a proper bullet list, and more importantly order it alphabetically; Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Tejun Heo <tj@kernel.org> commit f5f3cf6f7e49b9529fc00a2c4629fa92cf2755fe Author: Aristeu Rozanski <aris@redhat.com> Date: Thu Apr 24 15:33:21 2014 -0400 device_cgroup: fix the comment format for recently added functions Moving more extensive explanations to the end of the comment. Cc: Li Zefan <lizefan@huawei.com> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Tejun Heo <tj@kernel.org> commit 15a4c835e4ed3e60dd68727cd1907e3dd89563f4 Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:14 2014 -0400 cgroup, memcg: implement css->id and convert css_from_id() to use it Until now, cgroup->id has been used to identify all the associated csses and css_from_id() takes cgroup ID and returns the matching css by looking up the cgroup and then dereferencing the css associated with it; however, now that the lifetimes of cgroup and css are separate, this is incorrect and breaks on the unified hierarchy when a controller is disabled and enabled back again before the previous instance is released. This patch adds css->id which is a subsystem-unique ID and converts css_from_id() to look up by the new css->id instead. memcg is the only user of css_from_id() and also converted to use css->id instead. For traditional hierarchies, this shouldn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Jianyu Zhan <nasa4836@gmail.com> Acked-by: Li Zefan <lizefan@huawei.com> commit ddfcadab35dda6e5bc23ccf1c3055ecb63a71e49 Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:14 2014 -0400 cgroup: update init_css() into init_and_link_css() init_css() takes the cgroup the new css belongs to as an argument and initializes the new css's ->cgroup and ->parent pointers but doesn't acquire the matching reference counts. After the previous patch, create_css() puts init_css() and reference acquisition right next to each other. Let's move reference acquistion into init_css() and rename the function to init_and_link_css(). This makes sense and is easier to follow. This makes the root csses to hold a reference on cgrp_dfl_root.cgrp, which is harmless. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> commit a2bed8209a3afc3b2cf1c28383fb48155c1fea46 Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:14 2014 -0400 cgroup: use RCU free in create_css() failure path Currently, when create_css() fails in the middle, the half-initialized css is freed by invoking cgroup_subsys->css_free() directly. This patch updates the function so that it invokes RCU free path instead. As the RCU free path puts the parent css and owning cgroup, their references are now acquired right after a new css is successfully allocated. This doesn't make any visible difference now but is to enable implementing css->id and RCU protected lookup by such IDs. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> commit 6fa4918d03c39351aef3573ac3e7958d6a5ad9b6 Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:13 2014 -0400 cgroup: protect cgroup_root->cgroup_idr with a spinlock Currently, cgroup_root->cgroup_idr is protected by cgroup_mutex, which ends up requiring cgroup_put() to be invoked under sleepable context. This is okay for now but is an unusual requirement and we'll soon add css->id which will have the same problem but won't be able to simply grab cgroup_mutex as removal will have to happen from css_release() which can't sleep. Introduce cgroup_idr_lock and idr_alloc/replace/remove() wrappers which protects the idr operations with the lock and use them for cgroup_root->cgroup_idr. cgroup_put() no longer needs to grab cgroup_mutex and css_from_id() is updated to always require RCU read lock instead of either RCU read lock or cgroup_mutex, which doesn't affect the existing users. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> commit 7d699ddb2b181a2c76e5ea18b1bdf102c4bebe4b Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:13 2014 -0400 cgroup, memcg: allocate cgroup ID from 1 Currently, cgroup->id is allocated from 0, which is always assigned to the root cgroup; unfortunately, memcg wants to use ID 0 to indicate invalid IDs and ends up incrementing all IDs by one. It's reasonable to reserve 0 for special purposes. This patch updates cgroup core so that ID 0 is not used and the root cgroups get ID 1. The ID incrementing is removed form memcg. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Li Zefan <lizefan@huawei.com> commit 69dfa00ccb72a37f3810687ca110e5a8154c6eed Author: Tejun Heo <tj@kernel.org> Date: Sun May 4 15:09:13 2014 -0400 cgroup: make flags and subsys_masks unsigned int There's no reason to use atomic bitops for cgroup_subsys_state->flags, cgroup_root->flags and various subsys_masks. This patch updates those to use bitwise and/or operations instead and converts them form unsigned long to unsigned int. This makes the fields occupy (marginally) smaller space and makes it clear that they don't require atomicity. This patch doesn't cause any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> commit e783c51cce94521c10e599e991acdcfd9a996c4a Author: Shawn Guo <shawn.guo@freescale.com> Date: Sun May 4 21:48:06 2014 +0800 ahci: imx: software workaround for phy reset issue in resume When suspending imx6q systems which have rootfs on SATA, the following error will likely be seen in resume. The SATA link will fail to come up, and it results in an unusable system across the suspend/resume cycle. $ echo mem > /sys/power/state PM: Syncing filesystems ... done. PM: Preparing system for mem sleep Freezing user space processes ... (elapsed 0.002 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. PM: Entering mem sleep sd 0:0:0:0: [sda] Synchronizing SCSI cache sd 0:0:0:0: [sda] Stopping disk PM: suspend of devices complete after 61.914 msecs PM: suspend devices took 0.070 seconds PM: late suspend of devices complete after 4.906 msecs PM: noirq suspend of devices complete after 4.521 msecs Disabling non-boot CPUs ... CPU1: shutdown CPU2: shutdown CPU3: shutdown Enabling non-boot CPUs ... CPU1: Booted secondary processor CPU1 is up CPU2: Booted secondary processor CPU2 is up CPU3: Booted secondary processor CPU3 is up PM: noirq resume of devices complete after 10.486 msecs PM: early resume of devices complete after 4.679 msecs sd 0:0:0:0: [sda] Starting disk PM: resume of devices complete after 22.674 msecs PM: resume devices took 0.030 seconds PM: Finishing wakeup. Restarting tasks ... done. $ ata1: SATA link down (SStatus 1 SControl 300) ata1: SATA link down (SStatus 1 SControl 300) ata1: limiting SATA link speed to 1.5 Gbps ata1: SATA link down (SStatus 1 SControl 310) ata1.00: disabled ata1: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen t4 ata1: irq_stat 0x00000040, connection status changed ata1: SError: { CommWake DevExch } ata1: hard resetting link sd 0:0:0:0: rejecting I/O to offline device sd 0:0:0:0: killing request sd 0:0:0:0: rejecting I/O to offline device Aborting journal on device sda2-8. sd 0:0:0:0: rejecting I/O to offline device EXT4-fs warning (device sda2): ext4_end_bio:317: I/O error writing to inode 132577 (offset 0 size 0 starting block 26235) Buffer I/O error on device sda2, logical block 10169 ... It's caused by a silicon issue that SATA phy does not get reset by controller when coming back from LPM. The patch adds a software workaround for this issue. It enforces a software reset on SATA phy in imx_sata_enable() function, so that we can ensure SATA link will come up properly in both power-on and resume. The software reset is implemented by writing phy reset register through the phy control register bus interface. Functions imx_phy_reg_[addressing|write|read]() implement this bus interface, while imx_sata_phy_reset() performs the actually reset operation. Signed-off-by: Richard Zhu <r65037@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org> commit 24a9ad5b82929cdeaff70018d82263de0c34c45d Author: Shawn Guo <shawn.guo@freescale.com> Date: Sun May 4 21:48:05 2014 +0800 ahci: imx: add namespace for register enums Update register enums a little bit to add proper namespace prefix, and have the names match i.MX reference manual. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org> commit 8612b4b4f964b935029c3388c8484a66e41bf71e Author: Paul Bolle <pebolle@tiscali.nl> Date: Sun May 4 13:50:29 2014 +0200 libata-sff: remove dead code Ever since v2.6.19 the code contains a check for CONFIG_NO_ATA_LEGACY. But that macro has never been defined. Apparently no one ran into problems on platforms that do not support compatibility mode. So remove this code that has been dead for over seven years. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Tejun Heo <tj@kernel.org> commit 84d93b5e605324679cffb6d28c7339dd18165fd4 Author: Sebastian Reichel <sre@kernel.org> Date: Fri Sep 20 22:42:22 2013 +0200 HSI: hsi-char: fix driver for multiport scenarios Fix return code check of alloc_chrdev_region, which returns 0 on success. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> commit 56459ea9aada1ba228cd0dd75accb56b95e07d73 Author: Sebastian Reichel <sre@kernel.org> Date: Fri Mar 28 19:57:59 2014 +0100 MAINTAINERS: update HSI entry Add git tree for hsi subsystem, update Sebastian Reichel's e-mail address and add Documentation/hsi.txt as maintained file. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> commit 3a8ab8af08cad8d3cf1ceff7e5a5da365ac6b63e Author: Sebastian Reichel <sre@kernel.org> Date: Sat Mar 1 01:07:54 2014 +0100 Documentation: HSI: Add some general description for the HSI subsystem Add a document, which gives a rough introduction about what HSI is and how its handled by the Linux kernel. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> commit 16ce8a30e6102d7aabd4e4518d255f330290fa3f Author: David S. Miller <davem@davemloft.net> Date: Sat May 3 22:25:33 2014 -0700 sparc64: Normalize NMI watchdog logging and behavior. Bring this code in line with the perf based generic NMI watchdog in kernel/watchdog.c (which we should convert over to at some point). In particular, don't do anything super fancy when the watchdog triggers, and specifically don't do a do_exit() which only makes things worse. Either panic(), or WARN(). The latter of which will do all of the actions such as give us a stack backtrace. Signed-off-by: David S. Miller <davem@davemloft.net> commit caec4ba8ff360f094e5a80e938ba0946bbe6b5f5 Author: Fabian Frederick <fabf@skynet.be> Date: Sat May 3 22:28:43 2014 +0200 fs/locks.c: replace seq_printf by seq_puts Replace seq_printf where possible Cc: Jeff Layton <jlayton@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jeff Layton <jlayton@poochiereds.net> commit 09c3fbba88b444f5e46702cc90fd014d2df7b36d Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:32 2014 +0530 staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf Instead of using pbuf to pass sbk data pointer to usb_fill_bulk_urb(), we can use precvbuf->pskb->data to do that. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit acfd19e70701dd1ba49653193eab88e379572e92 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:31 2014 +0530 staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function rtl8188eu_init_recvbuf() function definition is empty now, so remove it. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit a1f3b3fdba2ab124c1e8c2b6aa17cfcf5c99d756 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:30 2014 +0530 staging: rtl8188eu: Remove 'u32 ref_cnt' from struct recv_buf Driver isn't making any use of value stored in variable ref_cnt. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 74e250e479cb79b0cd58a810ed1a6f630877b4ad Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:29 2014 +0530 staging: rtl8188eu: Remove 'u32 len' from struct recv_buf Remove unused variable 'u32 len'. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 1b2a4fc7a55415a7afc5baa21986dbd25345e782 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:28 2014 +0530 staging: rtl8188eu: Remove 'alloc_sz' from struct recv_buf Driver isn't making any use of value stored in alloc_sz variable. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit f0f4499d703d73c8c9dac77e3fff9cd71c04db9a Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:27 2014 +0530 staging: rtl8188eu: Remove 'pallocated_buf' from struct recv_buf pallocated_buf is not being used by driver. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit e205cae24d0845b39502dafc3c3abe4b265035d3 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:26 2014 +0530 staging: rtl8188eu: Remove 'irp_pending' from struct recv_buf irp_pending is initialized to false inside rtw_os_recvbuf_resource_alloc() and value of irq_pending never changed after that, so 'if (!precvbuf->irp_pending)' inside rtw_os_read_port() function will be always true. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit c11f3fff320540e7d84a3bbb2d7d3918465589b5 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:25 2014 +0530 staging: rtl8188eu: Remove pdata, phead, ptail and pend from struct recv_buf Driver is not making use of value stored in removed variables. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit afdd36ef9cb0392a701ee8940d1d9f7e01735643 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:24 2014 +0530 staging: rtl8188eu: Remove 'int transfer_len' from struct recv_buf Driver is not making any use of value stored in this variable. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 498562560a351cd483bc5d6013a6a33c70e15043 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:23 2014 +0530 staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' from struct recv_buf Remove unused variable dma_transfer_addr. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 4337ff2f8fed9230af7acb447f8c1e5a82087d97 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:22 2014 +0530 staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' from struct recv_buf recvbuf_lock is initialized inside rtl8188eu_init_recv_priv() but never used. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 9a4429ea62834d4e5e4e677b11b64a881da99b99 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:21 2014 +0530 staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf Users of 'struct list_head list' variable e.g. rtw_enqueue_recvbuf(), rtw_enqueue_recvbuf_to_head() and rtw_dequeue_recvbuf() are already removed. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 5fe2f910f44a49856245a79b7e4d711d4d9ce670 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:20 2014 +0530 staging: rtl8188eu: Remove function rtw_enqueue_recvbuf() rtw_enqueue_recvbuf() is not being used by driver. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 0521a2a6f9bceca23b38a8cad76ffa0e381600e2 Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:19 2014 +0530 staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head() rtw_enqueue_recvbuf_to_head() is not being used by driver. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit d27ab0b9df6c2961da5d814e5f183318a1489c9c Author: navin patidar <navin.patidar@gmail.com> Date: Sat May 3 17:15:18 2014 +0530 staging: rtl8188eu: Remove function rtw_dequeue_recvbuf() rtw_dequeue_recvbuf() is not being used by driver. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit b9fb433072ebeffe9ae30c819f8032e8583d16fe Author: Jan Moskyto Matejka <mq@suse.cz> Date: Wed Apr 30 15:22:17 2014 +0200 rtl8821ae: fixed defined-not-used warning by cleaning up BT_AUTO_REPORT_ONLY_8192E_2ANT (always set to 0, never used as constant) halbtc8192e2ant_iswifi_status_changed was called only from the unused code Signed-off-by: Jan Moskyto Matejka <mq@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 2930d0b977e6b9f66e8f090c685a18991944fca6 Author: Rui Miguel Silva <rmfrfs@gmail.com> Date: Mon Apr 28 12:12:54 2014 +0100 staging: rtl8192u: fix checkpatch braces warning fix some code style related to the use of braces in a one statement block Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 7626e3d0d4731ccd3f556533b93c4cd3e8cbf5e6 Author: Dominique van den Broeck <domdevlin@free.fr> Date: Sun Apr 27 19:11:15 2014 +0200 staging/rtl8192e: Erroneous return codes (types and values) This function returns a bool, that is supposed to be false when something goes wrong. It's assumed this way by its lone calling function (which is SetRFPowerState8190(), line 1445 of rtl8192e/rtl8192e/r8192E_phy.c) Despite of this, this procedure returns non-null enumerations values or negative codes instead. This patch fixes this. Signed-off-by: Dominique van den Broeck <domdevlin@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 73fbfbfecbeb7c8642dd96a12ef991881492f051 Author: navin patidar <navin.patidar@gmail.com> Date: Tue Apr 29 06:55:13 2014 +0530 staging: rtl8188eu: Use USB subsystem functions to check endpoint type Use inline functions provided by USB subsystem to check endpoint type, instead of inline functions implemented by driver to do the same. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 213351448f9dc5f43f155cb23ab9fafe8a9577ed Author: navin patidar <navin.patidar@gmail.com> Date: Tue Apr 29 06:55:12 2014 +0530 staging: rtl8188eu: Remove debugging messages from usb_dvobj_init() Unnecessary debugging messages are removed from usb_dvobj_init(). Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 5f888cb7b1722412170728df2c9168d47596459c Author: Thomas Vegas <thomas_75@safe-mail.net> Date: Tue Apr 1 18:29:37 2014 +0200 staging: serqt_usb2: Clean up initializations of variables Use a more common kernel coding style. Signed-off-by: Thomas Vegas <thomas_75@safe-mail.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit f5a7856ec94ce0c1aeeac841d3fa05853f5f53fb Author: Thomas Vegas <thomas_75@safe-mail.net> Date: Tue Apr 1 18:28:33 2014 +0200 staging: serqt_usb2: Add blank line after declaration Use a more common kernel coding style. Signed-off-by: Thomas Vegas <thomas_75@safe-mail.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit c46e961e5ad19d5595dfe07d77c26eced8093ec9 Author: Thomas Vegas <thomas_75@safe-mail.net> Date: Tue Apr 1 18:27:34 2014 +0200 staging: serqt_usb2: Remove useless variable Use a more common kernel coding style. Signed-off-by: Thomas Vegas <thomas_75@safe-mail.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 482f0a21904583923d5c37f84586839c026a734b Author: Ian Abbott <abbotti@mev.co.uk> Date: Fri May 2 13:50:14 2014 +0100 staging: comedi: remove async parameter from resize_async_buffer() The `struct comedi_async *async` parameter of `resize_async_buffer()` is redundant as its value can be easily derived from the `struct comedi_subdevice *s` parameter as `s->async`. Remove the parameter. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 0ce016d0986ae618e0686489ad7b858fa13b885d Author: Ian Abbott <abbotti@mev.co.uk> Date: Fri May 2 13:50:13 2014 +0100 staging: comedi: remove redundant pointer dereference in comedi_poll() `s->async->subdevice` in `comedi_poll()` points to the same `struct comedi_subdevice` as `s`, so the double pointer reference is redundant. Just use `s`. (`s->async->subdevice` is initialized by `__comedi_device_postconfig_async()` in "drivers/staging/comedi/drivers.c" and doesn't change.) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 6e2954e801d7d93fe6f54eff988ddf25836fee0a Author: Ian Abbott <abbotti@mev.co.uk> Date: Thu May 1 17:38:24 2014 +0100 staging: comedi: amplc_dio200_common: correct bound on counter mode For the mode configured by the `INSN_CONFIG_SET_COUNTER_MODE` comedi instruction for the counter subdevice channels supported by this module, the upper bound should be `I8254_MODE5 | I8254_BCD` ((5 << 1) | 1) rather than `I8254_MODE5 | I8254_BINARY` ((5 << 1) | 0). Fix it. Reported-by: Hartley Sweeten <HartleyS@visionengravers.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 7d52477ef5e66a43fe54e5737179e4e670db260d Author: Ian Abbott <abbotti@mev.co.uk> Date: Thu May 1 17:38:23 2014 +0100 staging: comedi: drivers: correct mode check for i8254_set_mode() The upper bound check on the `mode` parameter of `i8254_set_mode()` and `i8254_mm_set_mode()` is incorrect. The `mode` parameter value consists of a mode number in the range 0 to 5 in bits 3..1 {represented by the constants `I8254_MODE0` (0 << 1) through to `I8254_MODE5` (2 << 1)} ORed with a BCD/binary flag in bit 0 {represented by the constants `I8254_BINARY` (0) and `I8254_BCD` (1)}. The maximum allowed value ought to be `I8254_MODE5 | I8254_BCD` ((5 << 1) | 1), but is currently `I8254_MODE5 | I8254_BINARY` ((5 << 1) | 0). Fix it. None of the comedi drivers use `I8254_BCD` but some of the low-level drivers allow user-space to configure the counter mode, so all legal values ought to be allowed. However, it's pretty unlikely anyone would want to set the counters to count in BCD (binary coded decimal) so the bug is not that significant. Reported-by: Hartley Sweeten <HartleyS@visionengravers.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit a1f6c2afed3f4c96194f131373b1e914b285c76b Author: Luca Ellero <luca.ellero@brickedbrain.com> Date: Wed Apr 30 11:22:07 2014 +0200 staging: comedi: fix checkpatch warnings Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 8383b8c4a9b81ad5fa446a9b4c9bd5ac4b382c2a Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:59 2014 -0700 staging: comedi: das16: clarify 8254 timer programming Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit bef74ba884be09144f13b7132c060c2e5b0ec415 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:58 2014 -0700 staging: comedi: das16m1: clarify 8254 timer programming Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 22e09dff089fe93d6e3ef7cc0fb8f645a87153c6 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:57 2014 -0700 staging: comedi: ni_at_a2150: clarify 8254 timer programming Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit e74e98993da8dff62190c937d4371eda962e64b9 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:56 2014 -0700 staging: comedi: ni_labpc: fix 8254 timer programming As pointed out by Ian Abbott, the i8254_load() function does not use the I8254_MODE* values to specify the "mode". The labpc_counter_load() function in this driver is passed an I8254_MODE* value so we need to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load() to program the timers. The calls to labpc_counter_load() will not fail so change the return to void and remove all the unnecessary error handling. Similarly, change the return type of labpc_counter_set_mode() to void and remove the unnecessary error handling. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 52c9e62cf3247cb0599197e7a27356e6a2513a80 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:55 2014 -0700 staging: comedi: das800: clarify 8254 timer programming Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. The das800_set_frequency() function will not fail. For aesthetics change the return to a void and remove the error handling. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 90c32ce300fb79f45d55803bc021c4e49ed9b85f Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:54 2014 -0700 staging: comedi: amplc_pci244: clarify 8254 timer programming Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit e72f7ad46e73b5cd372cdf6834d0dd0e0000d7ad Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:53 2014 -0700 staging: comedi: me4000: fix 8254 timer programming As pointed out by Ian Abbott, the i8254_load() function does not use the I8254_MODE* values to specify the "mode". Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Also, use the CR_CHAN() macro to make sure the only the channel is used in the insh->chanspec to specify the counter number. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 4f161fc756a086f56b200a5a9e7ef60c28265a4c Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:52 2014 -0700 staging: comedi: ni_at_ao: fix 8254 timer programming As pointed out by Ian Abbott, the i8254_load() function does not use the I8254_MODE* values to specify the "mode". Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit d7c0dcb65abda2842a1bff678a5297ed68431421 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:51 2014 -0700 staging: comedi: pcl711: fix 8254 timer programming As pointed out by Ian Abbott, the i8254_load() function does not use the I8254_MODE* values to specify the "mode". Refactor the 8254 timer programming to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_MODE* defines to clarify the code. For aesthetics, factor the timer programming out as a separate function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 241f1c96441f7539459f159a099115a6d21e9f3e Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:50 2014 -0700 staging: comedi: hwdrv_apci3120: remove clearing of 'b_OutputMemoryStatus' This private data member is not used by this driver. Remove the unnecessary clearing of it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 204563198e729cb9c12131a77a1bfdeaacd2a497 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:49 2014 -0700 staging: comedi: hwdrv_apci3120: fix 'b_AiCyclicAcquisition' usage This private data member is set when an analog input async command is started by apci3120_cyclic_ai() and cleared when the command finishes or is canceled. Rename the CamelCase member to 'ai_running' and convert it to a bit-field flag. Remove the unnecessary clearing of the flag before or after calling apci3120_cancel(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit a19f71615875b207813fee32db983903a0ec5729 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:48 2014 -0700 staging: comedi: hwdrv_apci3120: cmd->convert_src is always TRIG_TIMER The (*do_cmdtest) validates that the cmd->convert_src can only be TRIG_TIMER. Remove the unnecessay checks. THis also simplifies the (*do_cmd) a bit since "mode 3" (whatever that is) is never a valid mode. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 2f673c5d10511e790de97ab885878cbad1678245 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:47 2014 -0700 staging: comedi: addi_common.h: remove 'b_AiContinuous' from private data This member of the private data can be determined by checking the cmd->stop_src. Do that instead. Fix the b_AiContinuous check in apci3120_ai_cmd(). The (*do_cmdtest) validates that the cmd->stop_arg os >= 1 for TRIG_COUNT and 0 for TRIG_NONE. The correct test to set this flag is (cmd->stop_src == TRIG_NONE). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit eaca0032f1b5be78b0e8fe55934fd8db5d95d2d1 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:46 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiNbrofScans' from private data This member of the private data is a copy of the cmd->stop_arg. Use that instead. Fix the b_AiContinuous check in apci3120_ai_cmd(). The (*do_cmdtest) validates that the cmd->stop_arg os >= 1 for TRIG_COUNT and 0 for TRIG_NONE. The correct test to set this flag is (cmd->stop_src == TRIG_NONE). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 5d6babe36ef3f2cc8cd3a2cef2fdb8bf4c144ed4 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:45 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiDataLength' from private data This member of the private data is a copy of the s->async->prealloc_bufsz. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit a1b986e88976e2ca566fa2726c2346b5fbd1903c Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:44 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiTimer1' from private data This member of the private data is a copy of the cmd->scan_begin_arg. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 596c5a6e76eb1e24e049d85795050fd0ad20b947 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:43 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiTimer0' from private data This member of the private data is a copy of the cmd->convert_arg. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit bda88cd47559348d747dcf4741c6067e1348fa3c Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:42 2014 -0700 staging: comedi: addi_common.h: remove 'pui_AiChannelList' from private data This member of the private data is a copy of the cmd->chanlist. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 72af0c4ed598419b908f12307cdac7151f622209 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:41 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiScanLength' from private data This member of the private data is a copy of the cmd->scan_end_arg. Use that instead. Use a local variable in apci3120_cyclic_ai() for the DMA 'scan_bytes', which is the cmd->scan_end_arg * 2. Replace the open-coded '2' with sizeof(short). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit ffadead4e67899fd9ca0e33ce1a6bb1453e8b091 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:40 2014 -0700 staging: comedi: addi_common.h: remove 'ui_AiFlags' from private data This member of the private data is a copy of the cmd->flags. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 7586fd6b3e2df042ce2b45cf4ab43a92af1a27ac Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:39 2014 -0700 staging: comedi: amplc_pci230: remove 'ao_continuous' from private data This member of the private data can be determined by checking the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit bca4eac8fd36e8ab2990d513a9d6a34d2a5bd502 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:38 2014 -0700 staging: comedi: amplc_pci230: remove 'ai_continuous' from private data This member of the private data can be determined by checking the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 96410e7a3316a61ec509865ec76e7d033f8096eb Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:37 2014 -0700 staging: comedi: amplc_pci224: remove 'ai_stop_continuous' from private data This member of the private data can be determined by checking the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 56e781203f055e93e2ff510d87a986e2b367c071 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:36 2014 -0700 staging: comedi: addi_apci_2032: tidy up cmd use in apci2032_interrupt() Use a local variable for the comedi_cmd and tidy up this function a bit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit f1c51faabc4d974cd118603e237aa5381437e634 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:35 2014 -0700 staging: comedi: adl_pci9111: tidy up (*do_cmdtest) Step 4 This step in the (*do_cmdtest) fixes the comedi_cmd arguments, usually for TRIG_TIMER sources. Tidy up this step to clarify the code and remove the extra local variables. All the arguments are unsigned long so change the 'tmp' local variable type and rename it for aesthetics. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 8412a96127d2866a78dc8d73eeaedac688977f4f Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:34 2014 -0700 staging: comedi: 8253.h: remove the unused i8253_cascade_ns_to_timer_*() None of the comedi drivers use the i8253_cascade_ns_to_timer_2div_old() or i8253_cascade_ns_to_timer_power() helpers to calculate the cascaded divisors. Remove them to avoid any confusion. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit d33f88581d2bb06470cb12eb048d70ebdec6fee2 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:33 2014 -0700 staging: comedi: 8253.h: rename i8253_cascade_ns_to_timer_2div() All of the comedi drivers use the i8253_cascade_ns_to_timer macro when calculating the divisors for the cascaded timers. This macro just causes the i8253_cascade_ns_to_timer_2div() inline to be used. Rename i8253_cascade_ns_to_timer_2div() and remove the macro. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 1265c22fc8575e857f0a0573db263b507988f420 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:32 2014 -0700 staging: comedi: das1800: don't calc pacer divisors twice The analog input async command can use the pacer for the scan_begin_src or the convert_src. The (*do_cmdtest) calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. For aesthetics, rename the setup_counters() function so it has namespace associated with the driver. Refactor the function to use the values from the private data and absorb das1800_set_frequency() to clarify the code. Refactor the function to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. This function will not fail so change the return type to void to simplify the (*do_cmd) a bit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 66fea98e6251e15d25965ef805786e8e0b1c5ee4 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:31 2014 -0700 staging: comedi: das1800: refactor Step 4 of das1800_ai_do_cmdtest() Refactor this code to reduce the indent level and the > 80 char lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 863e07c9f83c9674c0176771c40b56b48657e1e5 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:30 2014 -0700 staging: comedi: das16m1: don't calc pacer divisors twice The analog input async command can use the pacer for the convert_src. The (*do_cmdtest) calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. Refactor das16m1_set_pacer() to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. Tidy up das16m1_cmd_exec() a bit. The pacer only needs to be set when the convert_src is TRIG_TIMER. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 33eafb7761d244a3d41a25b56dd17ba05634907e Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:29 2014 -0700 staging: comedi: cb_pcidas: don't calc ao pacer divisors twice The analog output async command can use the pacer for the scan_begin_src. The (*do_cmdtest) calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. For aesthetics, factor out the code that loads the counters to match the analog input. Refactor the code to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit f513b63f73e8bebc67a74dd46917788bfdf9c7cd Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 12:59:28 2014 -0700 staging: comedi: cb_pcidas: don't calc ai pacer divisors twice The analog input async command can use the pacer for the scan_bagin_src or the convert_src. The (*do_cmdtest) validates that only one of these sources has the TRIG_TIMER selected and calculates the divisors when validating the cmd argument. There is no reason to recalc the divisors in the (*do_cmd). Just use the values from the private data. Also, refactor cb_pcidas_load_counters() to use the i8254_set_mode() and i8254_write() helpers instead of i8254_load(). This allows us to use the I8254_* defines when setting the mode to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 8673804de08f047769d33858ad60a252b241bc76 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:43 2014 -0700 staging: comedi: adv_pci1710: remove 'ai_act_chan' from private data This member of the private data is not ued by the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 576a09f01bea680e46df033634541f33a70640cf Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:42 2014 -0700 staging: comedi: adv_pci1710: remove 'i8254_osc_base' from private data This member of the private data is always set to I8254_OSC_BASE_10MHZ. Remove it from the private data and just open code the value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 16c7eb6047bb0261124dfc4b5e63873a9ca5c442 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:41 2014 -0700 staging: comedi: adv_pci1710: always enable PCI171x_PARANOIDCHECK code This define enables code that checks for analog input channel dropout when reading samples. The define is enabled so we might as well always enable the code and remove the define. Factor out the common channel dropout detect code as a helper function and cleanup the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit e2d8c43b4eed79dee4248b040e6d66c447ccac3b Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:40 2014 -0700 staging: comedi: adv_pci1710: rename interrupt helper functions For aesthetics, rename the helper functions that are called by the interrupt function to handle reading the analog input samples. Also, change the parameters to the helpers to the comedi_device and comedi_subdevice pointers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 925ddefce0e9eec2412d03ceaa40f57323d09fec Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:39 2014 -0700 staging: comedi: adv_pci1710: tidy up start_pacer() For aesthetics, rename this function so it has namespace associated with the driver. Change the parameters to the function. The 'mode' is really a flag to load the counters and the divisors can be found in the private data. To clarify the code and remove the magic numbers, use the 8253.h helpers to set the timer mode and load the counters. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 335733438f703a4a54478360759b75ff1d24ebda Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:38 2014 -0700 staging: comedi: adv_pci1710: remove local var in pci171x_ai_cmd() The local variable 'mode' is not necessary. We can determine the mode by checking the cmd->convert_src and cmd->start_src. Do this instead to clarify the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 73bcf01cb8c57c699c2a194fef3bad9bd39d6e1a Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:37 2014 -0700 staging: comedi: adv_pci1710: only calc the pacer divisors once When the cmd->convert_src == TRIG_TIMER the divisors needed to generate the pacer time are calculated in the (*do_cmdtest) to validate the cmd->convert_arg. The core always does the (*do_cmdtest) before the (*do_cmd) so there is no reason to recalc the divisors. Save the calculated divisors in the private data as 'next_divisor[12]'. The (*do_cmd) then transfers them to the private data 'divisor[12]' so that they can be used to set the timer for the command immediately or later when the cmd->start_src is TRIG_EXT (mode 2 in this driver). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 5297a6ba0aba3d8c8238b53525a231a65fced0bf Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:36 2014 -0700 staging: comedi: adv_pci1710: remove 'ai_eos' from private data This member of the private data is is not necessary. We can just check the cmd->flags for TRIG_WAKE_EOS when needed. Remvoe the member. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 17ac5ecf20e77833adbc01dcf82cb74c1e4c6896 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:35 2014 -0700 staging: comedi: adv_pci1710: remove 'ai_buf_ptr' from private data This member of the private data is set to 0 but never used. Just remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit b4720286248acb7b696d95c72641c80bced6b3d3 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:34 2014 -0700 staging: comedi: adv_pci1710: remove 'neverending_ai' from private data This member of the private data is not necessary. We can determine if the analog input command is neverending by checking the cmd->stop_src: TRIG_COUNT -> !neverending_ai TRIG_NONE -> neverending_ai Do that instead and remove the unnecessary member. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 56556577d9c4b4528935ddfc5635953c956d7fc9 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:33 2014 -0700 staging: comedi: adv_pci1710: don't check the chanlist twice The chanlist is checked in Step 5 of the (*do_cmdtest) there is no reason to check it again in the (*do_cmd). The only reason its done again is to get the actual 'seglen', the non-repeating length of the chanlist. Save the 'seglen' found by pci171x_ai_check_chanlist() in the private data and use that in the (*do_cmd). Rename the private data member to clarify it. Also, remove the unused 'act_chanlist_pos' member from the private data. Refactor the error handling in pci171x_ai_check_chanlist() so it returns and errno for failure and 0 for success. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit b5a7a466932e9d6da6221785b34854b1838a7061 Author: H Hartley Sweeten <hsweeten@visionengravers.com> Date: Tue Apr 29 11:08:32 2014 -0700 staging: comedi: adv_pci1710: tidy up pci171x_ai_check_chanlist() Tidy up this function to clarify what the chanlist is being checked for. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 4bac39f6c9b00c9cfc3e418ea1d0afcd1c113c2f Author: Raghavendra Ganiga <ravi23ganiga@gmail.com> Date: Thu May 1 13:53:12 2014 +0530 staging: comedi: fix coding style issues in comedi_fops.c This is a patch to fix coding style warnings found by checkpatch.pl tool Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 66d76f19d6aa863ac5b3e38be345daf9b609f226 Author: Chase Southwood <chase.southwood@gmail.com> Date: Sat May 3 02:49:15 2014 -0500 staging: comedi: addi_apci_1564: remove use of devpriv->s_EeParameters This driver no longer reads the eeprom to find the board specific data, all the necessary data is in the boardinfo. Use the boardinfo directly instead of passing through devpriv->s_EeParameters. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit a7e04a080831087e1413e5651c0bf59f5dcfa409 Author: Chase Southwood <chase.southwood@gmail.com> Date: Tue Apr 29 03:37:17 2014 -0500 staging: comedi: addi_apci_1564: remove unnecessary info from boardinfo The i_IorangeBase1, i_PCIEeprom, and pc_EepromChip data in the boardinfo was only needed to work out the usage of the PCI bars. Now that that is squared away, this info is no longer needed and can be removed. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 128f798918c398b5ae84e5734c3b5df8c35d5d94 Author: Chase Southwood <chase.southwood@gmail.com> Date: Wed Apr 30 02:57:59 2014 -0500 staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars This driver only uses PCI bar 0 (devpriv->i_IobaseAmcc), and PCI bar 1 (dev->iobase), don't bother reading the unused PCI bars. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit cffd83b6d1e6e403a77c5babf1443cdfd1a080ef Author: Chase Southwood <chase.southwood@gmail.com> Date: Tue Apr 29 03:34:23 2014 -0500 staging: comedi: addi_apci_1564: board has 32 digital inputs This board always has 32 digital inputs. Remove the test when initializing the subdevice. Also, since this board is the only one supported by this driver, remove the boardinfo about the digital inputs and just use the data directly in the subdevice init. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 6aa4f14c1febf0f602c5516857303de9cc05d6e6 Author: Chase Southwood <chase.southwood@gmail.com> Date: Sat Apr 26 20:36:44 2014 -0500 staging: comedi: addi_apci_1564: remove unnecessary include This include is no longer needed. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> commit 4ae63178637d03bca6b58336ad3e4b3af9e60339 Author: Chase Southwood <chase.southwood@gmail.com> Date: Sat Apr 26 20:35:58 2014 -0500 staging: comedi: addi_apci_1564: remove eeprom support code Reading the eeprom on this board is not necessary. All information required is in the boardinfo. Remove the eeprom support code which is not really useful here. Signed-off-by: Chase So…
- Loading branch information