Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6256575rwl; Tue, 4 Apr 2023 09:51:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsRocO6Q3gBwCWWvyxFDNqT6sS1lekLaIlkprMAjiffs/21U6plSv+99/5xavFCfazCjhp X-Received: by 2002:aa7:99ca:0:b0:627:e1a5:27b4 with SMTP id v10-20020aa799ca000000b00627e1a527b4mr2705671pfi.33.1680627063073; Tue, 04 Apr 2023 09:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680627063; cv=none; d=google.com; s=arc-20160816; b=lpA0UhzruDD482nGq8nFf5Awm0o5sRc2amrxQrTt4j0BVLyfHSkuB+IeYNT+UwmSZm lRjMogohNEf0KfYDJKCzey7wxSl0wCg2d0MrVwhZUx8ZHIKGJunTzoUMQocoU1jb38i1 p2Vrsq7CBySAOo9uzcBJM7sQUIsGikx+4YPHOi1DhtQpjN3xKz6SXeC90tGMgB+onRVg kjUAOdQ7hr+oDL+YhuD4E3upYgxavkzMHzU3qWckgoclJLxoeR7jNBryfZ+ynWMrS3Iy Uxw7D8/TMVhPlUvmVyQiJk8x/7TSdCxMjhSoei7GHprOu5w6cvLdtbiMk4LQE3dw6LgJ yXvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EHxZRaq3N91Zl/P7TPGziO/jsMZcnUwHKbgu7+Hl+hs=; b=yt7grGS8A/DejEZAGaXKcKyJkP/w0w3V601qRDJj8Na9fJE/hXQLmxUoFApVDW35Aa DgXQ02FXtC5i8vBgR/EEw+CAV38rGknHNcP1AnGZxBW0Hrqqj0AVUeFH7LGrRMWMNPuq jPwhmSyuiOhvU1vg0XjNiXswxoQV2jf7Qk61+Zan8ENpjULwFxFMeLxKLT3N8ZXkRxms IXsbu3KV2Yv3X77wCw+2g37r53EEEi9a5n9VDX/CD9UjZgrA+dJHjeFd72/FdHSuFqV6 NXg5o7jKogsuqrY510k8JfVfDcX8xgJxyie6goEF6WFvdL2KtJ+y9yVV74wWMtXVRUtt J3uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FcgsyrEB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k23-20020a628417000000b006222f66d440si10922276pfd.37.2023.04.04.09.50.48; Tue, 04 Apr 2023 09:51:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FcgsyrEB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235435AbjDDQoh (ORCPT + 99 others); Tue, 4 Apr 2023 12:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjDDQog (ORCPT ); Tue, 4 Apr 2023 12:44:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66D45E6C; Tue, 4 Apr 2023 09:44:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02212636F7; Tue, 4 Apr 2023 16:44:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CD8FC433D2; Tue, 4 Apr 2023 16:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680626674; bh=HXCyuISoExALr7JjHiFDGv1Fp7sOKciwatitis3fUU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FcgsyrEBQIxtACWdbbgenaSe8u+IROx4n76BXadCu1dJIOB4y6Ho4LliFJvLSqPqC 4Sg1jwQ6E1183kkfAyKwbLrNh+yjgL0mlO70fEUqMfa/a8cLJRWg91E+GwiD5MW1DS 9QN2M5ZtLkZkl5bvfdnaNpiqVFYOrQTcPO49j+Ux+PvcDHDS3Qfvq1vSI5DZQ16GlM MZ9KkWEiRekkqwWpHLgehG0uvy4ectU0To2ZIH6xGqzyi7bNjsUpgCZKQdxIrNBda0 pCn9NeklNOe+0G8G9oTkhoQ/wqmiSXjbf5o9ceHCJiumDnm3m2CTbLuG28dOHn43f0 1gkYkIJUkWH7g== Date: Tue, 4 Apr 2023 19:44:29 +0300 From: Leon Romanovsky To: Yang Li Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, saeedm@nvidia.com, netdev@vger.kernel.org, simon.horman@corigine.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH net-next v3] net/mlx5e: Remove NULL check before dev_{put, hold} Message-ID: <20230404164429.GL4514@unreal> References: <20230404072932.88383-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230404072932.88383-1-yang.lee@linux.alibaba.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2023 at 03:29:32PM +0800, Yang Li wrote: > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:35:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:72:2-10: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:80:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:35:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:734:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:769:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c:1450:2-10: WARNING: NULL check before dev_{put, hold} functions is not needed. > > Reported-by: Abaci Robot > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4667 > Signed-off-by: Yang Li > --- > > change in v3: > --According to Leon's suggestion, do this cleanup for whole driver. > > drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 9 +++------ > .../net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 10 +++------- > drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 3 +-- > 3 files changed, 7 insertions(+), 15 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky