Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1843525imm; Thu, 24 May 2018 01:32:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphLHyHyQw1YlCLvY76YBx71xWWuZQj+IfE5LPVc1d1dwTv2XqZgky8fwg0Zw7ylgOypPJQ X-Received: by 2002:a17:902:1a6:: with SMTP id b35-v6mr6375304plb.80.1527150778538; Thu, 24 May 2018 01:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527150778; cv=none; d=google.com; s=arc-20160816; b=lUZU533Z2AYNTM8P8qZEkPt2suYuHbbgFZGj3+EKfDrls/xNs60ouF0Ek3yvIaNTx4 cGd5C364mtcKzLfB/EgosGFiY2IP84JD0EE+6Fez3Emawbsgfh6TAYeP9m1JIMIdg6dY h1WAAJWGHFPt1ov9wjCAByj8ywhOBV/Vmhd1ngrnVQkmw5af2qml1XPmmHlvjBK/lTQ0 gOCGe8j8X4KjcFR1p2IfOzJ8k8HsxTgLM7d824MWQzcV5kDY8fFQv1oAqGy6tiHOTTq2 e15Afdxd7chLKwuFf2WLHRPIeZZzFRxx1RZbbgfXefQc8Lc25/Ta3hmD1cICzRj3fmev jOHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=I1z506uilZo8jXgAczgDfDjN6R31V/nVGqVbCoX7UnQ=; b=cX5qCKx9wpewiQ2+F1+1dsFH2O2VqkDCWPjxg1x6Gle0S9PkszuGU/CsraQdhJqevI w75Rk36SiJy3XIzhoErc1+WzUS/SggmMZaWNK1Zre0y0PvqezTkvBLINldL8qYWV+a1+ adjj58lCHNxy3f5xO1vie9xbL2SJ59cwdAO6FqFyYxpBT9Yws9OBAHqmGJnX9aDnxCky U0WAgqzqydlgU7Tug6Upt19piUbaFzvRjGNUDnOsiqRBrf7OVPv4mwZ3Icx3uUjJ/tpI mApWMBg7rO54ccWt0d5zrSVqvORUlvm1QQ1CsNQZvi6xRaG40G8r6nw52tjCNG1ykmM5 3W2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ABsT3FnY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6-v6si21149536pfg.114.2018.05.24.01.32.13; Thu, 24 May 2018 01:32:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ABsT3FnY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965367AbeEXIax (ORCPT + 99 others); Thu, 24 May 2018 04:30:53 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:33657 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965114AbeEXIau (ORCPT ); Thu, 24 May 2018 04:30:50 -0400 Received: by mail-io0-f195.google.com with SMTP id o185-v6so1317554iod.0 for ; Thu, 24 May 2018 01:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I1z506uilZo8jXgAczgDfDjN6R31V/nVGqVbCoX7UnQ=; b=ABsT3FnYhFwAWk+E+UeWg3pGX+xJTOZQWNWIP8Ilh/bXjUALt4vFIT5OoJr/Cg9J6s IjuOG4XBZCY5s9mPNCo0QXsQuTDlMZEQrPge5Oc0FbpSpqqi3c3cjKyC6i0xSo9Z/+2l LSPem6RTfDRKSi6wugcI3WOjygDjF+T6gh+ek= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I1z506uilZo8jXgAczgDfDjN6R31V/nVGqVbCoX7UnQ=; b=kuKfNGmJm+l2pi0KxbxYWFWsVBikclZhlGrfuGZsz9S9mBrhxyfYA8cpDH17IrD//n A4VRawKZetkONKMtwtaZbYTybgegPRblUv0YPj0T6ckDCo+CopKTCZrKdKN4KquYL3NY qc/ndBC3hJ1AatPbPTUWTIQzB6m9pSQZN12064cESlHUCzRVQDM/A97/x7PPUIarN79d qSH7Qg0DqQnT0UdR1TlZRMejrnRSRZDQoGuSWDY1QgYCHGjE4i5iAImRiWV/cj2LjXfJ 87n8trZXOY3O3o92XUHkvqByafNkvxAfu6pXNLUO+nqvssrR+Y48d8xEc93qMjPkxb9D hF5g== X-Gm-Message-State: ALKqPwciU7rOgEYeOWbujsDEaRu+0S1hjAud3WvjxqkzTr+RDq/+98Zb fff0jVq5TjM+pJwaQWwZkIUjiOAr2xuCMDSZHsDizQ== X-Received: by 2002:a6b:1b12:: with SMTP id b18-v6mr5706056iob.175.1527150649892; Thu, 24 May 2018 01:30:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:78c9:0:0:0:0:0 with HTTP; Thu, 24 May 2018 01:30:48 -0700 (PDT) In-Reply-To: <1527102436-13447-2-git-send-email-Julia.Lawall@lip6.fr> References: <1527102436-13447-1-git-send-email-Julia.Lawall@lip6.fr> <1527102436-13447-2-git-send-email-Julia.Lawall@lip6.fr> From: Linus Walleij Date: Thu, 24 May 2018 10:30:48 +0200 Message-ID: Subject: Re: [PATCH 1/5] pinctrl: at91-pio4: add missing of_node_put To: Julia Lawall Cc: Ludovic Desroches , kernel-janitors@vger.kernel.org, Nicolas Ferre , Alexandre Belloni , Linux ARM , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 9:07 PM, Julia Lawall wrote: > The device node iterators perform an of_node_get on each iteration, so a > jump out of the loop requires an of_node_put. > > The semantic patch that fixes this problem is as follows > (http://coccinelle.lip6.fr): > > // > @@ > expression root,e; > local idexpression child; > iterator name for_each_child_of_node; > @@ > > for_each_child_of_node(root, child) { > ... when != of_node_put(child) > when != e = child > + of_node_put(child); > ? break; > ... > } > ... when != child > // > > Signed-off-by: Julia Lawall Patch applied with Ludovic's ACK! Yours, Linus Walleij