summaryrefslogtreecommitdiffstats
path: root/net/nfc
Commit message (Collapse)AuthorAgeFilesLines
...
* NFC: Add NCI over SPI receiveFrederic Danis2013-06-141-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | Before any operation, driver interruption is de-asserted to prevent race condition between TX and RX. Transaction starts by emitting "Direct read" and acknowledged mode bytes. Then packet length is read allowing to allocate correct NCI socket buffer. After that payload is retrieved. A delay after the transaction can be added. This delay is determined by the driver during nci_spi_allocate_device() call and can be 0. If acknowledged mode is set: - CRC of header and payload is checked - if frame reception fails (CRC error): NACK is sent - if received frame has ACK or NACK flag: unblock nci_spi_send() Payload is passed to NCI module. At the end, driver interruption is re asserted. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Add NCI over SPI sendFrederic Danis2013-06-141-1/+70
| | | | | | | | | | | | | | | | | | | | | Before any operation, driver interruption is de-asserted to prevent race condition between TX and RX. The NCI over SPI header is added in front of NCI packet. If acknowledged mode is set, CRC-16-CCITT is added to the packet. Then the packet is forwarded to SPI module to be sent. A delay after the transaction is added. This delay is determined by the driver during nci_spi_allocate_device() call and can be 0. After data has been sent, driver interruption is re-asserted. If acknowledged mode is set, nci_spi_send will block until acknowledgment is received. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Add basic NCI over SPIFrederic Danis2013-06-143-1/+149
| | | | | | | | | | | | | | | | | | The NFC Forum defines a transport interface based on Serial Peripheral Interface (SPI) for the NFC Controller Interface (NCI). This module implements the SPI transport of NCI, calling SPI module directly to read/write data to NFC controller (NFCC). NFCC driver should provide functions performing device open and close. It should also provide functions asserting/de-asserting interruption to prevent TX/RX race conditions. NFCC driver can also fix a delay between transactions if needed by the hardware. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: HCI: Follow a positive code path in the HCI ops implementationsSamuel Ortiz2013-06-141-18/+18
| | | | | | Exiting on the error case is more typical to the kernel coding style. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: HCI: Implement fw_upload opsEric Lapuyade2013-06-141-0/+11
| | | | | | | | | This is a simple forward to the HCI driver. When driver is done with the operation, it shall directly notify NFC Core by calling nfc_fw_upload_done(). Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Add firmware upload netlink commandEric Lapuyade2013-06-143-0/+114
| | | | | | | | | | | | | | | | | | As several NFC chipsets can have their firmwares upgraded and reflashed, this patchset adds a new netlink command to trigger that the driver loads or flashes a new firmware. This will allows userspace triggered firmware upgrade through netlink. The firmware name or hint is passed as a parameter, and the driver will eventually fetch the firmware binary through the request_firmware API. The cmd can only be executed when the nfc dev is not in use. Actual firmware loading/flashing is an asynchronous operation. Result of the operation shall send a new event up to user space through the nfc dev multicast socket. During operation, the nfc dev is not openable and thus not usable. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: NCI: Fix skb->dev usageFrederic Danis2013-06-142-13/+6
| | | | | | | | | | | | | skb->dev is used for carrying a net_device pointer and not an nci_dev pointer. Remove usage of skb-dev to carry nci_dev and replace it by parameter in nci_recv_frame(), nci_send_frame() and driver send() functions. NfcWilink driver is also updated to use those functions. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Remove commented out LLCP related Makefile linePaul Bolle2013-05-211-1/+0
| | | | | | | | | The Kconfig symbol NFC_LLCP was removed in commit 30cc458765 ("NFC: Move LLCP code to the NFC top level diirectory"). But the reference to its macro in this Makefile was only commented out. Remove it now. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-04-301-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drivers/net/ethernet/emulex/benet/be.h include/net/tcp.h net/mac802154/mac802154.h Most conflicts were minor overlapping stuff. The be2net driver brought in some fixes that added __vlan_put_tag calls, which in net-next take an additional argument. Signed-off-by: David S. Miller <davem@davemloft.net>
| * NFC: llcp: two bugs in ->getname()Dan Carpenter2013-04-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The sockaddr_nfc_llcp struct has as hole between ->sa_family and ->dev_idx so I've added a memset() to clear it and prevent an information leak. Also the ->nfc_protocol element wasn't set so I've added that. "uaddr->sa_family" and "llcp_addr->sa_family" are the same thing but it's less confusing to use llcp_addr consistently throughout. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵John W. Linville2013-04-299-79/+9
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * | NFC: Add missing RFKILL dependency for KconfigMarcel Holtmann2013-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the NFC subsystem gained RFKILL support, it needs to be able to build properly with whatever option for RFKILL has been selected. on i386: net/built-in.o: In function `nfc_unregister_device': (.text+0x6a36d): undefined reference to `rfkill_unregister' net/built-in.o: In function `nfc_unregister_device': (.text+0x6a378): undefined reference to `rfkill_destroy' net/built-in.o: In function `nfc_register_device': (.text+0x6a493): undefined reference to `rfkill_alloc' net/built-in.o: In function `nfc_register_device': (.text+0x6a4a4): undefined reference to `rfkill_register' net/built-in.o: In function `nfc_register_device': (.text+0x6a4b3): undefined reference to `rfkill_destroy' net/built-in.o: In function `nfc_dev_up': (.text+0x6a8e8): undefined reference to `rfkill_blocked' when CONFIG_RFKILL=m but NFC is builtin. Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: Move LLCP code to the NFC top level diirectorySamuel Ortiz2013-04-269-79/+8
| | | | | | | | | | | | | | | | | | | | | And stop making it optional. LLCP is a fundamental part of the NFC specifications and making it optional does not make much sense. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | Merge branch 'master' of ↵John W. Linville2013-04-245-54/+194
|\| | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * | NFC: RFKILL supportSamuel Ortiz2013-04-121-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All NFC devices will now get proper RFKILL support as long as they provide some dev_up and dev_down hooks. Rfkilling an NFC device will bring it down while it is left to userspace to bring it back up when being rfkill unblocked. This is very similar to what Bluetooth does. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: Prevent polling when device is downSamuel Ortiz2013-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Some devices turn radio on whenever they're asked to start a poll. To prevent that from happening, we just don't call into the driver start_poll hook when the NFC device is down. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Terminate connection when receiving a DISC on (0,0)Samuel Ortiz2013-04-111-0/+6
| | | | | | | | | | | | | | | | | | | | | According to the LLCP specs, we must terminate the LLCP link when receiving a DISC with both ssap and dsap set to 0. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Remove local_cleanup last argumentSamuel Ortiz2013-04-111-4/+4
| | | | | | | | | | | | | | | | | | | | | local_cleanup is always called with device set to false as it means the local LLCP is going away. So no need to pass this switch as an argument. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Only keep raw sockets alive when the LLCP local leavesSamuel Ortiz2013-04-111-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | When the MAC goes down, connected and connection less sockets should be notified, but raw sockets should be kept alive. They will get notified only when the physical devices goes away. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parametersThierry Escande2013-04-111-1/+22
| | | | | | | | | | | | | | | | | | | | | Useful for LLCP validation tests. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Reset RW, LTO, and MIU remote parameters when link goes downThierry Escande2013-04-113-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This resets remote parameters in both local and socket llcp structures when the link goes down. That way, nfc_llcp_getsockopt won't return values corresponding to the previous link parameters. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Use localy stored remote_miu value if not set at socket levelThierry Escande2013-04-113-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | If remote_miu value is not set in the socket (i.e. connection-less socket) the value stored in the local is used. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Aggregated frames supportThierry Escande2013-04-112-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for AGF PDUs. For each PDU contained in the AGF, a new sk_buff is allocated and dispatched to its corresponding handler. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Fix zero octets length SDU handlingOlivier Guiter2013-04-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | LLCP Validation test #2 (Connection-less information transfer) send a service data unit of zero octets length. This is now handled correctly. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Fall back to local values when getting socket optionsSamuel Ortiz2013-04-111-3/+13
| | | | | | | | | | | | | | | | | | | | | If a socket option has not been set by the user, fall back to the LLCP local ones. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Socket miux is a big endian fieldSamuel Ortiz2013-04-113-6/+9
| | | | | | | | | | | | | | | | | | | | | The MIUX must be transmitted in big endian and as such we have to convert it properly. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | Merge branch 'master' of ↵John W. Linville2013-04-102-11/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
* | \ \ Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-04-072-11/+6
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/nfc/microread/mei.c net/netfilter/nfnetlink_queue_core.c Pull in 'net' to get Eric Biederman's AF_UNIX fix, upon which some cleanups are going to go on-top. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | NFC: llcp: fix info leaks via msg_name in llcp_sock_recvmsg()Mathias Krause2013-04-071-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code in llcp_sock_recvmsg() does not initialize all the members of struct sockaddr_nfc_llcp when filling the sockaddr info. Nor does it initialize the padding bytes of the structure inserted by the compiler for alignment. Also, if the socket is in state LLCP_CLOSED or is shutting down during receive the msg_namelen member is not updated to 0 while otherwise returning with 0, i.e. "success". The msg_namelen update is also missing for stream and seqpacket sockets which don't fill the sockaddr info. Both issues lead to the fact that the code will leak uninitialized kernel stack bytes in net/socket.c. Fix the first issue by initializing the memory used for sockaddr info with memset(0). Fix the second one by setting msg_namelen to 0 early. It will be updated later if we're going to fill the msg_name member. Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | NFC: llcp: Keep the connected socket parent pointer aliveSamuel Ortiz2013-03-261-1/+3
| | | | | | | | | | | | | | | | | | | | | And avoid decreasing the ack log twice when dequeueing connected LLCP sockets. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Remove possible double call to kfree_skbThierry Escande2013-03-201-2/+0
| | | | | | | | | | | | | | | | | | | | | kfree_skb was called twice when the socket receive queue is full Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | NFC: llcp: Detach socket from process context only when releasing the socketSamuel Ortiz2013-03-202-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Calling sock_orphan when e.g. the NFC adapter is removed can lead to kernel crashes when e.g. a connection less client is sleeping on the Rx workqueue, waiting for data to show up. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | net: fix smatch warnings inside datagram_pollJacob Keller2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7d4c04fc170087119727119074e72445f2bb192b ("net: add option to enable error queue packets waking select") has an issue due to operator precedence causing the bit-wise OR to bind to the sock_flags call instead of the result of the terniary conditional. This fixes the *_poll functions to work properly. The old code results in "mask |= POLLPRI" instead of what was intended, which is to only include POLLPRI when the socket option is enabled. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: add option to enable error queue packets waking selectKeller, Jacob E2013-03-311-1/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when a socket receives something on the error queue it only wakes up the socket on select if it is in the "read" list, that is the socket has something to read. It is useful also to wake the socket if it is in the error list, which would enable software to wait on error queue packets without waking up for regular data on the socket. The main use case is for receiving timestamped transmit packets which return the timestamp to the socket via the error queue. This enables an application to select on the socket for the error queue only instead of for the regular traffic. -v2- * Added the SO_SELECT_ERR_QUEUE socket option to every architechture specific file * Modified every socket poll function that checks error queue Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Cc: Jeffrey Kirsher <jeffrey.t.kirsher@intel.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Matthew Vick <matthew.vick@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵John W. Linville2013-03-182-9/+55
|\| | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/nfc/llcp/llcp.c
| * NFC: llcp: Report error to pending sockets when a device is removedSamuel Ortiz2013-03-081-4/+12
| | | | | | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: llcp: Clean raw sockets from nfc_llcp_socket_releaseSamuel Ortiz2013-03-081-0/+29
| | | | | | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: llcp: Clean local timers and works when removing a deviceSamuel Ortiz2013-03-081-7/+14
| | | | | | | | | | | | | | | | | | Whenever an adapter is removed we must clean all the local structures, especially the timers and scheduled work. Otherwise those asynchronous threads will eventually try to access the freed nfc_dev pointer if an LLCP link is up. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: llcp: Decrease socket ack log when accepting a connectionSamuel Ortiz2013-03-081-0/+2
| | | | | | | | | | | | | | This is really difficult to test with real NFC devices, but without this fix an LLCP server will eventually refuse new connections. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Add cleanup support for unreplied SNL requestsThierry Escande2013-03-103-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | If the remote LLC doesn't reply in time to our SNL requests we remove them from the list of pending requests. The timeout is fixed to an arbitrary value of 3 times remote_lto. When not replied, the local LLC broadcasts NFC_EVENT_LLC_SDRES nl events for the concerned uris with sap values set to LLCP_SDP_UNBOUND (which is 65). Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Service Name Lookup netlink interfaceThierry Escande2013-03-105-0/+302
| | | | | | | | | | | | | | | | | | | | | | | | This adds a netlink interface for service name lookup support. Multiple URIs can be passed nested into the NFC_ATTR_LLC_SDP attribute using the NFC_CMD_LLC_SDREQ netlink command. When the SNL reply is received, a NFC_EVENT_LLC_SDRES event is sent to the user space. URI and SAP tuples are passed back, nested into NFC_ATTR_LLC_SDP attribute. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Service Name Lookup SDRES aggregationThierry Escande2013-03-103-27/+94
| | | | | | | | | | | | | | | | | | This modifies the way SDRES PDUs are sent back. If multiple SDREQs are received within a single SNL PDU, all SDRES replies are sent packed in one SNL PDU too. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: Add missing type policies for netlink attributesThierry Escande2013-03-101-0/+3
| | | | | | | | | | Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Remove redundant printkSamuel Ortiz2013-03-101-2/+0
| | | | | | | | | | | | We already have a pr_debug for that. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Use socket specific link parameters before the local onesSamuel Ortiz2013-03-103-8/+23
| | | | | | | | | | | | If the socket link options are set, use them before the local one. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Implement socket optionsSamuel Ortiz2013-03-102-2/+120
| | | | | | | | | | | | | | | | Some LLCP services (e.g. the validation ones) require some control over the LLCP link parameters like the receive window (RW) or the MIU extension (MIUX). This can only be done through socket options. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | NFC: llcp: Rename socket rw and miu fieldsSamuel Ortiz2013-03-104-16/+19
|/ | | | | | | They really are remote peer parameters, and we need to distinguish them from the local ones as we'll modify the latter with socket options. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* hlist: drop the node parameter from iteratorsSasha Levin2013-02-271-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure why, but the hlist for each entry iterators were conceived list_for_each_entry(pos, head, member) The hlist ones were greedy and wanted an extra parameter: hlist_for_each_entry(tpos, pos, head, member) Why did they need an extra pos parameter? I'm not quite sure. Not only they don't really need it, it also prevents the iterator from looking exactly like the list iterator, which is unfortunate. Besides the semantic patch, there was some manual work required: - Fix up the actual hlist iterators in linux/list.h - Fix up the declaration of other iterators based on the hlist ones. - A very small amount of places were using the 'node' parameter, this was modified to use 'obj->member' instead. - Coccinelle didn't handle the hlist_for_each_entry_safe iterator properly, so those had to be fixed up manually. The semantic patch which is mostly the work of Peter Senna Tschudin is here: @@ iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host; type T; expression a,c,d,e; identifier b; statement S; @@ -T b; <+... when != b ( hlist_for_each_entry(a, - b, c, d) S | hlist_for_each_entry_continue(a, - b, c) S | hlist_for_each_entry_from(a, - b, c) S | hlist_for_each_entry_rcu(a, - b, c, d) S | hlist_for_each_entry_rcu_bh(a, - b, c, d) S | hlist_for_each_entry_continue_rcu_bh(a, - b, c) S | for_each_busy_worker(a, c, - b, d) S | ax25_uid_for_each(a, - b, c) S | ax25_for_each(a, - b, c) S | inet_bind_bucket_for_each(a, - b, c) S | sctp_for_each_hentry(a, - b, c) S | sk_for_each(a, - b, c) S | sk_for_each_rcu(a, - b, c) S | sk_for_each_from -(a, b) +(a) S + sk_for_each_from(a) S | sk_for_each_safe(a, - b, c, d) S | sk_for_each_bound(a, - b, c) S | hlist_for_each_entry_safe(a, - b, c, d, e) S | hlist_for_each_entry_continue_rcu(a, - b, c) S | nr_neigh_for_each(a, - b, c) S | nr_neigh_for_each_safe(a, - b, c, d) S | nr_node_for_each(a, - b, c) S | nr_node_for_each_safe(a, - b, c, d) S | - for_each_gfn_sp(a, c, d, b) S + for_each_gfn_sp(a, c, d) S | - for_each_gfn_indirect_valid_sp(a, c, d, b) S + for_each_gfn_indirect_valid_sp(a, c, d) S | for_each_host(a, - b, c) S | for_each_host_safe(a, - b, c, d) S | for_each_mesh_entry(a, - b, c, d) S ) ...+> [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c] [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c] [akpm@linux-foundation.org: checkpatch fixes] [akpm@linux-foundation.org: fix warnings] [akpm@linux-foudnation.org: redo intrusive kvm changes] Tested-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'driver-core-3.9-rc1' of ↵Linus Torvalds2013-02-211-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core patches from Greg Kroah-Hartman: "Here is the big driver core merge for 3.9-rc1 There are two major series here, both of which touch lots of drivers all over the kernel, and will cause you some merge conflicts: - add a new function called devm_ioremap_resource() to properly be able to check return values. - remove CONFIG_EXPERIMENTAL Other than those patches, there's not much here, some minor fixes and updates" Fix up trivial conflicts * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits) base: memory: fix soft/hard_offline_page permissions drivercore: Fix ordering between deferred_probe and exiting initcalls backlight: fix class_find_device() arguments TTY: mark tty_get_device call with the proper const values driver-core: constify data for class_find_device() firmware: Ignore abort check when no user-helper is used firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER firmware: Make user-mode helper optional firmware: Refactoring for splitting user-mode helper code Driver core: treat unregistered bus_types as having no devices watchdog: Convert to devm_ioremap_resource() thermal: Convert to devm_ioremap_resource() spi: Convert to devm_ioremap_resource() power: Convert to devm_ioremap_resource() mtd: Convert to devm_ioremap_resource() mmc: Convert to devm_ioremap_resource() mfd: Convert to devm_ioremap_resource() media: Convert to devm_ioremap_resource() iommu: Convert to devm_ioremap_resource() drm: Convert to devm_ioremap_resource() ...
| * driver-core: constify data for class_find_device()Michał Mirosław2013-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All in-kernel users of class_find_device() don't really need mutable data for match callback. In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c) this patch changes match callbacks to use const search data. The const is propagated to rtc_class_open() and power_supply_get_by_name() parameters. Note that there's a dev reference leak in suspend_test.c that's not touched in this patch. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>