netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition
@ 2023-11-28 17:48 Andy Shevchenko
  2023-11-28 20:22 ` Vinicius Costa Gomes
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andy Shevchenko @ 2023-11-28 17:48 UTC (permalink / raw)
  To: Andy Shevchenko, netdev, linux-kernel
  Cc: Vinicius Costa Gomes, Jamal Hadi Salim, Cong Wang, Jiri Pirko,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni

BYTES_PER_KBIT is defined in units.h, use that definition.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 net/sched/sch_cbs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c
index 9a0b85190a2c..beece8e82c23 100644
--- a/net/sched/sch_cbs.c
+++ b/net/sched/sch_cbs.c
@@ -57,6 +57,8 @@
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/skbuff.h>
+#include <linux/units.h>
+
 #include <net/netevent.h>
 #include <net/netlink.h>
 #include <net/sch_generic.h>
@@ -65,8 +67,6 @@
 static LIST_HEAD(cbs_list);
 static DEFINE_SPINLOCK(cbs_list_lock);
 
-#define BYTES_PER_KBIT (1000LL / 8)
-
 struct cbs_sched_data {
 	bool offload;
 	int queue;
-- 
2.43.0.rc1.1.gbec44491f096


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

* Re: [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition
  2023-11-28 17:48 [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition Andy Shevchenko
@ 2023-11-28 20:22 ` Vinicius Costa Gomes
  2023-11-30 21:03 ` Simon Horman
  2023-12-01  7:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Vinicius Costa Gomes @ 2023-11-28 20:22 UTC (permalink / raw)
  To: Andy Shevchenko, Andy Shevchenko, netdev, linux-kernel
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> BYTES_PER_KBIT is defined in units.h, use that definition.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>


-- 
Vinicius

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

* Re: [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition
  2023-11-28 17:48 [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition Andy Shevchenko
  2023-11-28 20:22 ` Vinicius Costa Gomes
@ 2023-11-30 21:03 ` Simon Horman
  2023-11-30 21:04   ` Simon Horman
  2023-12-01  7:20 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2023-11-30 21:03 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: netdev, linux-kernel, Vinicius Costa Gomes, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni

On Tue, Nov 28, 2023 at 07:48:13PM +0200, Andy Shevchenko wrote:
> BYTES_PER_KBIT is defined in units.h, use that definition.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

Did you consider a patch to update sja1105_main.c?
It also seems to have a copy of BYTES_PER_KBIT.

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

* Re: [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition
  2023-11-30 21:03 ` Simon Horman
@ 2023-11-30 21:04   ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-11-30 21:04 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: netdev, linux-kernel, Vinicius Costa Gomes, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni

On Thu, Nov 30, 2023 at 09:03:44PM +0000, Simon Horman wrote:
> On Tue, Nov 28, 2023 at 07:48:13PM +0200, Andy Shevchenko wrote:
> > BYTES_PER_KBIT is defined in units.h, use that definition.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Thanks, this looks good to me.
> 
> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Did you consider a patch to update sja1105_main.c?
> It also seems to have a copy of BYTES_PER_KBIT.

I now see that you did :)

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

* Re: [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition
  2023-11-28 17:48 [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition Andy Shevchenko
  2023-11-28 20:22 ` Vinicius Costa Gomes
  2023-11-30 21:03 ` Simon Horman
@ 2023-12-01  7:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-12-01  7:20 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: netdev, linux-kernel, vinicius.gomes, jhs, xiyou.wangcong, jiri,
	davem, edumazet, kuba, pabeni

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 28 Nov 2023 19:48:13 +0200 you wrote:
> BYTES_PER_KBIT is defined in units.h, use that definition.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  net/sched/sch_cbs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [net-next,v1,1/1] net/sched: cbs: Use units.h instead of the copy of a definition
    https://git.kernel.org/netdev/net-next/c/000db9e9ad42

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-12-01  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 17:48 [PATCH net-next v1 1/1] net/sched: cbs: Use units.h instead of the copy of a definition Andy Shevchenko
2023-11-28 20:22 ` Vinicius Costa Gomes
2023-11-30 21:03 ` Simon Horman
2023-11-30 21:04   ` Simon Horman
2023-12-01  7:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).