lkml.org 
[lkml]   [2020]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net/mlx5: Add a missing macro undefinition
From
Date

On 2020/6/7 2:36 PM, Leon Romanovsky wrote:
> On Sun, Jun 07, 2020 at 01:12:40PM +0800, Hu Haowen wrote:
>> The macro ODP_CAP_SET_MAX is only used in function handle_hca_cap_odp()
>> in file main.c, so it should be undefined when there are no more uses
>> of it.
>>
>> Signed-off-by: Hu Haowen <xianfengting221@163.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 ++
>> 1 file changed, 2 insertions(+)
> "should be undefined" is s little bit over statement, but overall
> the patch is good.


Sorry for my strong tone, but my idea is that every macro which is
defined and used just in a single function, is supposed to be undefined
at the end of its final use, so that you won't get into trouble next
time if you define a macro with the same name as this one.


>
> Fixes: fca22e7e595f ("net/mlx5: ODP support for XRC transport is not enabled by default in FW")
>
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

\
 
 \ /
  Last update: 2020-06-07 08:56    [W:0.041 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site