Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] net/bluetooth: remove __get_channel/dir
@ 2020-01-21  8:49 Alex Shi
  2020-01-21 16:19 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Shi @ 2020-01-21  8:49 UTC (permalink / raw)
  To: unlisted-recipients:; (no To-header on input)
  Cc: Marcel Holtmann, Johan Hedberg, David S. Miller,
	Gustavo A. R. Silva, linux-bluetooth, netdev, linux-kernel

These 2 macros are never used from first git commit Linux-2.6.12-rc2. So
better to remove them.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Marcel Holtmann <marcel@holtmann.org> 
Cc: Johan Hedberg <johan.hedberg@gmail.com> 
Cc: "David S. Miller" <davem@davemloft.net> 
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> 
Cc: linux-bluetooth@vger.kernel.org 
Cc: netdev@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 net/bluetooth/rfcomm/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 3a9e9d9670be..825adff79f13 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 
 /* ---- RFCOMM frame parsing macros ---- */
 #define __get_dlci(b)     ((b & 0xfc) >> 2)
-#define __get_channel(b)  ((b & 0xf8) >> 3)
-#define __get_dir(b)      ((b & 0x04) >> 2)
 #define __get_type(b)     ((b & 0xef))
 
 #define __test_ea(b)      ((b & 0x01))
-- 
1.8.3.1


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

* Re: [PATCH] net/bluetooth: remove __get_channel/dir
  2020-01-21  8:49 [PATCH] net/bluetooth: remove __get_channel/dir Alex Shi
@ 2020-01-21 16:19 ` Marcel Holtmann
  2020-02-04 11:28   ` Alex Shi
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2020-01-21 16:19 UTC (permalink / raw)
  To: Alex Shi
  Cc: Johan Hedberg, David S. Miller, Gustavo A. R. Silva,
	linux-bluetooth, netdev, linux-kernel

Hi Alex,

> These 2 macros are never used from first git commit Linux-2.6.12-rc2. So
> better to remove them.
> 
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Marcel Holtmann <marcel@holtmann.org> 
> Cc: Johan Hedberg <johan.hedberg@gmail.com> 
> Cc: "David S. Miller" <davem@davemloft.net> 
> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> 
> Cc: linux-bluetooth@vger.kernel.org 
> Cc: netdev@vger.kernel.org 
> Cc: linux-kernel@vger.kernel.org 
> ---
> net/bluetooth/rfcomm/core.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
> index 3a9e9d9670be..825adff79f13 100644
> --- a/net/bluetooth/rfcomm/core.c
> +++ b/net/bluetooth/rfcomm/core.c
> @@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
> 
> /* ---- RFCOMM frame parsing macros ---- */
> #define __get_dlci(b)     ((b & 0xfc) >> 2)
> -#define __get_channel(b)  ((b & 0xf8) >> 3)
> -#define __get_dir(b)      ((b & 0x04) >> 2)
> #define __get_type(b)     ((b & 0xef))
> 
> #define __test_ea(b)      ((b & 0x01))

it seems we are also not using __dir macro either.

Regards

Marcel


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

* Re: [PATCH] net/bluetooth: remove __get_channel/dir
  2020-01-21 16:19 ` Marcel Holtmann
@ 2020-02-04 11:28   ` Alex Shi
  2020-02-04 14:58     ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Shi @ 2020-02-04 11:28 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Johan Hedberg, David S. Miller, Gustavo A. R. Silva,
	linux-bluetooth, netdev, linux-kernel



