All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: varkabhadram@gmail.com
Cc: linux-wpan@vger.kernel.org, Varka Bhadram <varkab@cdac.in>
Subject: Re: [PATCH bluetooth-next] mac802154: fix typo for device
Date: Thu, 9 Apr 2015 09:21:50 +0200	[thread overview]
Message-ID: <20150409072147.GA1261@omega> (raw)
In-Reply-To: <1428561343-32752-1-git-send-email-varkabhadram@gmail.com>

Hi Varka,

On Thu, Apr 09, 2015 at 12:05:43PM +0530, varkabhadram@gmail.com wrote:
> From: Varka Bhadram <varkab@cdac.in>
> 
> 
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
>  include/net/mac802154.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/mac802154.h b/include/net/mac802154.h
> index d6a809e..56ef97a 100644
> --- a/include/net/mac802154.h
> +++ b/include/net/mac802154.h
> @@ -247,7 +247,7 @@ static inline void ieee802154_le64_to_be64(void *be64_dst, const void *le64_src)
>  	__put_unaligned_memmove64(swab64p(le64_src), be64_dst);
>  }
>  
> -/* Basic interface to register ieee802154 hwice */
> +/* Basic interface to register ieee802154 device */

This typo occured when I did a 's/dev/hw/' in my editor. This replaced
all dev to hw.

I did this because the variable was always named "dev" which was very
confusing to handle between netdev "dev" and this one. Look at commit:

5a50439775853a8d565115edb63a5ab4bb780479 ("ieee802154: rename
ieee802154_dev to ieee802154_hw")

For keeping the wireless naming conventation.

This also means that calling this "device" is wrong and "hw" is correct.
So we should change the comment to:

/* Basic interface to register ieee802154 hw */

or

/* Basic interface to register ieee802154 hardware */

>  struct ieee802154_hw *
>  ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops);

This comment is also some kind of useless. What I mean is the comment
describes a "basic interface for register ...", better would be a
comment above each function like.

/**
 *	ieee802154_register_hw - register the ieee802154 hardware
 *	@hw: ieee802154 hardware
 *
 * Registers the ieee802154 hw struct into the mac802154 subsystem.
 */
... ieee802154_register_hw ...

/**
 *	ieee802154_free_hw - your imagination
 *	@hw: ieee802154 hardware
 *
 * Your imagination ... the ieee802154_hw should called
 * ieee802154_unregister_hw before.
 */
... ieee802154_register_hw ...


Something like that, if you want to change the typo, I am also fine
with that. :-)

For general comment style I simple lookup:

include/linux/netdevice.h - how "real" netdev coreapi deals with
comments.

btw: I think the most important comments would be for the nl802154
header.

>  void ieee802154_free_hw(struct ieee802154_hw *hw);

- Alex

  reply	other threads:[~2015-04-09  7:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  6:35 [PATCH bluetooth-next] mac802154: fix typo for device varkabhadram
2015-04-09  7:21 ` Alexander Aring [this message]
2015-04-09  7:26   ` Marcel Holtmann
2015-04-09  7:24 ` Marcel Holtmann

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=20150409072147.GA1261@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=varkab@cdac.in \
    --cc=varkabhadram@gmail.com \
    /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.