Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3460063ybg; Sat, 6 Jun 2020 23:59:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5O5o82I9KaAcxjqzk66O+RCLhNg/VRh0GtnKfLw2w4vxPPjzO9/C7XUiVZZ0fJEioUA7J X-Received: by 2002:a17:906:e257:: with SMTP id gq23mr15074799ejb.398.1591513146082; Sat, 06 Jun 2020 23:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591513146; cv=none; d=google.com; s=arc-20160816; b=KD7yUcQfTXkv+Fx5u6yMKVbkJSFf/r6Hi3WCeb9Z493YrbEEKydPou9LzKzWXpRBQZ SA6C4PKTgEz3mQxvEc06fJc5l8eOc6xYlsbwPH98XZwvt8z1oiHAWUOg/F1qtAG6+YpY 9T06yOmjTbgTeS+TSScUA/JGU/5JL0bBl38vt+ASvyfxGLmoZ0AKaWVbhAhFq48aCoVm UyeCDXk0x3j1MuCTBOSfIKhi+btU+GORYKJG145B5Vm3cMgMcooEtvkigF2LagBRy744 G1JefuFRHf8njNtsTMWhTaM/zPXv51gwYatKaGhS2dx21GqJvRp2ctmak2ZQ9JB6waoJ M5vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=UlSCvJGb20Iir5IHscJG+4tQo9hliZ3Ic/DMrTbtMX4=; b=I19rNbuGE5brovvOPvmndAQ7etgUI7nYhfChg9wbhrln7jDTxtYVDrs3Kqmt6zUB3d jj0SxXlPR2gfQFfIeKkDYOY8BOYw2NXsk+m9sWUpBR9jNy3g82rk55eoSi7CFVBGheEe 5jNQ+TWCpNFiK2Lt2+BGqrAXODQpE0ncavaGVZpt+CTiMgUCBxh4+S/QA3f5NEy+UrN0 BtnZpIyCuHtazZMbILDRxvRl/zOgmj8QAyKBOuQgQ9KrpfCUwlS6Mfeo4nggko/kw4Fn uRz6v5aSYpDbnKCs9cSkNTNiXAAOw/AAS2e886a7gO6I/2lsJ7f87bLApcn0pLj1UZOq CTow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=iQrU6mfQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si6767888ejd.523.2020.06.06.23.58.29; Sat, 06 Jun 2020 23:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=iQrU6mfQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbgFGG4B (ORCPT + 99 others); Sun, 7 Jun 2020 02:56:01 -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