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

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); > +

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

2016-06-23 Thread Leon Romanovsky
sn't pass checkpatch. It looks like corrupted file. ➜ linux-rdma git:(master) ./scripts/checkpatch.pl ~/Downloads/mellanox-mlx5-Use-logging-functions-to-reduce-text-10k-5.patch WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #21:  178634    2059  16  1

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

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

[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