在 2020/1/22 上午12:19, Marcel Holtmann 写道:
> Hi Alex,
> 
>> These 2 macros are never used from first git commit Linux-2.6.12-rc2. So
>> better to remove them.
>>
>> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
>> Cc: Marcel Holtmann <marcel@holtmann.org> 
>> Cc: Johan Hedberg <johan.hedberg@gmail.com> 
>> Cc: "David S. Miller" <davem@davemloft.net> 
>> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> 
>> Cc: linux-bluetooth@vger.kernel.org 
>> Cc: netdev@vger.kernel.org 
>> Cc: linux-kernel@vger.kernel.org 
>> ---
>> net/bluetooth/rfcomm/core.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
>> index 3a9e9d9670be..825adff79f13 100644
>> --- a/net/bluetooth/rfcomm/core.c
>> +++ b/net/bluetooth/rfcomm/core.c
>> @@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
>>
>> /* ---- RFCOMM frame parsing macros ---- */
>> #define __get_dlci(b)     ((b & 0xfc) >> 2)
>> -#define __get_channel(b)  ((b & 0xf8) >> 3)
>> -#define __get_dir(b)      ((b & 0x04) >> 2)
>> #define __get_type(b)     ((b & 0xef))
>>
>> #define __test_ea(b)      ((b & 0x01))
> 
> it seems we are also not using __dir macro either.
> 

Hi Marcel,

Thanks a lot for reminder. How about the following patch?

Thanks
Alex

