Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Saeed Mahameed
On Thu, Jun 23, 2016 at 8:27 AM, Leon Romanovsky wrote: > On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: >> The logging macros create a bit of duplicated code/text. >> >> Use specialized functions to reduce the duplication. >> >> (defconfig/x86-64) >> $ size drivers/net/ethernet/mell

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Saeed Mahameed
On Wed, Jun 22, 2016 at 9:23 PM, Joe Perches wrote: [...] > --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c > @@ -1557,3 +1557,37 @@ static void __exit cleanup(void) > > module_init(init); > module_exit(cleanup); > + > +void mlx5_core_e

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
On Thu, Jun 23, 2016 at 08:27:01AM +0300, Leon Romanovsky wrote: > On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > > The logging macros create a bit of duplicated code/text. > > > > Use specialized functions to reduce the duplication. > > > > (defconfig/x86-64) > > $ size drivers/n

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-23 Thread Leon Romanovsky
On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > The logging macros create a bit of duplicated code/text. > > Use specialized functions to reduce the duplication. > > (defconfig/x86-64) > $ size drivers/net/ethernet/mellanox/mlx5/core/built-in.o* >    text    data bss

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-22 Thread Joe Perches
On Wed, 2016-06-22 at 14:40 -0600, Jason Gunthorpe wrote: > On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > > The output changes now do not include line #, but do include the > > function offset. > I've been using a technique like this in some code with good results: > > struct sour

Re: [PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-22 Thread Jason Gunthorpe
On Wed, Jun 22, 2016 at 11:23:59AM -0700, Joe Perches wrote: > The output changes now do not include line #, but do include the > function offset. I've been using a technique like this in some code with good results: struct source_location { const char *file; const char *func; const cha

[PATCH] mellanox: mlx5: Use logging functions to reduce text ~10k/5%

2016-06-22 Thread Joe Perches
The logging macros create a bit of duplicated code/text. Use specialized functions to reduce the duplication. (defconfig/x86-64) $ size drivers/net/ethernet/mellanox/mlx5/core/built-in.o*    text    data bss dec hex filename  178634    2059  16  180709   2c1e5 drivers/net/etherne