Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp923454rwd; Thu, 18 May 2023 05:55:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40AQ1JM08jmDZiywP9vpBvZIhLaMcRYLQLoZKJrE/t9yYrRC69MVj/B7p/kNuphdmZ3PUw X-Received: by 2002:a17:902:e945:b0:1ae:2e0d:b38c with SMTP id b5-20020a170902e94500b001ae2e0db38cmr1923038pll.12.1684414551967; Thu, 18 May 2023 05:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684414551; cv=none; d=google.com; s=arc-20160816; b=aqYFjzn/Lebfsux3TjMCikczvVDeU5nBHYpZWhdqDN4J254WX0lt6JiHnYyXwKzAYE iVcLOGu325uQztR+pYU2/Di2Wdm68N6pmHP9W7k4Ky4otKVo/SZd+XAj+7k1TEjs5Lcm 1FLKvw2ZnvaScBOXL3mN9DxiGQ+Hy/0qAodxQImIJTzhv5vuEGWPJTqmU4jDztmJ99vM Fw9BHTc+v4fhtc9Ow8dzuYA1cJTfqQMWEJzEDHYgRdW+BYE0XKAxfQVPY140oFmPw0Gq hlHvn3pJxhdSHy1MLx6UyAXXoI1Zl3vW3pMUA8auZkO9YM5O+2piAi2UJyeMTRnbdKWD txMA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xh6g2bxhPJkVtPZVFRZjXS3J7mLMTHEnYbCr8lztGG8=; b=KzTzenSRH2BoPbVTkiQA4DWaCEUFZgcr912OTNe6OzGnv+wF9U/3mJv2iUjxvBkB1r AAFVTEt1r3eSIl3PWIjVB5lH7x3eKgQDpfbe4EcKPWFd17ytvkVA8Wlqu+4FREnzCBF4 IzYI3y3gVyVO3yXhJpGrA+T6LUqEkNHVBoQA5R0/6ldxj+m2jt8lYSHwXQDpIYK0oxzP Z8FDG3iM3yAep3m8wD3nG9rSIUU0KKzVbYKNcBkcuQ3pIKY5uqHKw1FC86wywar+eMs+ y6LIvPCUP7yo7nHILN9jFUCPVJo143jugisWovQNhngqgkCtDmPYLpOJWQpkmWPpWtQb 5iCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QzGOPdH6; 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 iw13-20020a170903044d00b001ae45f0c55esi1249094plb.14.2023.05.18.05.55.38; Thu, 18 May 2023 05:55:51 -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=QzGOPdH6; 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 S230497AbjERMUy (ORCPT + 99 others); Thu, 18 May 2023 08:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbjERMUx (ORCPT ); Thu, 18 May 2023 08:20:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04170186; Thu, 18 May 2023 05:20:53 -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 9430464E56; Thu, 18 May 2023 12:20:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6B18C433D2; Thu, 18 May 2023 12:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684412452; bh=B2tSmJJEwLINlxxk8NveBTh3Pb3iwAg/mTfnyo2eGto=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QzGOPdH6JnfBswuwfL0JlmLPJfNEjGl9HMPs24NhhL3n7wP88zBc9yiHtcwBoVlDz JPA60d1XU2LWG0bRD6qzSluGnLytILCFCETMMnPi0yh1YRaBff9sH3jvB09W85iSZ2 yeNVjC4obEt8XTL1bajkLVR8wgoWIiYzxZalIbawLNuLb/j+MBNHu7ogov62Br+SnW fKgvQrisPk1dAKUeCGyK+UySmbeda/RLiaOxBPFYE6pqYsVhsllvP8xbDIYO8jLZKi GopNh57fCLWLX9vjiijuRq4Aghqe6wVWOtvahRjpjReTDZ+fMBXRJ7v0xhACDR51IK A5fNhVHN6dOwQ== Date: Thu, 18 May 2023 13:20:47 +0100 From: Lee Jones To: Yang Li Cc: pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH -next] leds: trigger: netdev: NULL check before dev_{put, hold} Message-ID: <20230518122047.GK404509@google.com> References: <20230511070820.52731-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230511070820.52731-1-yang.lee@linux.alibaba.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 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/leds/trigger/ledtrig-netdev.c:291:3-10: WARNING: NULL check before dev_{put, hold} functions is not needed. > ./drivers/leds/trigger/ledtrig-netdev.c:401:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. > > Reported-by: Abaci Robot > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4929 > Signed-off-by: Yang Li > --- > drivers/leds/trigger/ledtrig-netdev.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) Don't forget to run checkpatch.pl before submission. WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report Fixed and applied, thanks. -- Lee Jones [李琼斯]