mbox

pull request: bluetooth-next 2012-03-01

Message ID 20120302025554.GA13493@joana
State Rejected, archived
Delegated to: David Miller
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next master

Message

Gustavo F. Padovan March 2, 2012, 2:55 a.m. UTC
Hi Dave,

Here is the Bluetooth pull request for 3.4, but first there is some things I
need to explain:
 - I'm pulling directly to you because due to the coding style issues that
   happened some days ago. We decided, after talk to John, to pull directly to
   you, so you can take a look before pull. I personally looked to the whole
   diff of this pull request and couldn't spot anything that doesn't seem
   specified in CodingStyle.
 - This is a big pull request. It happened that this is the busiest Bluetooth
   release cycle I have ever seen and I had to be away from development and
   maintainance for about one month. Putting these two facts together it
   happened that we have now more than 200 patches queued in the Bluetooth
   subsystem tree.

About the patches:
 - almost half of the patches is in the new Bluetooth Management interface, it
 finally reached a stable state regarding its API and we now enable it by
 default.
 - lots of Bluetooth LE patches. This implementation is still unstable but
   disabled by default.
 - some L2CAP layer refactoring to make our core code more generic and
   reusable.
 - New HCI monitor interface to monitor Bluetooth flow.
 - Lot of fixes and clean ups all over the Bluetooth subsystem.

	Gustavo


The following changes since commit b4017c5368f992fb8fb3a2545a0977082c6664e4:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2012-03-01 17:57:40 -0500)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next master

Andre Guedes (24):
      Bluetooth: Add 'eir_len' param to mgmt_device_found()
      Bluetooth: Report LE devices
      Bluetooth: Use GFP_KERNEL in hci_conn_add()
      Bluetooth: Use GFP_KERNEL in hci_chan_create()
      Bluetooth: Fix potential deadlock
      Bluetooth: Remove unneeded locking
      Bluetooth: Use GFP_KERNEL in hci_add_adv_entry()
      Bluetooth: LE scan should send Discovering events
      Bluetooth: Minor code refactoring
      Bluetooth: Add hci_do_le_scan()
      Bluetooth: Add hci_le_scan()
      Bluetooth: MGMT start discovery LE-Only support
      Bluetooth: Fix indentation
      Bluetooth: Add BT_DBG to mgmt_discovering()
      Bluetooth: Fix discovery state machine
      Bluetooth: Fix event sending with DISCOVERY_STOPPED state
      Bluetooth: Prepare start_discovery
      Bluetooth: Track discovery type
      Bluetooth: Merge INQUIRY and LE_SCAN discovery states
      Bluetooth: Interleaved discovery support
      Bluetooth: Set DISCOVERY_STOPPED if controller resets
      Bluetooth: Change interleaved discovery behavior
      Bluetooth: Fix Kconfig help description
      Bluetooth: Check capabilities in BR/EDR and LE-Only discovery

Andrei Emeltchenko (30):
      Bluetooth: Process num completed data blocks event
      Bluetooth: Remove magic number from ACL TO
      Bluetooth: Use chan instead of sk
      Bluetooth: Change sk to l2cap_chan
      Bluetooth: trivial: space correction
      Bluetooth: Add alloc_skb chan operator
      Bluetooth: Use list _safe deleting from conn_hash_list
      Bluetooth: Use list _safe deleting from conn chan_list
      Bluetooth: Recalculate sched HCI blk/pkt flow ctrl
      Bluetooth: Helper removes duplicated code
      Bluetooth: Change chan_ready param from sk to chan
      Bluetooth: Clean up l2cap_chan_add
      Bluetooth: Remove unneeded sk variable
      Bluetooth: Do not dereference zero sk
      Bluetooth: Move scope of state_to_string
      Bluetooth: Use symbolic names for state in debug
      Bluetooth: Prefix hex numbers with object name
      Bluetooth: trivial: Fix long line
      Bluetooth: Revert to mutexes from RCU list
      Bluetooth: Add l2cap_chan_lock
      Bluetooth: Add locked and unlocked state_change
      Bluetooth: Add socket error function
      Bluetooth: Fix coding style issues in mgmt code
      Bluetooth: Add unlocked __l2cap_chan_add function
      Bluetooth: Change sk lock to chan lock in L2CAP core
      Bluetooth: Remove socket lock check
      Bluetooth: Fix init request completion with AMP controllers
      Bluetooth: Fix double locking in LE and conless chan
      Bluetooth: Remove duplicated code in l2cap conn req
      Bluetooth: Save remote L2CAP fixed channel mask

