* [PATCH 0/2] net: thunderx: Small cleanups
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller
Cc: Sunil Goutham, Robert Richter, netdev, linux-arm-kernel,
linux-kernel, Robert Richter
From: Robert Richter <rrichter@cavium.com>
Sending two small cleanups of the driver fixing issues found during
code review.
Robert Richter (2):
net: thunderx: Fix const type in nicvf_set_rxfh()
net, thunderx: Use bool in structs where possible
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
--
2.7.0.rc3
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/2] net: thunderx: Small cleanups
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller
Cc: Robert Richter, netdev, linux-kernel, Robert Richter,
Sunil Goutham, linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
Sending two small cleanups of the driver fixing issues found during
code review.
Robert Richter (2):
net: thunderx: Fix const type in nicvf_set_rxfh()
net, thunderx: Use bool in structs where possible
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
--
2.7.0.rc3
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/2] net: thunderx: Small cleanups
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
Sending two small cleanups of the driver fixing issues found during
code review.
Robert Richter (2):
net: thunderx: Fix const type in nicvf_set_rxfh()
net, thunderx: Use bool in structs where possible
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
--
2.7.0.rc3
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/2] net: thunderx: Fix const type in nicvf_set_rxfh()
2016-02-18 12:39 ` Robert Richter
(?)
@ 2016-02-18 12:39 ` Robert Richter
-1 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller, Sunil Goutham, Robert Richter
Cc: netdev, linux-arm-kernel, linux-kernel, Robert Richter
From: Robert Richter <rrichter@cavium.com>
>From struct ethtool_ops:
int (*set_rxfh)(struct net_device *, const u32 *indir,
const u8 *key, const u8 hfunc);
Change function arg of hfunc to const type.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index a12b2e38cf61..fb79529ac8c7 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -581,7 +581,7 @@ static int nicvf_get_rxfh(struct net_device *dev, u32 *indir, u8 *hkey,
}
static int nicvf_set_rxfh(struct net_device *dev, const u32 *indir,
- const u8 *hkey, u8 hfunc)
+ const u8 *hkey, const u8 hfunc)
{
struct nicvf *nic = netdev_priv(dev);
struct nicvf_rss_info *rss = &nic->rss_info;
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/2] net: thunderx: Fix const type in nicvf_set_rxfh()
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller, Sunil Goutham, Robert Richter
Cc: Robert Richter, netdev, linux-kernel, linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
>From struct ethtool_ops:
int (*set_rxfh)(struct net_device *, const u32 *indir,
const u8 *key, const u8 hfunc);
Change function arg of hfunc to const type.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index a12b2e38cf61..fb79529ac8c7 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -581,7 +581,7 @@ static int nicvf_get_rxfh(struct net_device *dev, u32 *indir, u8 *hkey,
}
static int nicvf_set_rxfh(struct net_device *dev, const u32 *indir,
- const u8 *hkey, u8 hfunc)
+ const u8 *hkey, const u8 hfunc)
{
struct nicvf *nic = netdev_priv(dev);
struct nicvf_rss_info *rss = &nic->rss_info;
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/2] net: thunderx: Fix const type in nicvf_set_rxfh()
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
>From struct ethtool_ops:
int (*set_rxfh)(struct net_device *, const u32 *indir,
const u8 *key, const u8 hfunc);
Change function arg of hfunc to const type.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index a12b2e38cf61..fb79529ac8c7 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -581,7 +581,7 @@ static int nicvf_get_rxfh(struct net_device *dev, u32 *indir, u8 *hkey,
}
static int nicvf_set_rxfh(struct net_device *dev, const u32 *indir,
- const u8 *hkey, u8 hfunc)
+ const u8 *hkey, const u8 hfunc)
{
struct nicvf *nic = netdev_priv(dev);
struct nicvf_rss_info *rss = &nic->rss_info;
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
2016-02-18 12:39 ` Robert Richter
(?)
@ 2016-02-18 12:39 ` Robert Richter
-1 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller, Sunil Goutham, Robert Richter
Cc: netdev, linux-arm-kernel, linux-kernel, Robert Richter
From: Robert Richter <rrichter@cavium.com>
Looks like the :1 notation was accidentally introduced (this still
uses 1 byte per flag). Using bool instead, which is the common use.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index 688828865c48..fa5b1d2d8e23 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -262,9 +262,9 @@ struct nicvf {
struct pci_dev *pdev;
u8 vf_id;
u8 node;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
bool hw_tso;
u16 mtu;
struct queue_set *qs;
@@ -353,9 +353,9 @@ struct nic_cfg_msg {
u8 msg;
u8 vf_id;
u8 node_id;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
u8 mac_addr[ETH_ALEN];
};
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: David S . Miller, Sunil Goutham, Robert Richter
Cc: Robert Richter, netdev, linux-kernel, linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
Looks like the :1 notation was accidentally introduced (this still
uses 1 byte per flag). Using bool instead, which is the common use.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index 688828865c48..fa5b1d2d8e23 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -262,9 +262,9 @@ struct nicvf {
struct pci_dev *pdev;
u8 vf_id;
u8 node;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
bool hw_tso;
u16 mtu;
struct queue_set *qs;
@@ -353,9 +353,9 @@ struct nic_cfg_msg {
u8 msg;
u8 vf_id;
u8 node_id;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
u8 mac_addr[ETH_ALEN];
};
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-18 12:39 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 12:39 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter <rrichter@cavium.com>
Looks like the :1 notation was accidentally introduced (this still
uses 1 byte per flag). Using bool instead, which is the common use.
Signed-off-by: Robert Richter <rrichter@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index 688828865c48..fa5b1d2d8e23 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -262,9 +262,9 @@ struct nicvf {
struct pci_dev *pdev;
u8 vf_id;
u8 node;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
bool hw_tso;
u16 mtu;
struct queue_set *qs;
@@ -353,9 +353,9 @@ struct nic_cfg_msg {
u8 msg;
u8 vf_id;
u8 node_id;
- u8 tns_mode:1;
- u8 sqs_mode:1;
- u8 loopback_supported:1;
+ bool tns_mode;
+ bool sqs_mode;
+ bool loopback_supported;
u8 mac_addr[ETH_ALEN];
};
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] net, thunderx: Use bool in structs where possible
2016-02-18 12:39 ` Robert Richter
@ 2016-02-18 16:05 ` David Miller
-1 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2016-02-18 16:05 UTC (permalink / raw)
To: rrichter; +Cc: sgoutham, rric, netdev, linux-arm-kernel, linux-kernel, rrichter
From: Robert Richter <rrichter@caviumnetworks.com>
Date: Thu, 18 Feb 2016 13:39:09 +0100
> From: Robert Richter <rrichter@cavium.com>
>
> Looks like the :1 notation was accidentally introduced (this still
> uses 1 byte per flag). Using bool instead, which is the common use.
>
> Signed-off-by: Robert Richter <rrichter@cavium.com>
Such cleanups are not appropriate for 'net'. Only real bug fixes should
be targetted that.
Respin these patches targetting the correct tree(s).
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-18 16:05 ` David Miller
0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2016-02-18 16:05 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter <rrichter@caviumnetworks.com>
Date: Thu, 18 Feb 2016 13:39:09 +0100
> From: Robert Richter <rrichter@cavium.com>
>
> Looks like the :1 notation was accidentally introduced (this still
> uses 1 byte per flag). Using bool instead, which is the common use.
>
> Signed-off-by: Robert Richter <rrichter@cavium.com>
Such cleanups are not appropriate for 'net'. Only real bug fixes should
be targetted that.
Respin these patches targetting the correct tree(s).
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] net, thunderx: Use bool in structs where possible
2016-02-18 16:05 ` David Miller
@ 2016-02-18 16:42 ` Robert Richter
-1 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 16:42 UTC (permalink / raw)
To: David Miller; +Cc: sgoutham, rric, netdev, linux-arm-kernel, linux-kernel
On 18.02.16 11:05:14, David Miller wrote:
> From: Robert Richter <rrichter@caviumnetworks.com>
> Date: Thu, 18 Feb 2016 13:39:09 +0100
>
> > From: Robert Richter <rrichter@cavium.com>
> >
> > Looks like the :1 notation was accidentally introduced (this still
> > uses 1 byte per flag). Using bool instead, which is the common use.
> >
> > Signed-off-by: Robert Richter <rrichter@cavium.com>
>
> Such cleanups are not appropriate for 'net'. Only real bug fixes should
> be targetted that.
>
> Respin these patches targetting the correct tree(s).
Do you mean posting the two as "trivial" patches?
Thanks,
-Robert
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-18 16:42 ` Robert Richter
0 siblings, 0 replies; 18+ messages in thread
From: Robert Richter @ 2016-02-18 16:42 UTC (permalink / raw)
To: linux-arm-kernel
On 18.02.16 11:05:14, David Miller wrote:
> From: Robert Richter <rrichter@caviumnetworks.com>
> Date: Thu, 18 Feb 2016 13:39:09 +0100
>
> > From: Robert Richter <rrichter@cavium.com>
> >
> > Looks like the :1 notation was accidentally introduced (this still
> > uses 1 byte per flag). Using bool instead, which is the common use.
> >
> > Signed-off-by: Robert Richter <rrichter@cavium.com>
>
> Such cleanups are not appropriate for 'net'. Only real bug fixes should
> be targetted that.
>
> Respin these patches targetting the correct tree(s).
Do you mean posting the two as "trivial" patches?
Thanks,
-Robert
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] net, thunderx: Use bool in structs where possible
2016-02-18 16:42 ` Robert Richter
@ 2016-02-18 20:06 ` David Miller
-1 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2016-02-18 20:06 UTC (permalink / raw)
To: robert.richter; +Cc: sgoutham, rric, netdev, linux-arm-kernel, linux-kernel
From: Robert Richter <robert.richter@caviumnetworks.com>
Date: Thu, 18 Feb 2016 17:42:17 +0100
> On 18.02.16 11:05:14, David Miller wrote:
>> From: Robert Richter <rrichter@caviumnetworks.com>
>> Date: Thu, 18 Feb 2016 13:39:09 +0100
>>
>> > From: Robert Richter <rrichter@cavium.com>
>> >
>> > Looks like the :1 notation was accidentally introduced (this still
>> > uses 1 byte per flag). Using bool instead, which is the common use.
>> >
>> > Signed-off-by: Robert Richter <rrichter@cavium.com>
>>
>> Such cleanups are not appropriate for 'net'. Only real bug fixes should
>> be targetted that.
>>
>> Respin these patches targetting the correct tree(s).
>
> Do you mean posting the two as "trivial" patches?
No I mean posting #1 targetted at my 'net' GIT tree as a bug fix,
and posting #2 targetted separately at my 'net-next' GIT tree as
a cleanup.
This is how we've been doing things for more than a decade.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-18 20:06 ` David Miller
0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2016-02-18 20:06 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter <robert.richter@caviumnetworks.com>
Date: Thu, 18 Feb 2016 17:42:17 +0100
> On 18.02.16 11:05:14, David Miller wrote:
>> From: Robert Richter <rrichter@caviumnetworks.com>
>> Date: Thu, 18 Feb 2016 13:39:09 +0100
>>
>> > From: Robert Richter <rrichter@cavium.com>
>> >
>> > Looks like the :1 notation was accidentally introduced (this still
>> > uses 1 byte per flag). Using bool instead, which is the common use.
>> >
>> > Signed-off-by: Robert Richter <rrichter@cavium.com>
>>
>> Such cleanups are not appropriate for 'net'. Only real bug fixes should
>> be targetted that.
>>
>> Respin these patches targetting the correct tree(s).
>
> Do you mean posting the two as "trivial" patches?
No I mean posting #1 targetted at my 'net' GIT tree as a bug fix,
and posting #2 targetted separately at my 'net-next' GIT tree as
a cleanup.
This is how we've been doing things for more than a decade.
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] net, thunderx: Use bool in structs where possible
2016-02-18 12:39 ` Robert Richter
(?)
@ 2016-02-22 11:00 ` David Laight
-1 siblings, 0 replies; 18+ messages in thread
From: David Laight @ 2016-02-22 11:00 UTC (permalink / raw)
To: 'Robert Richter',
David S . Miller, Sunil Goutham, Robert Richter
Cc: netdev, linux-arm-kernel, linux-kernel, Robert Richter
From: Robert Richter
> Sent: 18 February 2016 12:39
> From: Robert Richter <rrichter@cavium.com>
>
> Looks like the :1 notation was accidentally introduced (this still
> uses 1 byte per flag). Using bool instead, which is the common use.
>
> Signed-off-by: Robert Richter <rrichter@cavium.com>
> ---
> drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
> index 688828865c48..fa5b1d2d8e23 100644
> --- a/drivers/net/ethernet/cavium/thunder/nic.h
> +++ b/drivers/net/ethernet/cavium/thunder/nic.h
> @@ -262,9 +262,9 @@ struct nicvf {
> struct pci_dev *pdev;
> u8 vf_id;
> u8 node;
> - u8 tns_mode:1;
> - u8 sqs_mode:1;
> - u8 loopback_supported:1;
> + bool tns_mode;
> + bool sqs_mode;
> + bool loopback_supported;
> bool hw_tso;
> u16 mtu;
> struct queue_set *qs;
If the size of the structure matters, you've just made it two bytes larger.
(Although it looks like there is some padding).
David
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-22 11:00 ` David Laight
0 siblings, 0 replies; 18+ messages in thread
From: David Laight @ 2016-02-22 11:00 UTC (permalink / raw)
To: 'Robert Richter',
David S . Miller, Sunil Goutham, Robert Richter
Cc: netdev, linux-arm-kernel, linux-kernel, Robert Richter
From: Robert Richter
> Sent: 18 February 2016 12:39
> From: Robert Richter <rrichter@cavium.com>
>
> Looks like the :1 notation was accidentally introduced (this still
> uses 1 byte per flag). Using bool instead, which is the common use.
>
> Signed-off-by: Robert Richter <rrichter@cavium.com>
> ---
> drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
> index 688828865c48..fa5b1d2d8e23 100644
> --- a/drivers/net/ethernet/cavium/thunder/nic.h
> +++ b/drivers/net/ethernet/cavium/thunder/nic.h
> @@ -262,9 +262,9 @@ struct nicvf {
> struct pci_dev *pdev;
> u8 vf_id;
> u8 node;
> - u8 tns_mode:1;
> - u8 sqs_mode:1;
> - u8 loopback_supported:1;
> + bool tns_mode;
> + bool sqs_mode;
> + bool loopback_supported;
> bool hw_tso;
> u16 mtu;
> struct queue_set *qs;
If the size of the structure matters, you've just made it two bytes larger.
(Although it looks like there is some padding).
David
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/2] net, thunderx: Use bool in structs where possible
@ 2016-02-22 11:00 ` David Laight
0 siblings, 0 replies; 18+ messages in thread
From: David Laight @ 2016-02-22 11:00 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Richter
> Sent: 18 February 2016 12:39
> From: Robert Richter <rrichter@cavium.com>
>
> Looks like the :1 notation was accidentally introduced (this still
> uses 1 byte per flag). Using bool instead, which is the common use.
>
> Signed-off-by: Robert Richter <rrichter@cavium.com>
> ---
> drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
> index 688828865c48..fa5b1d2d8e23 100644
> --- a/drivers/net/ethernet/cavium/thunder/nic.h
> +++ b/drivers/net/ethernet/cavium/thunder/nic.h
> @@ -262,9 +262,9 @@ struct nicvf {
> struct pci_dev *pdev;
> u8 vf_id;
> u8 node;
> - u8 tns_mode:1;
> - u8 sqs_mode:1;
> - u8 loopback_supported:1;
> + bool tns_mode;
> + bool sqs_mode;
> + bool loopback_supported;
> bool hw_tso;
> u16 mtu;
> struct queue_set *qs;
If the size of the structure matters, you've just made it two bytes larger.
(Although it looks like there is some padding).
David
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2016-02-22 11:03 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 12:39 [PATCH 0/2] net: thunderx: Small cleanups Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 12:39 ` [PATCH 1/2] net: thunderx: Fix const type in nicvf_set_rxfh() Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 12:39 ` [PATCH 2/2] net, thunderx: Use bool in structs where possible Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 12:39 ` Robert Richter
2016-02-18 16:05 ` David Miller
2016-02-18 16:05 ` David Miller
2016-02-18 16:42 ` Robert Richter
2016-02-18 16:42 ` Robert Richter
2016-02-18 20:06 ` David Miller
2016-02-18 20:06 ` David Miller
2016-02-22 11:00 ` David Laight
2016-02-22 11:00 ` David Laight
2016-02-22 11:00 ` David Laight
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.