Re: [PATCH v4 3/5] Bluetooth: Add read_local_oob_data management command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Szymon,

Just a few minor tips:

On Mon, Mar 21, 2011 at 11:43 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> +       cmd = mgmt_pending_add(sk, MGMT_OP_READ_LOCAL_OOB_DATA, index, NULL, 0);
> +
> +       if (!cmd) {
> +               err = -ENOMEM;
> +               goto unlock;
> +       }

No empty line before the if() above.

> +
> +       err = hci_send_cmd(hdev, HCI_OP_READ_LOCAL_OOB_DATA, 0, NULL);
> +
> +       if (err < 0)
> +               mgmt_pending_remove(cmd);

Same above.

> +       } else {
> +               struct mgmt_rp_read_local_oob_data rp;
> +
> +               memcpy(rp.hash, hash, 16);
> +               memcpy(rp.randomizer, randomizer, 16);

What about using "sizeof(rp.hash)" and "sizeof(rp.randomizer)" ?

> +
> +               err = cmd_complete(cmd->sk, index, MGMT_OP_READ_LOCAL_OOB_DATA,
> +                                                       &rp, sizeof(rp));
> +       }
> +
> +       mgmt_pending_remove(cmd);
> +
> +       return err;
> +}
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux