Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2504993rdb; Wed, 4 Oct 2023 03:26:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIkI66/OhMAdVeGqUqEVyXBoBCc+ZN7I+UgIfUdk/K9OOrLDbzh99XrSqiuEE9i9ZHhwX/ X-Received: by 2002:a05:6830:18fb:b0:6bd:b5f7:187a with SMTP id d27-20020a05683018fb00b006bdb5f7187amr1752894otf.20.1696415209532; Wed, 04 Oct 2023 03:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696415209; cv=none; d=google.com; s=arc-20160816; b=gI3hBrowQdxperth2zkAFiYJIpLn4s5IQntOs9ETJHn+d+rGIEqGaCcauXSQC8pXH5 FMeeV0sXfaf2X3rJGzvyacRB2Ia4wysAtAnEr5erR28TYk8uzTbOjfA7KXEdlLxmv9X3 ZZrmG4MX20vWk1CO9MsRw4fygSokK1MwHyx7J+EmxaSMHMNVW/fVuxyqLzX3Pu69wggy R8YDB4jUB/feFMmS+Y9j62e7UTDt9RYVJMMob1p9ddIrz/OJY9TqH7g1kvBGPIUcki4U gbQkdtFg5Cz5qyZOM1gwVwLPDZ7H4ehgZDkaMHOpYNlxJA/6QI6IVkPY+svEtz+AD+KA K1dA== 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; bh=5yWvSFxE1hGuy+4wdwIz2SXjtX2tKRDoSFOVpoC3Xsk=; fh=iia/edeDhzoVLsC6F5XWIBX6PDHh4TEU5+bA99E3FuE=; b=lVCP1tQsxpaANqrjS9IUL72ep/W7t/I99PZM3S6UoKuOCJrhY11fWxl+Mr5NygPqRs DOyNUyfjKs336Y3hxhMyh3QHoIOypuA9u5OeAQLI8MT00OIduRl9YFE2nPCg8dMGHPoe ladSOaWZys+kG+2BDfZPYyEN+8MDopcMPe37SW43aSRDmTw43A4YV2W52xmr3iX5TlrC aHdFdUV4jpEMAW/9YC65f1MYf/M53lUfAAZlnhIFWYDnfwD8wrnGhfx76LCX2H2SbJrW QIBx+WFs3HTYyhFz6RBBHujsz0djDki5uDxtH5eLRovNCUg64jypB12GI0nXqUHnhPYk BhtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l25-20020a635b59000000b00565660b78d3si3257860pgm.591.2023.10.04.03.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 03:26:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 52A0F8043992; Wed, 4 Oct 2023 03:26:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242165AbjJDK0P (ORCPT + 99 others); Wed, 4 Oct 2023 06:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232895AbjJDK0N (ORCPT ); Wed, 4 Oct 2023 06:26:13 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B64A95 for ; Wed, 4 Oct 2023 03:26:10 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qnz4n-0007NJ-8z; Wed, 04 Oct 2023 12:25:57 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnz4m-00B0Xz-M8; Wed, 04 Oct 2023 12:25:56 +0200 Received: from pengutronix.de (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 4E5AE22ED1E; Wed, 4 Oct 2023 10:25:56 +0000 (UTC) Date: Wed, 4 Oct 2023 12:25:55 +0200 From: Marc Kleine-Budde To: Jiapeng Chong Cc: socketcan@hartkopp.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] can: raw: Remove NULL check before dev_{put, hold} Message-ID: <20231004-shield-accurate-6b875651801b-mkl@pengutronix.de> References: <20230825064656.87751-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7n5eokfyo5pa3sfp" Content-Disposition: inline In-Reply-To: <20230825064656.87751-1-jiapeng.chong@linux.alibaba.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 03:26:17 -0700 (PDT) --7n5eokfyo5pa3sfp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 25.08.2023 14:46:56, Jiapeng Chong 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: >=20 > ./net/can/raw.c:497:2-9: WARNING: NULL check before dev_{put, hold} funct= ions is not needed. >=20 > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D6231 > Signed-off-by: Jiapeng Chong Applied to linux-can-next/testing. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --7n5eokfyo5pa3sfp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmUdPbEACgkQvlAcSiqK BOhaJAf8CJS4q8gjgzgbvGEY1oFdsFx5AOdvsIgFL4F3pg+7AjMNRXIX+CyDnGlf 8tmSvh/3670c5pL8EN5ptuvlUVlJDVOhiH4/28FCC+7zkoWRtEOu4U6v4Uz2onGB d2FSb0cx7ifFIjrr6IOsBa67lPO5GD2AXXED8uyiE42K6cWYnpVqS6t48YDle5j2 u76Q97bvL2TGI1sh3FWKtrsSpgYKcRiKDW9BxodrQrboRqeUMyqfq5OMnn76bc0r EyPe0zGVVE2peGfAWhdN1IC/5u7kuhPoB8WdymLnM99pSGeMVrPcvZ+vufB/hM3K UnMXGbHpmSlZ18a4oJZuyYTQJaSQnQ== =nayZ -----END PGP SIGNATURE----- --7n5eokfyo5pa3sfp--