Andrzej Kaczmarek (2):
      Bluetooth: Fix sk_sndtimeo initialization for L2CAP socket
      Bluetooth: l2cap_set_timer needs jiffies as timeout value

Dan Carpenter (2):
      Bluetooth: use kfree_skb() instead of kfree()
      Bluetooth: change min_t() cast in hci_reassembly()

Daniel Wagner (1):
      Bluetooth: Don't mark non xfer isoc endpoint URBs with URB_ISO_ASAP

David Herrmann (28):
      Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open()
      Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open()
      Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open()
      Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open()
      Bluetooth: dtl1: Fix memleak in probe()
      Bluetooth: Make hci-destruct callback optional
      Bluetooth: bluecard-cs: Remove empty destruct cb
      Bluetooth: bt3c-cs: Remove empty destruct cb
      Bluetooth: btmrvl: Remove empty destruct cb
      Bluetooth: btuart-cs: Remove empty destruct cb
      Bluetooth: btwilink: Remove empty destruct cb
      Bluetooth: dtl1-cs: Remove empty destruct cb
      Bluetooth: vhci: Free driver_data on file release
      Bluetooth: bfusb: Free driver_data on USB shutdown
      Bluetooth: btusb: Free driver data on USB shutdown
      Bluetooth: bpa10x: Free private driver data on usb shutdown
      Bluetooth: btsdio: Free driver data on SDIO shutdown
      Bluetooth: uart-ldisc: Fix memory leak and remove destruct cb
      Bluetooth: Remove unused hci-destruct cb
      Bluetooth: Correctly acquire module ref
      Bluetooth: Remove HCI-owner field
      Bluetooth: Correctly take hci_dev->dev refcount
      Bluetooth: Remove __hci_dev_put/hold
      Bluetooth: Introduce to_hci_dev()
      Bluetooth: Remove hci_dev->driver_data
      Bluetooth: Introduce to_hci_conn
      Bluetooth: Use proper datatypes in release-callbacks
      Bluetooth: btusb: Remove device lock on release

Fabio Estevam (1):
      Bluetooth: Fix 'enable_hs' type

Gustavo F. Padovan (1):
      Bluetooth: Fix coding style with breaking lines

Hemant Gupta (2):
      Bluetooth: Send correct response to IO Capability Request
      Bluetooth: Fix clearing of debug and linkkey flags

Joe Perches (1):
      Bluetooth: Add logging functions bt_info and bt_err

Johan Hedberg (119):
      Bluetooth: Convert inquiry cache to use standard list types
      Bluetooth: Move Extended Inquiry Response defines to hci.h
      Bluetooth: Add initial mgmt_confirm_name support
      Bluetooth: Return updated name state with hci_inquiry_cache_update
      Bluetooth: Flush inquiry cache when starting mgmt triggered inquiry
      Bluetooth: Rename hdev->inq_cache to hdev->discovery
      Bluetooth: Add discovery state tracking
      Bluetooth: Add name resolving support for mgmt based discovery
      Bluetooth: Remove bogus inline declaration from l2cap_chan_connect
      Bluetooth: Move mgmt related flags from hdev->flags to hdev->dev_flags
      Bluetooth: Fix resetting HCI_MGMT flag
      Bluetooth: Sort to-be-resolved devices by RSSI during discovery
      Bluetooth: Fix clearing persistent flags
      Bluetooth: Rename mgmt connected events to match user space
      Bluetooth: Add eir_len parameter to mgmt_ev_device_found
      Bluetooth: Rename eir_has_complete_name to eir_has_data_type
      Bluetooth: Add missing EIR defines to hci.h
      Bluetooth: Move eir_has_data_field to hci_core.h
      Bluetooth: Merge device class into the EIR data in mgmt_ev_device_found
      Bluetooth: Rename conn->pend to conn->flags
      Bluetooth: Convert hdev->out to a bool type
      Bluetooth: Update device_connected and device_found events to latest API
      Bluetooth: Merge boolean members of struct hci_conn into flags
      Bluetooth: Convert hdev->ssp_mode to a flag
      Bluetooth: Add a convenience function to check for SSP enabled
      Bluetooth: Update mgmt.h to match latest API spec
      Bluetooth: mgmt: Implement Cancel Pair Device command
      Bluetooth: Add missing QUIRK_NO_RESET test to hci_dev_do_close
      Bluetooth: Fix device_found event length for remote name resolving
      Bluetooth: Update and rename mgmt_remove_keys to mgmt_unpair_device
      Bluetooth: Update mgmt_disconnect to match latest API
      Bluetooth: Add address type to user_confirm and user_passkey messages
      Bluetooth: Add address type to Out Of Band mgmt messages
      Bluetooth: Add address type to mgmt blacklist messages
      Bluetooth: Add address type to mgmt_ev_auth_failed
      Bluetooth: Fix mgmt_unpair_device command status
      Bluetooth: Add Device Unpaired mgmt event
      Bluetooth: Implement Read Supported Commands commands for mgmt
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next.git
      Bluetooth: Remove unused member from cmd_lookup struct
      Bluetooth: mgmt: Use more consistent error variable names
      Bluetooth: mgmt: Add support for Set Link Security command
      Bluetooth: mgmt: Add support for Set SSP command
      Bluetooth: mgmt: Add address type to link key messages
      Bluetooth: mgmt: Add address type to PIN code messages
      Bluetooth: mgmt: Add address type to confirm name command
      Bluetooth: Add Intel copyright to mgmt files
      Bluetooth: mgmt: Change ordering of cmd_status paramters
      Bluetooth: mgmt: Move status parameters into the cmd_complete header
      Bluetooth: mgmt: Fix Pair Device response status values
      Bluetooth: mgmt: Fix Start Discovery return parameters
      Bluetooth: mgmt: Fix (Un)Block Device return parameters
      Bluetooth: mgmt: Fix OOB command response parameters
      Bluetooth: mgmt: Bump mgmt version
      Bluetooth: Fix hci_connect error return values
      Bluetooth: mgmt: Add address type parameter to Stop Discovery command
      Bluetooth: mgmt: Add address type parameter to Discovering event
      Bluetooth: mgmt: Add basic support for Set High Speed command
      Bluetooth: mgmt: Fix Set SSP check for supported feature
      Bluetooth: mgmt: Clear EIR data when disabling SSP
      Bluetooth: mgmt: Fix powered checks for commands
      Bluetooth: mgmt: Fix set_local_name and set_dev_class powered checks
      Bluetooth: mgmt: Fix set_fast_connectable error return
      Bluetooth: mgmt: Fix pairable setting upon initialization
      Bluetooth: mgmt: Allow connectable/discoverable changes in off state
      Bluetooth: mgmt: Fix Removing discoverable timeout in set_connectable
      Bluetooth: mgmt: Fix current settings values when powered off
      Bluetooth: mgmt: Add convenience function for sending New Settings
      Bluetooth: mgmt: Fix New Settings event for connectable/discoverable
      Bluetooth: Fix clearing of persistent dev_flags
      Bluetooth: mgmt: Fix connectable/discoverable response values
      Bluetooth: mgmt: Make Set Link Security callable while powered off
      Bluetooth: Remove unneeded hci_cc_read_ssp_mode function
      Bluetooth: mgmt: Make Set SSP command callable while powered off
      Bluetooth: mgmt: Fix EIR toggling with SSP
      Bluetooth: mgmt: Fix clearing of hdev->eir
      Bluetooth: Explicitly clear EIR data upon hci_dev setup
      Bluetooth: mgmt: Fix Set SSP supported check
      Bluetooth: mgmt: Implement Set LE command
      Bluetooth: Fix EIR data clearing when powering off
      Bluetooth: mgmt: Fix updating EIR when updating the name
      Bluetooth: Add hdev->short_name for EIR generation
      Bluetooth: Fix read_name updating when HCI_SETUP is not set
      Bluetooth: mgmt: Allow local name changes while powered off
      Bluetooth: mgmt: Fix name_changed event for short name changes
      Bluetooth: mgmt: Fix missing short_name in read_info
      Bluetooth: Fix clearing of dev_class when powering down
      Bluetooth: mgmt: Fix return value for set_class
      Bluetooth: mgmt: Check for HCI_UP in update_eir() and update_class()
      Bluetooth: mgmt: Allow class of device changes while powered off
      Bluetooth: mgmt: Add missing powered checks to commands
      Bluetooth: mgmt: Fix unpair_device responses
      Bluetooth: mgmt: Fix device_found parameters
      Bluetooth: mgmt: Add legacy pairing info to dev_found events
      Bluetooth: mgmt: Fix count parameter in get_connections reply
      Bluetooth: mgmt: Fix update_eir/class with HCI_AUTO_OFF flag set
      Bluetooth: mgmt: Fix return value of add/remove_uuid
      Bluetooth: mgmt: Move service cache setting to a more sensible place
      Bluetooth: mgmt: Fix clear UUIDs response
      Bluetooth: mgmt: Add flags parameter to device_connected
      Bluetooth: mgmt: Track pending class changes
      Bluetooth: mgmt: Fix dev_class related command response timing
      Bluetooth: mgmt: Fix clear_uuids response
      Bluetooth: Fix init request completion with old controllers
      Bluetooth: Use kernel int types instead of ones from stdint.h
      Bluetooth: Don't send unnecessary write_le_enable command
      Bluetooth: Remove redundant read_host_features commands
      Bluetooth: Add missing host features definitions
      Bluetooth: Use LMP_HOST_SSP define instead of magic values
      Bluetooth: mgmt: Add missing hci_dev locking to set_le()
      Bluetooth: Fix init sequence for some CSR based controllers
      Bluetooth: mgmt: Refactor hci_dev lookup for commands
      Bluetooth: mgmt: Initialize HCI_MGMT flag for any command
      Bluetooth: mgmt: Move command handlers into a table
      Bluetooth: mgmt: Add defines for command sizes
      Bluetooth: mgmt: Centralize message length checks
      Bluetooth: Fix clearing of HCI_PENDING_CLASS flag
      Bluetooth: mgmt: Fix command status error code values
      Bluetooth: mgmt: Add new error code for invalid index