From 41ef02c2f52cee1d69bb0ba0fbd90247d61dc155 Mon Sep 17 00:00:00 2001
From: Alex Shi <alex.shi@linux.alibaba.com>
Date: Wed, 15 Jan 2020 17:11:01 +0800
Subject: [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir

These 3 macros are never used from first git commit Linux-2.6.12-rc2.
let's remove them.

Suggested-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 net/bluetooth/rfcomm/core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 3a9e9d9670be..dcecce087b24 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 
 /* ---- RFCOMM frame parsing macros ---- */
 #define __get_dlci(b)     ((b & 0xfc) >> 2)
-#define __get_channel(b)  ((b & 0xf8) >> 3)
-#define __get_dir(b)      ((b & 0x04) >> 2)
 #define __get_type(b)     ((b & 0xef))
 
 #define __test_ea(b)      ((b & 0x01))
@@ -87,7 +85,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 #define __ctrl(type, pf)       (((type & 0xef) | (pf << 4)))
 #define __dlci(dir, chn)       (((chn & 0x1f) << 1) | dir)
 #define __srv_channel(dlci)    (dlci >> 1)
-#define __dir(dlci)            (dlci & 0x01)
 
 #define __len8(len)       (((len) << 1) | 1)
 #define __len16(len)      ((len) << 1)
-- 
1.8.3.1


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

* Re: [PATCH] net/bluetooth: remove __get_channel/dir
  2020-02-04 11:28   ` Alex Shi
@ 2020-02-04 14:58     ` Marcel Holtmann
  2020-02-05  3:23       ` [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir Alex Shi
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2020-02-04 14:58 UTC (permalink / raw)
  To: Alex Shi
  Cc: Johan Hedberg, David S. Miller, Gustavo A. R. Silva,
	linux-bluetooth, netdev, linux-kernel

Hi Alex,

>>> These 2 macros are never used from first git commit Linux-2.6.12-rc2. So
>>> better to remove them.
>>> 
>>> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
>>> Cc: Marcel Holtmann <marcel@holtmann.org> 
>>> Cc: Johan Hedberg <johan.hedberg@gmail.com> 
>>> Cc: "David S. Miller" <davem@davemloft.net> 
>>> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> 
>>> Cc: linux-bluetooth@vger.kernel.org 
>>> Cc: netdev@vger.kernel.org 
>>> Cc: linux-kernel@vger.kernel.org 
>>> ---
>>> net/bluetooth/rfcomm/core.c | 2 --
>>> 1 file changed, 2 deletions(-)
>>> 
>>> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
>>> index 3a9e9d9670be..825adff79f13 100644
>>> --- a/net/bluetooth/rfcomm/core.c
>>> +++ b/net/bluetooth/rfcomm/core.c
>>> @@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
>>> 
>>> /* ---- RFCOMM frame parsing macros ---- */
>>> #define __get_dlci(b)     ((b & 0xfc) >> 2)
>>> -#define __get_channel(b)  ((b & 0xf8) >> 3)
>>> -#define __get_dir(b)      ((b & 0x04) >> 2)
>>> #define __get_type(b)     ((b & 0xef))
>>> 
>>> #define __test_ea(b)      ((b & 0x01))
>> 
>> it seems we are also not using __dir macro either.
>> 
> 
> Hi Marcel,
> 
> Thanks a lot for reminder. How about the following patch?
> 
> Thanks
> Alex
> 
> From 41ef02c2f52cee1d69bb0ba0fbd90247d61dc155 Mon Sep 17 00:00:00 2001
> From: Alex Shi <alex.shi@linux.alibaba.com>
> Date: Wed, 15 Jan 2020 17:11:01 +0800
> Subject: [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir
> 
> These 3 macros are never used from first git commit Linux-2.6.12-rc2.
> let's remove them.
> 
> Suggested-by: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Cc: linux-bluetooth@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> net/bluetooth/rfcomm/core.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
> index 3a9e9d9670be..dcecce087b24 100644
> --- a/net/bluetooth/rfcomm/core.c
> +++ b/net/bluetooth/rfcomm/core.c
> @@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
> 
> /* ---- RFCOMM frame parsing macros ---- */
> #define __get_dlci(b)     ((b & 0xfc) >> 2)
> -#define __get_channel(b)  ((b & 0xf8) >> 3)
> -#define __get_dir(b)      ((b & 0x04) >> 2)
> #define __get_type(b)     ((b & 0xef))
> 
> #define __test_ea(b)      ((b & 0x01))
> @@ -87,7 +85,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
> #define __ctrl(type, pf)       (((type & 0xef) | (pf << 4)))
> #define __dlci(dir, chn)       (((chn & 0x1f) << 1) | dir)
> #define __srv_channel(dlci)    (dlci >> 1)
> -#define __dir(dlci)            (dlci & 0x01)
> 
> #define __len8(len)       (((len) << 1) | 1)
> #define __len16(len)      ((len) << 1)

just send a proper patch to the mailing list so that I can apply it.

Regards

Marcel


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

* [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir
  2020-02-04 14:58     ` Marcel Holtmann
@ 2020-02-05  3:23       ` Alex Shi
  2020-02-05  8:08         ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Shi @ 2020-02-05  3:23 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Johan Hedberg, David S. Miller, Gustavo A. R. Silva,
	linux-bluetooth, netdev, linux-kernel


These 3 macros are never used from first git commit Linux-2.6.12-rc2.
let's remove them.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 net/bluetooth/rfcomm/core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 3a9e9d9670be..dcecce087b24 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -73,8 +73,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 
 /* ---- RFCOMM frame parsing macros ---- */
 #define __get_dlci(b)     ((b & 0xfc) >> 2)
-#define __get_channel(b)  ((b & 0xf8) >> 3)
-#define __get_dir(b)      ((b & 0x04) >> 2)
 #define __get_type(b)     ((b & 0xef))
 
 #define __test_ea(b)      ((b & 0x01))
@@ -87,7 +85,6 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 #define __ctrl(type, pf)       (((type & 0xef) | (pf << 4)))
 #define __dlci(dir, chn)       (((chn & 0x1f) << 1) | dir)
 #define __srv_channel(dlci)    (dlci >> 1)
-#define __dir(dlci)            (dlci & 0x01)
 
 #define __len8(len)       (((len) << 1) | 1)
 #define __len16(len)      ((len) << 1)
-- 
1.8.3.1



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

* Re: [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir
  2020-02-05  3:23       ` [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir Alex Shi
@ 2020-02-05  8:08         ` Marcel Holtmann
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2020-02-05  8:08 UTC (permalink / raw)
  To: Alex Shi
  Cc: Johan Hedberg, David S. Miller, Gustavo A. R. Silva,
	linux-bluetooth, netdev, linux-kernel

Hi Alex,

> These 3 macros are never used from first git commit Linux-2.6.12-rc2.
> let's remove them.
> 
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Cc: linux-bluetooth@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> net/bluetooth/rfcomm/core.c | 3 ---
> 1 file changed, 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  8:49 [PATCH] net/bluetooth: remove __get_channel/dir Alex Shi
2020-01-21 16:19 ` Marcel Holtmann
2020-02-04 11:28   ` Alex Shi
2020-02-04 14:58     ` Marcel Holtmann
2020-02-05  3:23       ` [PATCH v2] net/bluetooth: remove __get_channel/dir and __dir Alex Shi
2020-02-05  8:08         ` Marcel Holtmann

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git