All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "daniele.biagetti@cblelectronics.com" 
	<daniele.biagetti@cblelectronics.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 1/4] meshctl: Subscription Delete message added to configuration client
Date: Mon, 20 May 2019 04:15:13 +0000	[thread overview]
Message-ID: <12921b4b0de3636196735121c66296cb3b130170.camel@intel.com> (raw)
In-Reply-To: <000601d50bf4$b0527f60$10f77e20$@cblelectronics.com>

[-- Attachment #1: Type: text/plain, Size: 3367 bytes --]

Hi Daniele,

On Thu, 2019-05-16 at 16:35 +0200, Daniele Biagetti wrote:
> Subscription delete command/message added to the 
> configuration client model.
> 
> Signed-off-by: Daniele Biagetti <daniele.biagetti@cblelectronics.com>

The submitted patches should not contain "Signed-off-by"

> 
> ---
>  tools/mesh/config-client.c | 40
> ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/tools/mesh/config-client.c b/tools/mesh/config-client.c
> index df2643622..bff38e7a3 100644
> --- a/tools/mesh/config-client.c
> +++ b/tools/mesh/config-client.c
> @@ -1042,6 +1042,44 @@ static void cmd_sub_get(int argc, char
> *argv[])
>  	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
>  }
>  
> +static void cmd_sub_del(int argc, char *argv[])
> +{
> +        uint16_t n;
> +        uint8_t msg[32];
> +        int parm_cnt;
> +
> +        if (IS_UNASSIGNED(target)) {
> +                bt_shell_printf("Destination not set\n");
> +                return bt_shell_noninteractive_quit(EXIT_FAILURE);
> +        }
> +
> +        n = mesh_opcode_set(OP_CONFIG_MODEL_SUB_DELETE, msg);
> +
> +        parm_cnt = read_input_parameters(argc, argv);
> +        if (parm_cnt != 3) {
> +                bt_shell_printf("Bad arguments: %s\n", argv[1]);
> +                return bt_shell_noninteractive_quit(EXIT_FAILURE);
> +        }
> +
> +        /* Per Mesh Profile 4.3.2.19 */
> +        /* Element Address */
> +        put_le16(parms[0], msg + n);
> +        n += 2;
> +        /* Subscription Address */
> +        put_le16(parms[1], msg + n);
> +        n += 2;
> +        /* SIG Model ID */
> +        put_le16(parms[2], msg + n);
> +        n += 2;
> +
> +        if (!config_send(msg, n)) {
> +                bt_shell_printf("Failed to send \"ADD
> SUBSCRIPTION\"\n");
> +                return bt_shell_noninteractive_quit(EXIT_FAILURE);
> +        }
> +
> +        return bt_shell_noninteractive_quit(EXIT_SUCCESS);
> +}
> +
>  static void cmd_mod_appidx_get(int argc, char *argv[])
>  {
>  	uint16_t n;
> @@ -1237,6 +1275,8 @@ static const struct bt_shell_menu cfg_menu = {
>  				cmd_sub_add,    "Add subscription"},
>  	{"sub-get", "<ele_addr> <model id>",
>  				cmd_sub_get,    "Get subscription"},
> +	{"sub-del", "<ele_addr> <sub_addr> <model id>",
> +				cmd_sub_del,    "Delete subscription"},
>  	{"node-reset",		NULL,                    cmd_node_res
> et,
>  				"Reset a node and remove it from
> network"},
>  	{} },

Could you please re-format your patches so they do not contain DOS
style  end-of-line (^M)?

Please make sure that you follow the guidelines from
bluez/doc/coding-style.txt

Also, a general comment about commit message style: it is strongly
preferred that the commit subject line statement is in imprerative
mood, see good description here: 
https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53

Ome more thing. In general, when submitting a patch set, i.e., more
than one patch, it's a good practice to precede the set with a cover
letter (i.e., use --cover-letter option with your "git format-patch"
command) that describes what is the purpose of this patch set. When
submitting a single patch, a descriptive commit message is normally
sufficient enough.

Best regards,

Inga

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]

      reply	other threads:[~2019-05-20  4:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 14:35 [PATCH 1/4] meshctl: Subscription Delete message added to configuration client Daniele Biagetti
2019-05-20  4:15 ` Stotland, Inga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12921b4b0de3636196735121c66296cb3b130170.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=daniele.biagetti@cblelectronics.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.