Keng-Yu Lin (1):
      Bluetooth: Add AR30XX device ID on Asus laptops

Manoj Iyer (1):
      Bluetooth: btusb: Add vendor specific ID (0a5c 21f3) for BCM20702A0

Marcel Holtmann (25):
      Bluetooth: Split sending for HCI raw and control sockets
      Bluetooth: Remove unneeded bt_cb(skb)->channel variable
      Bluetooth: Limit HCI raw socket options to actual raw sockets
      Bluetooth: Lock socket when reading HCI socket options
      Bluetooth: Add HCI CMSG details only to raw sockets
      Bluetooth: Simplify HCI socket bind handling
      Bluetooth: Fix issue with shared SKB between HCI raw socket and driver
      Bluetooth: Remove HCI notifier handling
      Bluetooth: Add support for HCI monitor channel
      Bluetooth: Restrict access to management interface
      Bluetooth: Set supported settings based on enabled HS and/or LE
      Bluetooth: Always enable management interface
      Bluetooth: Fix parameter list for setting local name
      Bluetooth: Only keep controller up after init if powered on
      Bluetooth: Don't send New Settings event during setup power down
      Bluetooth: Fix two minor style issues in management code
      Bluetooth: Fix two minor style issues in HCI code
      Bluetooth: Enable timestamps for control channel
      Bluetooth: Disabling discoverable with timeout is invalid
      Bluetooth: Fix handling of discoverable setting with timeout
      Bluetooth: Send management event for class of device changes
      Bluetooth: Allow HCI UART reset parameter via flags ioctl
      Bluetooth: Add support for creating HCI UART based AMP controllers
      Bluetooth: Update L2CAP timeout constants to use msecs_to_jiffies
      Bluetooth: Update MGMT and SMP timeout constants to use msecs_to_jiffies

