Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6556195rwp; Tue, 18 Jul 2023 02:09:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlFRMpOvHc0RzwZ0Ro9UhilG8e2L2p2GVoH7KAUgoSEhvCFd+PR9dEdZksF0sHroexQPiXq+ X-Received: by 2002:a17:906:20dc:b0:987:f6d6:572c with SMTP id c28-20020a17090620dc00b00987f6d6572cmr12243942ejc.25.1689671383327; Tue, 18 Jul 2023 02:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689671383; cv=none; d=google.com; s=arc-20160816; b=emNPp1qaNtQUjUAfUSfKZ2JZNdvShZXWSF5X6FSdWIF3TqTynUgt7Ij7f+Q+O0A4oz oTuCAbdzFyPgGRH/nLVDmi5E/GOz0thwwwNbb3DzSp0S4ngLDKf9zERqV2HXgCD5Gnvo DiUwtGgm6PAwkHph5wH5v0wFcj799z5aDOYQZaHj4s5u9Qo0HB4LqeU7k//S6na3hlO1 46qWo0gRY02IptHKesrnGg1L2ahjsC7I6Chq1muBQ+6fPEn8qbp4akKkiLLYylkCW556 IIvGNzqtjWDK089MSu+9/I5dwMLKj8OR1APbrdxmM3vZWaHeRbYyNxQY6aa1opwGAdCI Jj+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cyG8fmdJQTl2SyeQjedBG6jEYOaMLAOoJTJLSOWVUuQ=; fh=aE+Sqf+NMj6qFMMbQJTxIra0u6qjIGiwkoFujoZlyZo=; b=dAjQyP8TdcPL5h8AdHyV9TrAsGo5sgumHj+asxmv78Hn2vLakMe7JoWuziowPQXeLX hUF6hS5+14L02HLpgdCT4/aHNBw4pIEKSJP45IQbAlitnkf8uYj1vgRwPcf7H+Nsp8i5 UtQMe7kFOSQjZjRWZhiHXAm3c6LX0PoouUzBNJLGb4idFd4A1Rq76/WQQVFSezFWgtC6 /wCKtRS8qsjnoQNvrMhnEOdX1ANFDblEr9DIB9y/3rZhdMGUj+snWquuPPiHdxnBnD2P mf6u2XyiLy3ELUK5SZBBScz0P2MKULUD5HOnwUeCiX1PNgBAr/t0T5qXctO1byWc4vYm 6aIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=sZaYj3j7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a170906471100b00991ddce682esi931443ejq.305.2023.07.18.02.09.17; Tue, 18 Jul 2023 02:09:43 -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=@gmail.com header.s=20221208 header.b=sZaYj3j7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbjGRIwJ (ORCPT + 99 others); Tue, 18 Jul 2023 04:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjGRIwH (ORCPT ); Tue, 18 Jul 2023 04:52:07 -0400 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11ACDB9; Tue, 18 Jul 2023 01:52:07 -0700 (PDT) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-5833695cc67so22055087b3.3; Tue, 18 Jul 2023 01:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689670326; x=1692262326; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cyG8fmdJQTl2SyeQjedBG6jEYOaMLAOoJTJLSOWVUuQ=; b=sZaYj3j7Q4gZ0/bzzEgPYToAKItoPUnA1AeCZo/SraM30n2csw5189082i0aAbJlQw VpNJo0ocs0lhS0UTSAf74mc0rk/ZCtXC/HCjW8AtwT2G1Sbm6h6ZEPG4dcSJS3EGZQ5T UF569XzmLNr6WTVrENBNeXTVVrJwm8FGj4fTjNZ949cRO1fGWfUoI0UejoM6DdNwyeb5 E4VcXXSRxpwov03eNKGd2m+ESh6rHSTzJ8HeVahc1acgGPsYQXDdaC7A8cBv1iww4+ll BCxNK3nSxLQ0f4ive/zgp4pK8KOlVwyzN0U+O3bzEWlOdX8xxWeYYDnHPx3QAORP1Von QCfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689670326; x=1692262326; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cyG8fmdJQTl2SyeQjedBG6jEYOaMLAOoJTJLSOWVUuQ=; b=luPc3fF5HGs/cDbUGviIN8JhLGr0Q6YOC3j1mdGZ9KKvlmaSJmjx79cSHX6UJ8Irrs AhDyfknog8K7hIdIIhfGCWgooSFmgzi2zVoGPhJos9EzWrJkPScvPWJIAll7zy78Ggb4 eFtWWIc2Ist0CkMbq1eu9ibgzeQI4yDXu1ddPNlstxbLMtG9hiT/n17+6F0K9QRaj+cw CzE8xwP4QJjvjyxdn8U4SH8uMtaQn1foGR1xiBqre+v69owcrhTDSUR3RftOfD2EaZ9+ 2BTRs3upOdDoWHx//9WwkAbnWcDxtYRePicWz8GeGMsBEqZYt51BdJi0ZDUqO7K6B5Mz hOqg== X-Gm-Message-State: ABy/qLb6/oUyUnI8BeoMA3R30Rh5EMTx9TsNss7fBuJ4mTodOzalZJnU MY/uu0s2AANJh8zqnS3CJfbCRRJ4uSmORcZv94V+Gg+I X-Received: by 2002:a81:7741:0:b0:577:60d3:e5fd with SMTP id s62-20020a817741000000b0057760d3e5fdmr15381454ywc.28.1689670326193; Tue, 18 Jul 2023 01:52:06 -0700 (PDT) MIME-Version: 1.0 References: <20230718080812.16801-1-xujianghui@cdjrlc.com> <98a14fa23e4fb81d4630264cba0cecc8@208suo.com> In-Reply-To: <98a14fa23e4fb81d4630264cba0cecc8@208suo.com> From: Kjetil Oftedal Date: Tue, 18 Jul 2023 10:51:53 +0200 Message-ID: Subject: Re: [PATCH] floppy: add missing put_device() To: sunran001@208suo.com Cc: davem@davemloft.net, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Tue, 18 Jul 2023 at 10:15, wrote: > > The of_find_device_by_node() takes a reference to the underlying device > structure, we should release that reference. > > Detected by coccinelle with the following ERROR: > ./arch/sparc/include/asm/floppy_64.h:595:3-9: ERROR: missing put_device; > call of_find_device_by_node on line 589, but without a corresponding > object release within this function. > > Signed-off-by: Ran Sun > --- > arch/sparc/include/asm/floppy_64.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/sparc/include/asm/floppy_64.h > b/arch/sparc/include/asm/floppy_64.h > index 070c8c1f5c8f..e74a4d4e6519 100644 > --- a/arch/sparc/include/asm/floppy_64.h > +++ b/arch/sparc/include/asm/floppy_64.h > @@ -592,6 +592,7 @@ static unsigned long __init sun_floppy_init(void) > > state_prop = of_get_property(op->dev.of_node, "status", NULL); > if (state_prop && !strncmp(state_prop, "disabled", 8)) > + put_device(&op->dev); From the same domain as "Liubin" earlier, introducing the same kind of error (Not adding curly braces) > return 0; > > FLOPPY_IRQ = op->archdata.irqs[0];