Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp503973lqm; Wed, 1 May 2024 07:19:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfM7Mcw35kVZLEyLfmXorKzw2qfZpVITYzcKbNQEUst2MjsUpXAKQbF6YYcDKGFIxJCAKn+G7v/WC+ecHAGorLooBncX/v54bduPYYag== X-Google-Smtp-Source: AGHT+IGOrF5wLeItqAFjBxDmpxAyhXrVjx1smrLEOGUYl5SEKbABFEtnDzL4iGnqsfsnXHUYEAee X-Received: by 2002:a05:620a:1356:b0:78d:65bf:4208 with SMTP id c22-20020a05620a135600b0078d65bf4208mr2596929qkl.27.1714573197567; Wed, 01 May 2024 07:19:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714573197; cv=pass; d=google.com; s=arc-20160816; b=zLs4MaHWpQhWeBCVMH2gj62cbDgkrKcnpXpxzfK8DI2qn//eaorth9xKdyJZ9+ck2/ h2L9boRX0ziGDTMtluJ5FBwt8p2WYMojJC4e8j+aKZsUYoKEelVA2RKGiwmEIlJYl83r a/HaU6U5lTOIjdY+5LnBKEdXUjawfWrs2SyRWXj2MMfJy4Z/T3+7/WSjG0OwBpVYptzG 6FFVo2cgEOqsdQTN6WIAAtAMLCGuFBXiSplGobWfZZ/Q3csTJpNJv2DpBJ+mhtjzeWDA enEcahvq8NDWjIaAAcTQGWoTbRJrgmg1z2OJwaZ3380iL+7iTR1ZYNa4X67I5ZS1m4Z+ FZ2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=zJzS+8XGm8C4eeKbbvynEhybHsCB9GY4MtQsheFW4g8=; fh=fRnkQaYZ+PEMZykG4IbV0aqwFeDE/CliXHt4xzlH55g=; b=W3PGX8bPgfOm49gL+wZStLW9eeDJA/qw4FYTxA/QP15FoK/hZqbs9Im2cDUS/RQSui ou8pZpuYWxbsRWzuLQ1igDH6QKBk/pIAlFn/K+z18RhNy2QLxqW0PC9+iTef6Stkarqn G4+C2PUvS8KS4Bysdkdx50cPVHjwEsncNB/fHZNy/rafCGIBAVDW6pJePbG1LuJ8MwLI LvcI4nwm4tZTMBkCISvYgvKSJNDE7Bhus3TqImbuptlpOXjI4608CoEzqQTKwvtj5Ke6 Anj7kwFXasH3eowV3TOBR4bbluiOkRed73GEzuld3510euaS5JlqQ3yBCsjQohphw4Qz ijlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=m0kGQ34T; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-165365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w26-20020a05620a095a00b00790cd2a6d9csi8815246qkw.473.2024.05.01.07.19.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 07:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=m0kGQ34T; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-165365-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4742F1C20F94 for ; Wed, 1 May 2024 14:19:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3FAD12F375; Wed, 1 May 2024 14:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="m0kGQ34T" Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C4C312EBEE; Wed, 1 May 2024 14:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.134.164.104 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714573189; cv=none; b=OfBLOE3x8/5oytuGG+2W47tSOWi68N8llV6/xLlTY1KRPTY3XuvXDpZh7W398XGGFWLNXv3jEzKoqPLzcQT0HmXtRc7S/ylodT2zwxBlaRd+kZY3lwYFk2EvX4lqzFCFLaoHoj9DYow4t7qPFBFMseec2DpZNoijFINVll/fvNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714573189; c=relaxed/simple; bh=k3SWeRnxAXa2TO+tWpwkxrtkHOTZjCVdqWoasShV9vU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=B0u1EFnjyWVOvj8Q3wgYEB1bTE2kK1yNHNCGMIRYiCmWR9Lsd3yLfsEihxJMVwwXF2oaxEFX584f/uGdCfSGf8zvRA2oJRdKpyx/o3JrfL9b/hfxGofY8Eu2ylUKb/cN/sMfro3oxFDMuxRCbx0ZkdenNl4s7WyAruPlUPqnaMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b=m0kGQ34T; arc=none smtp.client-ip=192.134.164.104 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=zJzS+8XGm8C4eeKbbvynEhybHsCB9GY4MtQsheFW4g8=; b=m0kGQ34TqXJluxRVGGNrLA09V6Txt+Z9ku33c1j23Q36O/8vdp6BLV9y ExfPtsxkkKdiQ6xw9uzfJA0Yb37xhPCWtQDS6YVdQM0CugOOM3qCmngJn jOefRpTslor9tZeeajd/64gCoIZ9w3AWnWVoHcZLUyw7UHMLvz+7j/Ejt A=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.07,245,1708383600"; d="scan'208";a="86154178" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2024 16:19:43 +0200 Date: Wed, 1 May 2024 16:19:42 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Daniel Thompson cc: R Sundar , Lee Jones , Jingoo Han , Helge Deller , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, Julia Lawall , Shresth Prasad Subject: Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free In-Reply-To: <20240501140144.GA10180@aspen.lan> Message-ID: References: <20240501125146.33648-1-prosunofficial@gmail.com> <20240501140144.GA10180@aspen.lan> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Wed, 1 May 2024, Daniel Thompson wrote: > On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote: > > Use the new cleanup magic to replace of_node_put() with > > __free(device_node) marking to auto release when they get out of scope. > > > > Suggested-by: Julia Lawall > > Signed-off-by: R Sundar > > Thanks for the patch but I think this one is a more appropriate > solution to this issue: > https://lore.kernel.org/all/20240421104916.312588-2-shresthprasad7@gmail.com/ Maybe neither one is perfect? The one I see at that link has: if (!pdata) { - of_node_put(np); return ERR_PTR(-ENOMEM); } which has unneeded {} julia > > > Daniel. >