Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4919882rwl; Mon, 3 Apr 2023 11:29:19 -0700 (PDT) X-Google-Smtp-Source: AKy350ZD4hiCB1wn5gpwToHCt+wB6+LI0P3eJPMYAGxe1Q4wcZEgGa/4yiC21CJbHt1IB+8xH1sA X-Received: by 2002:a17:906:3193:b0:932:1af9:7386 with SMTP id 19-20020a170906319300b009321af97386mr36741218ejy.27.1680546559535; Mon, 03 Apr 2023 11:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680546559; cv=none; d=google.com; s=arc-20160816; b=U41HHpjjP9vOpzEiIUcHPXia0wlsACPCMAKZWSfrcRdH12AQENw4XqwfrIztETvsKa ZK3DD+Csz65a3PN8+AKe20NVcH06JXYTPsRWulhM/iPrxP3MnfAsboseGvccAkXyLU2T BMq4+r2nv6FQMrUUoZryX6Evw/ZR+OrZdhNscGL0hv/KWEAAJKty9vY8gUqsIXLqRBxu y2uS3vReGIqcTOPM+64Gow+jceNdXhQd7IzeTM7dGHjrJDW07ehAkIX//7WYgmV17NvN aKzmCsye/HZhNalWNCi8ekvLCipFifo/dpVvA5Woy33OVwDEVX/QWPyoYd7+mkgZ6xEq efSA== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=ftKWMog/50BW5gsacZ7D8Lle3uIJ2Gog9mW376QbiD4=; b=NKdFnDYemGFMBsh6MaGSVpXP7x75sPbXdeIJeRd91TVqLzyCW1DTUP7aVIRtvK8yxz 96GD5SphOFZGobSXNCNk3PZPPgiWjU9WzBA+mN7eUlheIuN+zPqkXLJyVnorHsKva6F0 vM/zJ9EvTbJ+5HXfYP1PkngCfBqvA2eOtAPa972K/e9Vet2cF1E23QfAEP09z6S32ggb VwtnbP30C7kEst6qBaA0WFAeUBP3H717Jbbjy4QcZCK+h5VhFnVqlBow3f6QN8DBRzE6 l1Ex0Lb4/K7edVfJsGsbdXenTEGCoV/RVU+K6Iq5GHB4GH103I2BC8Q2xpL/TbwkbNRb 7Scg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ANz1ZmAe; 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 q1-20020a170906144100b009332b99a1d0si7858210ejc.857.2023.04.03.11.28.55; Mon, 03 Apr 2023 11:29:19 -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=ANz1ZmAe; 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 S233022AbjDCSYW (ORCPT + 99 others); Mon, 3 Apr 2023 14:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233034AbjDCSYS (ORCPT ); Mon, 3 Apr 2023 14:24:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FDCA358A; Mon, 3 Apr 2023 11:24:11 -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 B694F625F0; Mon, 3 Apr 2023 18:24:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A064C433D2; Mon, 3 Apr 2023 18:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680546250; bh=IFwDoOCJAmZKDpBjepwRj63nEv0Sg9V6Tqt9SLsZuBE=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=ANz1ZmAe1zlqCH5XQ/q6n9Iuvt0kmI50Mw9O7eIBV0HjfJr+k/06vGfPlMPG8i8Mf cXO8+OEDmcsGRIPZLLcGBlrDfW+Ud7nUyCWgt3bPLDUR6a2syh4PENhC6CFuOKUAju 1t2WhV2rR1qeqciD29ZUIGNyJ2E3CMxpsS8Lku+SOkNKnUOcgdQRu1lsQ/XLcXZ+nf D+cW2XiFydMbcWKMQ/r8FHSesjDHLaDYwN9f/XbVlWgGBcVfs7GXQROoKY22cs7EfO BWtj/hiG0Q4SbouvHbUlBN1NPNqtTtSgQEq2eguB1iyKqFpu3G24tN1NdzuReeq/tU FYxEbnzRbJnkw== From: Leon Romanovsky To: jgg@ziepe.ca, Yang Li Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot In-Reply-To: <20230331010633.63261-1-yang.lee@linux.alibaba.com> References: <20230331010633.63261-1-yang.lee@linux.alibaba.com> Subject: Re: [PATCH -next] RDMA/cma: Remove NULL check before dev_{put, hold} Message-Id: <168054624617.6296.18087414911653959045.b4-ty@kernel.org> Date: Mon, 03 Apr 2023 21:24:06 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Fri, 31 Mar 2023 09:06:33 +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 warnings: > > ./drivers/infiniband/core/cma.c:713:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/infiniband/core/cma.c:2433:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > > [...] Applied, thanks! [1/1] RDMA/cma: Remove NULL check before dev_{put, hold} https://git.kernel.org/rdma/rdma/c/08ebf57f6e1d73 Best regards, -- Leon Romanovsky