Octavian Purdila (2):
      Bluetooth: silence lockdep warning
      Bluetooth: Fix RFCOMM session reference counting issue

Peter Hurley (1):
      Bluetooth: Fix l2cap conn failures for ssp devices

Szymon Janc (9):
      Bluetooth: Make l2cap_clear_timer return if timer was running or not
      Bluetooth: Set P-bit for SREJ frame only if there are I-frames to ack
      Bluetooth: Clear ack_timer when sending ack
      Bluetooth: Don't send RNR immediately when entering local busy
      Bluetooth: Drop L2CAP chan reference if ERTM ack_timer fired
      Bluetooth: Make l2cap_ertm_data_rcv static
      Bluetooth: Fix possible missing I-Frame acknowledgement
      Bluetooth: Fix double acking I-Frames when sending pending I-Frames
      Bluetooth: Use NULL instead of integer for mgmt_device_connected param

Ulisses Furquim (2):
      Bluetooth: Remove usage of __cancel_delayed_work()
      Bluetooth: Fix possible use after free in delete path

Vinicius Costa Gomes (11):
      Bluetooth: Fix using an absolute timeout on hci_conn_put()
      Bluetooth: Add structures for the new LTK exchange messages
      Bluetooth: Rename smp_key_size to enc_key_size
      Bluetooth: Fix invalid memory access when there's no SMP channel
      Bluetooth: Fix doing some useless casts when receiving MGMT commands
      Bluetooth: Add new structures for handling SMP Long Term Keys
      Bluetooth: Use the updated key structures for handling LTKs
      Bluetooth: Add MGMT handlers for dealing with SMP LTK's
      Bluetooth: Add support for removing LTK's when pairing is removed
      Bluetooth: Clean up structures left unused
      Bluetooth: Add support for notifying userspace of new LTK's

 drivers/bluetooth/ath3k.c          |    1 +
 drivers/bluetooth/bfusb.c          |   23 +-
 drivers/bluetooth/bluecard_cs.c    |   20 +-
 drivers/bluetooth/bpa10x.c         |   35 +-
 drivers/bluetooth/bt3c_cs.c        |   14 +-
 drivers/bluetooth/btmrvl_debugfs.c |   27 +-
 drivers/bluetooth/btmrvl_main.c    |   17 +-
 drivers/bluetooth/btsdio.c         |   23 +-
 drivers/bluetooth/btuart_cs.c      |   14 +-
 drivers/bluetooth/btusb.c          |   47 +-
 drivers/bluetooth/btwilink.c       |   18 +-
 drivers/bluetooth/dtl1_cs.c        |   34 +-
 drivers/bluetooth/hci_ath.c        |    2 +-
 drivers/bluetooth/hci_bcsp.c       |    2 +-
 drivers/bluetooth/hci_h4.c         |    2 +-
 drivers/bluetooth/hci_ldisc.c      |   34 +-
 drivers/bluetooth/hci_ll.c         |    2 +-
 drivers/bluetooth/hci_uart.h       |    2 +
 drivers/bluetooth/hci_vhci.c       |   17 +-
 include/net/bluetooth/bluetooth.h  |   40 +-
 include/net/bluetooth/hci.h        |   72 +-
 include/net/bluetooth/hci_core.h   |  284 +++--
 include/net/bluetooth/hci_mon.h    |   51 +
 include/net/bluetooth/l2cap.h      |   37 +-
 include/net/bluetooth/mgmt.h       |  231 +++--
 include/net/bluetooth/smp.h        |    2 +-
 net/bluetooth/Kconfig              |    1 -
 net/bluetooth/bnep/sock.c          |    6 +-
 net/bluetooth/cmtp/sock.c          |    6 +-
 net/bluetooth/hci_conn.c           |   73 +-
 net/bluetooth/hci_core.c           |  627 +++++++--
 net/bluetooth/hci_event.c          |  607 ++++++---
 net/bluetooth/hci_sock.c           |  470 ++++++--
 net/bluetooth/hci_sysfs.c          |   53 +-
 net/bluetooth/hidp/sock.c          |    6 +-
 net/bluetooth/l2cap_core.c         |  638 +++++----
 net/bluetooth/l2cap_sock.c         |   53 +-
 net/bluetooth/lib.c                |   27 +-
 net/bluetooth/mgmt.c               | 2590 +++++++++++++++++++++++-------------
 net/bluetooth/smp.c                |   92 +-
 40 files changed, 4157 insertions(+), 2143 deletions(-)
 create mode 100644 include/net/bluetooth/hci_mon.h

