All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bluetooth-next] mac802154: fix typo for device
@ 2015-04-09  6:35 varkabhadram
  2015-04-09  7:21 ` Alexander Aring
  2015-04-09  7:24 ` Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: varkabhadram @ 2015-04-09  6:35 UTC (permalink / raw)
  To: linux-wpan; +Cc: alex.aring, Varka Bhadram

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 */
 struct ieee802154_hw *
 ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops);
 void ieee802154_free_hw(struct ieee802154_hw *hw);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH bluetooth-next] mac802154: fix typo for device
  2015-04-09  6:35 [PATCH bluetooth-next] mac802154: fix typo for device varkabhadram
@ 2015-04-09  7:21 ` Alexander Aring
  2015-04-09  7:26   ` Marcel Holtmann
  2015-04-09  7:24 ` Marcel Holtmann
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Aring @ 2015-04-09  7:21 UTC (permalink / raw)
  To: varkabhadram; +Cc: linux-wpan, Varka Bhadram

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bluetooth-next] mac802154: fix typo for device
  2015-04-09  6:35 [PATCH bluetooth-next] mac802154: fix typo for device varkabhadram
  2015-04-09  7:21 ` Alexander Aring
@ 2015-04-09  7:24 ` Marcel Holtmann
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2015-04-09  7:24 UTC (permalink / raw)
  To: varkabhadram; +Cc: linux-wpan, alex.aring, Varka Bhadram

Hi Varka,

> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
> include/net/mac802154.h |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bluetooth-next] mac802154: fix typo for device
  2015-04-09  7:21 ` Alexander Aring
@ 2015-04-09  7:26   ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2015-04-09  7:26 UTC (permalink / raw)
  To: Alexander Aring; +Cc: varkabhadram, linux-wpan, Varka Bhadram

Hi Alex,

>> 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 */

so I took this patch already since it was obviously making it better than it was before. Once you decide on how you want to handle the comments, please just send cleanup patches that fix all locations.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-09  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09  6:35 [PATCH bluetooth-next] mac802154: fix typo for device varkabhadram
2015-04-09  7:21 ` Alexander Aring
2015-04-09  7:26   ` Marcel Holtmann
2015-04-09  7:24 ` Marcel Holtmann

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.