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

From: Leon Romanovsky
Date: Thu Jun 23 2016 - 03:12:24 EST


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/net/ethernet/mellanox/mlx5/core/built-in.o*
> > ÂÂÂtext ÂÂÂdata ÂÂÂÂbss ÂÂÂÂdec ÂÂÂÂhex filename
> > Â178634 ÂÂÂ2059 ÂÂÂÂÂ16 Â180709 ÂÂ2c1e5 drivers/net/ethernet/mellanox/mlx5/core/built-in.o.new
> > Â188679 ÂÂÂ2059 ÂÂÂÂÂ16 Â190754 ÂÂ2e922 drivers/net/ethernet/mellanox/mlx5/core/built-in.o.old
> >
> > The output changes now do not include line #,
> > but do include the function offset.
> >
> > Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
>
> As far as I see all these functions are used in error paths, so no
> implication on performance is expected.
>
> And I'm fine with function offsets.
>
> Saeed,
> What do you think?
>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>

I continued to play with this patch and it doesn'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 Â180709 ÂÂ2c1e5
drivers/net/ethernet/mellanox/mlx5/core/built-in.o.new

ERROR: patch seems to be corrupt (line wrapped?)
#46: FILE: drivers/net/ethernet/mellanox/mlx5/core/main.c:1556:

CHECK: Alignment should match open parenthesis
#78: FILE: drivers/net/ethernet/mellanox/mlx5/core/main.c:1586:
+ dev_warn(&dev->pdev->dev, "%s:%pS:(pid %d): %pV",
+ Âdev->priv.name, __builtin_return_address(0), current->pid,

ERROR: space required before that '&' (ctx:VxV)
#79: FILE: drivers/net/ethernet/mellanox/mlx5/core/main.c:1587:
+ Â&vaf);
^
total: 2 errors, 1 warnings, 1 checks, 58 lines checked

Attachment: signature.asc
Description: Digital signature