From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72DBEC433E3 for ; Sun, 7 Jun 2020 06:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47226206F6 for ; Sun, 7 Jun 2020 06:56:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="iQrU6mfQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726401AbgFGG4C (ORCPT ); Sun, 7 Jun 2020 02:56:02 -0400 Received: from m12-16.163.com ([220.181.12.16]:39553 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgFGG4B (ORCPT ); Sun, 7 Jun 2020 02:56:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Subject:From:Message-ID:Date:MIME-Version; bh=UlSCv JGb20Iir5IHscJG+4tQo9hliZ3Ic/DMrTbtMX4=; b=iQrU6mfQJpLRuR1mWSbvr YO80x50jlwSo2bav/eGk1OKRpiEFo+1O5PcuCh38ZGn2qJ0zdbBhCnmrpOvjPuFN errUHPqFpNmb+cHbI4JxfGgKCx7lADKnS9EueoFHr3cgiN6vuFeZ/DBkq6F9RRSU hZzxHjSfujohMhvaHBVxjg= Received: from [192.168.0.3] (unknown [125.82.15.164]) by smtp12 (Coremail) with SMTP id EMCowACXmQVmj9xeqp+iHA--.6551S2; Sun, 07 Jun 2020 14:55:37 +0800 (CST) Subject: Re: [PATCH] net/mlx5: Add a missing macro undefinition To: Leon Romanovsky Cc: saeedm@mellanox.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200607051241.5375-1-xianfengting221@163.com> <20200607063635.GD164174@unreal> From: Hu Haowen Message-ID: Date: Sun, 7 Jun 2020 14:55:33 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200607063635.GD164174@unreal> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-CM-TRANSID: EMCowACXmQVmj9xeqp+iHA--.6551S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtF47Jr18WFW3WFy3tF1UWrg_yoWfuFX_uw 1xZwn7Za1DWF4FvF4xGFW5uFyUGrWUGr4rWr1Yq395Cw1Yya9rCw1kuryfZF15ZrWYyFnr C3Z0vFy5Z347ujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5Vq2tUUUUU== X-Originating-IP: [125.82.15.164] X-CM-SenderInfo: h0ld0wxhqj3xtqjsjii6rwjhhfrp/xtbBDwE8AFPAMKM3EAAAsV Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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