Comments

David Miller March 2, 2012, 3:16 a.m. UTC | #1
From: Gustavo Padovan <gustavo@padovan.org>
Date: Thu, 1 Mar 2012 23:55:55 -0300

>  - I'm pulling directly to you because due to the coding style issues that
>    happened some days ago. We decided, after talk to John, to pull directly to
>    you, so you can take a look before pull. I personally looked to the whole
>    diff of this pull request and couldn't spot anything that doesn't seem
>    specified in CodingStyle.

For the members of "struct inquiry_cache" the tabbing has been all
messed up by commit 561aafbcb2e3f8fee11d3781f866c7b4c4f93a28.

Instead of all of the member names being nicely aligned using tabs it now
looks like (after all the commits it's now called "struct discovery_state"):

	int type;
	enum {
		DISCOVERY_STOPPED,
		DISCOVERY_STARTING,
		DISCOVERY_FINDING,
		DISCOVERY_RESOLVING,
		DISCOVERY_STOPPING,
	} state;
	struct list_head all;		/* All devices found during inquiry */
	struct list_head unknown;	/* Name state not known */
	struct list_head resolve;	/* Name needs to be resolved */
	__u32		timestamp;

instead of something more reasonable like:

	int			type;
	enum {
		DISCOVERY_STOPPED,
		DISCOVERY_STARTING,
		DISCOVERY_FINDING,
		DISCOVERY_RESOLVING,
		DISCOVERY_STOPPING,
	} state;
	struct list_head	all;		/* All devices found during inquiry */
	struct list_head 	unknown;	/* Name state not known */
	struct list_head 	resolve;	/* Name needs to be resolved */
	__u32			timestamp;

The person editing this had to go out of their way to make things like this
way.

This was only three commits into your tree, therefore I'm not very
optimistic to be honest with you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller March 2, 2012, 3:23 a.m. UTC | #2
From: David Miller <davem@davemloft.net>
Date: Thu, 01 Mar 2012 22:16:43 -0500 (EST)

> This was only three commits into your tree, therefore I'm not very
> optimistic to be honest with you.

In the very next commit, 3175405b906a85ed2bad21e09c444266e4a05a8e we end
up with:

		mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
					info->dev_class, 0, 1, NULL);

which after all the rest of the commits still looks like:

		mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
					info->dev_class, 0, !name_known, ssp,
					NULL, 0);

You have to make those arguments line up properly:

		mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00,
				  info->dev_class, 0, !name_known, ssp,
				  NULL, 0);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller March 2, 2012, 3:26 a.m. UTC | #3
From: David Miller <davem@davemloft.net>
Date: Thu, 01 Mar 2012 22:23:16 -0500 (EST)

> From: David Miller <davem@davemloft.net>
> Date: Thu, 01 Mar 2012 22:16:43 -0500 (EST)
> 
>> This was only three commits into your tree, therefore I'm not very
>> optimistic to be honest with you.
> 
> In the very next commit, 3175405b906a85ed2bad21e09c444266e4a05a8e we end
> up with:

And then 2 commits later in ff9ef5787046c3fd20cf9f7ca1cd70260c1eedb9:

+	if (hdev->discovery.state != DISCOVERY_STOPPED) {
+		err = cmd_status(sk, index, MGMT_OP_START_DISCOVERY,
+						MGMT_STATUS_BUSY);
+		goto failed;
+	}

it must be isntead:

		err = cmd_status(sk, index, MGMT_OP_START_DISCOVERY,
				 MGMT_STATUS_BUSY);

