Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9018591rwr; Thu, 11 May 2023 08:58:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7OZLU2B58P0aZgfcQtHdGNy7cyt1nHmfYYrWRkavpxVFHpUEOEMxpWyIKpJIgAwF3WyMch X-Received: by 2002:a05:6a20:3c8b:b0:104:3c82:38b1 with SMTP id b11-20020a056a203c8b00b001043c8238b1mr879343pzj.20.1683820713313; Thu, 11 May 2023 08:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683820713; cv=none; d=google.com; s=arc-20160816; b=e5/easSOMTH38AI3Up3/mwgyJGoCeycOBlW0TCPZhncUx1dCtXprfknD6tDsp9k3Aj t6CGr44fzFbrbCbFkJfyQ0pDHISJ0c1Cf5kPFjiKpq3/rFElpM4jj+BLY+dcXSt+e0+a dPeLHz5acmpV8+loPAOHiZh5c0o2jooBTIARQ/2zPkBJgI/i+ODaA7vfE2KuwV1jSogh 7StFc6zY9LiEQQ+QnPARcL7DSz01L1zoX+UoBQQLVrZR+KIETLQikaQ4IhuzAA4GuNpZ /0GvFpQUqQGbl7eBYOYy2n8xE8vYon4FfAJ+CUJT6dIb2OcuzLHCUuZV6tSfbodm0weA QxqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4OMLaXG3kn9J1t0D8UdL377w+Iu6C1rddJ1+6LY7WuQ=; b=zJttUcDFdJe0IjylP4qP3Hqp7A+pEYo9ZpQ0Isp9PNUUR3eBaCstsIjFLeshZ04z95 C3eaU55DrHZu+GRXaV44ZPXa89lMCiMZzSXhDHC5h2LKXHqkuIphlC1t9t252x5FEna/ /mXJMpG4duzirm/PLsNCHqfY5YuoXYmux80nQt9MqRCHzSenwbJ4X/Ejs3dEz7X9dUhY dxxl4L89fDSiGausMkVE+BzQbyrRMDtuMfxwAw7UsWivjxf2v4z7txlqw2ySFxEDLJrC 0Ly/6QL6sI3VQP3YP7rscHaqlYUe5Fuxp/r3X2P9ukufmH74hwU+70+kOyJxJAmzWKpW AL+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=o2j86sMA; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a056a00008600b0063b64166faesi7748219pfj.157.2023.05.11.08.58.19; Thu, 11 May 2023 08:58:33 -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=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=o2j86sMA; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238398AbjEKPzA (ORCPT + 99 others); Thu, 11 May 2023 11:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238125AbjEKPy5 (ORCPT ); Thu, 11 May 2023 11:54:57 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C966E86 for ; Thu, 11 May 2023 08:54:56 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-24df161f84bso6185915a91.3 for ; Thu, 11 May 2023 08:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683820496; x=1686412496; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=4OMLaXG3kn9J1t0D8UdL377w+Iu6C1rddJ1+6LY7WuQ=; b=o2j86sMAjKRwrNcSOUc1D2lNvbnwpfLDIMXnDPW/JL+p7m3o1BMVPk5w0mFww7/Qnp t0j1eCrx3jC6C/HsBWL3WTyYP9h6ZyHiIWMCG+CwGxIk6DeppKW+MYoxXAvWvNAIP9/u KUBGEoxs+faJMKgi80frPDFLTQO69XZ/S5I1idVq++dOEMYTSZDFA2VUtPszNFbDFI4/ KcDnnTj3poNx5SdD4tH4thehMfq+60G6CxqQoKT2Ci7YnE5sVfYUcRyWuEDXFjI1WGgT uc+aHnQyxfK7lAZ6IcTAuMD8665b5lx1CbpZRD2z/IEqDjdnvz4JHzucWgZMLPXGH+0c gv6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683820496; x=1686412496; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4OMLaXG3kn9J1t0D8UdL377w+Iu6C1rddJ1+6LY7WuQ=; b=M5ar2puXr7OIYyuE/QHnwg/q3XG5YXWlRyTjukVZB0UcYv8pq/pClmN8cg+2cqMg6N VaL4dscyENzLn8JycCfGhZwOIz/RolcVIuS74k+KflgY6G43I4WI5G3/+5Kba8SQJowW ck7PoJBmDFZnkkbJnPUopmM1wTjFvsj7ykJzMEErcZx5+dwD7aMTC/X/o5mkCWN/r9IN kU1CAyHHSKNJfnEFe1MwuPxN1JJHO+E7fRLyLMX5e1VHxWjMibzow0I8oUBoZMZ0w+M9 d6k5lcPLai9wX03ZsocI5UjknCFYWAWvQHw5Dqb1X9Sm8OjJmK9ENuBCyizMR2M54ERO BKgA== X-Gm-Message-State: AC+VfDw2Rvlbw7n0ABNIEIQ6zO/QjCGKaObizOBKBCWij3GBRRogjjsW nE911OTPHL34/kv3dHoj+58Ssg== X-Received: by 2002:a17:90b:85:b0:24e:4350:cb50 with SMTP id bb5-20020a17090b008500b0024e4350cb50mr21416343pjb.29.1683820495804; Thu, 11 May 2023 08:54:55 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id m21-20020a17090a859500b0024e33c69ee5sm16810157pjn.5.2023.05.11.08.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 08:54:55 -0700 (PDT) Date: Thu, 11 May 2023 08:54:53 -0700 From: Stephen Hemminger To: Yang Li Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] ipvlan: Remove NULL check before dev_{put, hold} Message-ID: <20230511085453.25ef33fc@hermes.local> In-Reply-To: <20230511072119.72536-1-yang.lee@linux.alibaba.com> References: <20230511072119.72536-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Thu, 11 May 2023 15:21:19 +0800 Yang Li wrote: > The call netdev_{put, hold} of dev_{put, hold} will check NULL, > so there is no need to check before using dev_{put, hold}, > remove it to silence the warning: > > ./drivers/net/ipvlan/ipvlan_core.c:559:3-11: WARNING: NULL check before dev_{put, hold} functions is not needed. > > Reported-by: Abaci Robot > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4930 > Signed-off-by: Yang Li Maybe add new coccinelle script for this? scripts/free/dev_hold.cocci?