All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH v3] genl: Add unicast handler
Date: Thu, 07 Jul 2016 18:52:33 -0500	[thread overview]
Message-ID: <577EEB41.1020307@gmail.com> (raw)
In-Reply-To: <0734F1C385189A4F8523BB7BB31464D74D379661@fmsmsx111.amr.corp.intel.com>

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

Hi Tim,

 >>
>> So to me this pid argument seems unnecessary.  Also, this change is side-
>> effecting l_genl_new(int fd) method which you are removing.  While nobody
>> is using it at the moment, removing it in this fashion is poor style (since
>> l_genl_set_close_on_unref is mostly meant for this constructor)
>
> FYI: This was your suggestion to my original patch .

Was it?  Don't recall.  I was probably under the assumption that pid 
setting was required.  I do reserve the right to change my mind, 
especially when looking at things more closely ;)

I'm picking on the procedural aspect.  E.g. if we remove something, then 
we should make sure it is done thoroughly (maybe even in a separate 
commit) and hopefully mention it in the commit description.

Once you start using git blame and hunting for why a piece of code looks 
the way it looks, having nice git history becomes paramount.

>>>
>>> +bool l_genl_set_unicast_handler(struct l_genl *genl,
>>> +						l_genl_msg_func_t handler,
>>> +						void *user_data,
>>> +						l_genl_destroy_func_t
>> destroy);
>>> +
>>> +bool l_genl_unset_unicast_handler(struct l_genl *genl);
>>
>> I rather we simply use l_genl_set_unicast_handler with NULL handler
>> argument to accomplish this.
>
> I was thinking about it, but then the API does not look self-explanatory.
>

This is inconsistent with the rest of ell API though.  For example, see 
l_io_set_read_handler, l_io_set_write_handler, 
l_io_set_disconnect_handler, etc.  Any clarifying details can also be 
added to the docs.

Regards,
-Denis


      reply	other threads:[~2016-07-07 23:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 23:14 [PATCH v3] genl: Add unicast handler Tim Kourt
2016-07-07 22:22 ` Denis Kenzior
2016-07-07 23:03   ` Kourt, Tim A
2016-07-07 23:52     ` Denis Kenzior [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=577EEB41.1020307@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.01.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.