And that's pretty much as far as I'm willing to go.

You know what really pisses me off?  This is the one issue I made a huge
stink about last week, arguments to function calls and prototypes lining
up properl.  And it's in ever 2nd or 3rd commit in this pull request.

This means you really didn't check or you really don't care.

Come back when you've audited this whole thing properly and honestly.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches March 2, 2012, 4:13 a.m. UTC | #4
On Thu, 2012-03-01 at 22:26 -0500, David Miller wrote:
> You know what really pisses me off?  This is the one issue I made a huge
> stink about last week, arguments to function calls and prototypes lining
> up properl.  And it's in ever 2nd or 3rd commit in this pull request.
[]
> Come back when you've audited this whole thing properly and honestly.

I submitted a patch to checkpatch for a --strict rule for
this argument alignment.  https://lkml.org/lkml/2012/2/29/644

Are there any other tests you think should be added with
--strict?

Some I think possible are:

o no space after cast
	struct foo *bar = (struct foo *) baz;
sb:
	struct foo *bar = (struct foo *)baz;

o don't start comments with /*$
  (perhaps only if a blank line proceeds the comment)
	/*
	 * multiline comment
	 * ...
	 */
sb:
	/* multiline comment
	 * ...
	 */

o coalesce formats
	pr_<level>("format part 1 "
		   "format part 2\n", ...)
sb:
	pr_<level>("format part 1 format part 2\n",
		   ...);

o symmetric brace standardization
	if (foo) {
		bar;
		baz;
	} else
		bar;
sb:
	if (foo) {
		bar;
		baz;
	} else {
		bar;
	}

Any others?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gustavo F. Padovan March 2, 2012, 4:37 p.m. UTC | #5
Hi Dave,

* David Miller <davem@davemloft.net> [2012-03-01 22:26:04 -0500]:

> From: David Miller <davem@davemloft.net>
> Date: Thu, 01 Mar 2012 22:23:16 -0500 (EST)
> 
> > From: David Miller <davem@davemloft.net>
> > Date: Thu, 01 Mar 2012 22:16:43 -0500 (EST)
> > 
> >> This was only three commits into your tree, therefore I'm not very
> >> optimistic to be honest with you.
> > 
> > In the very next commit, 3175405b906a85ed2bad21e09c444266e4a05a8e we end
> > up with:
> 
> And then 2 commits later in ff9ef5787046c3fd20cf9f7ca1cd70260c1eedb9:
> 
> +	if (hdev->discovery.state != DISCOVERY_STOPPED) {
> +		err = cmd_status(sk, index, MGMT_OP_START_DISCOVERY,
> +						MGMT_STATUS_BUSY);
> +		goto failed;
> +	}
> 
> it must be isntead:
> 
> 		err = cmd_status(sk, index, MGMT_OP_START_DISCOVERY,
> 				 MGMT_STATUS_BUSY);
> 
> And that's pretty much as far as I'm willing to go.
> 
> You know what really pisses me off?  This is the one issue I made a huge
> stink about last week, arguments to function calls and prototypes lining
> up properl.  And it's in ever 2nd or 3rd commit in this pull request.

The styles in these patches is the same style we've been using in Bluetooth
code for more than 10 years and no one ever complained to us and we are the
only subsystem under Net doing something like this. I could find some examples
over the net code in a quick look.

I can see only two options here, leave this as is since this is coding style
we've been using since beginning or change the whole Bluetooth subsystem to
work like you said. In other words, are you telling me to make a patch to fix
this issue in the whole Bluetooth subsystem and not only in this pull request
diff? Otherwise we are putting the Bluetooth code in a inconsistent state with
two different coding styles. Is that what you want, an inconsistent state?

I'd be ok with changing the whole subsystem's style if you want.

	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller March 2, 2012, 9:15 p.m. UTC | #6
From: Gustavo Padovan <padovan@profusion.mobi>
Date: Fri, 2 Mar 2012 13:37:16 -0300

> are you telling me to make a patch to fix this issue in the whole
> Bluetooth subsystem

I'm saying get it right in new code changes.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html