Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1578729lqm; Thu, 2 May 2024 22:34:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXk7T5TeLTU7lz1fGSdcYNaglqBIEnsdAxTyQC8ehGfr4CiICa21WHPQo3i8ln94wWiFh2IUZUYDD3m6Cp1h9qHOgsQQ9NWFARZtupMvQ== X-Google-Smtp-Source: AGHT+IFCe85TkwfEfxUcmQeqkeVRFUAfSKpGXgzROpiJKhVz0B38o/YzQBJ2/k+tXflkq3FrqET5 X-Received: by 2002:a05:6a00:2e14:b0:6f3:ecdc:2248 with SMTP id fc20-20020a056a002e1400b006f3ecdc2248mr1891552pfb.27.1714714475902; Thu, 02 May 2024 22:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714714475; cv=pass; d=google.com; s=arc-20160816; b=od24MpMjbXvy4hMLZyolhZUSdaRIt8ikLxsm5AkJPfe5zc7P0bmYlRYA+fGD0nbx0C kEt2QmmmB4RN8K74tLAeONs2fdcQS9LLjiUDsQcB0JKoFFQy/Zub4iFiI9n/OtgBq7N5 fPu4aVzf2Ey7Z9/aKJqoqbEFWDoQQOsOKjhpAJe3hfWhc+BmPRiR+YdDesROHx2bb4s7 OVqoTms8ARxoGKm+cEOk5nxiRiBuWj6PNwdtmhtuvqsoMmwbO3G0iDLXI9+yeodcCfnt LcnQHKXaUUi4W2s5VPrMYyuckuMF1qAXyEHvgwwzZ3jYGvmtq2+MTOa1Mb8v2LyXO9kB fbeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wvN/kCmxd099KibJ3PxM6Ay16pQS3m7Y9wKZVdWB2bo=; fh=NCP4WqW4doDpJomYLhFhbmWZYAwWO1exiv9qza3giZs=; b=KAQYCCMEXYKEsIQPcKQqr0/XShtO7t8BRDzaYOnTBjvObZiAdJslGrXg4RmzPCSUaF ZFaxAfNWNxEN6Fuv+oENtXkIxNgtjz7Bx5Fu2sJhWIWABDV+5172JfpEaP3UjXLq6fKa JsrIrw/M5gEArVItuvMbWopuHVJyNoVJ43SQOqmQJOQnYUcif1BoFJO+WRgKs2Hbj1VB u2/XVzpimsfqI8DgpTXor9foXz9n3fKJFuJ0SK0qvM89hBlzoOFQkf31pAY1QAFmpC1u Y1V/pfhb3uXfmCcLSQqgFsfCQ0Kq9fogEgIV+iRaA1+dVul4vZ0v+rW3Myjmeeqw8Rdk Qjkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GI69xPgE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-167262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167262-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fb32-20020a056a002da000b006ecee11bb18si6733pfb.39.2024.05.02.22.34.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 22:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GI69xPgE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-167262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167262-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F078B282F06 for ; Fri, 3 May 2024 05:34:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AEEF139CE1; Fri, 3 May 2024 05:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GI69xPgE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9DA8F1C69D; Fri, 3 May 2024 05:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714714468; cv=none; b=GQkuGrlqU7wJO4oM1Ckei+kUBBOqxLVFqL9+O0K453UK5v9n/OYwm9tTTmcqM3C0mTwBFl8Ctq9LLcmgGV0MvJ66cKQ8UvfVQsFX5oO6ROsx4UQ418cNbcmgVHP9SmEgD+0N/cc7l6wweiQ1ylBxaMmrAyCwWCqArYwhHQXa/Dg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714714468; c=relaxed/simple; bh=GcoFEG78oRmOEqdye4jXox30wukosSt6f14MGQzy2xs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dcTIv/BOh61mgfU6TDbIzaMgPk8EYNczPmyYfl32BMD0gHlkCvGUXj/JiApGq6bc+Ju/64F+Kh3eZY7ccpoXHDX/DxG4VUdSSocsGEpfNAeXp39cWn7McNVvQJw7k8zyNzS11SWTT0xSdHSBHsAcKbgrFPdyabBzM/ykk6uzjGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GI69xPgE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5784C116B1; Fri, 3 May 2024 05:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714714468; bh=GcoFEG78oRmOEqdye4jXox30wukosSt6f14MGQzy2xs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GI69xPgEwXqz7gWnO5NqqPE6fMGxHiJrzquB8ZwNQyl60XRExkoofvEye9bnip7Pd HOJRVto5dqfBtSugWlGA0/4iZjt9lFn2W3TlkSNvHhd3NiVw9K1iJIuouOqooRKR4m hyBXzZhV2pbfiiTDYmIuXi8SbX1bGamqtp8KmeLA= Date: Fri, 3 May 2024 07:34:25 +0200 From: Greg KH To: Shresth Prasad Cc: Ilpo =?iso-8859-1?Q?J=E4rvinen?= , davem@davemloft.net, jirislaby@kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, javier.carrasco.cruz@gmail.com, skhan@linuxfoundation.org, Julia Lawall Subject: Re: [PATCH v2][next] tty: sunsu: Simplify device_node cleanup by using __free Message-ID: <2024050357-shading-fedora-2d4f@gregkh> References: <20240501084110.4165-2-shresthprasad7@gmail.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 02, 2024 at 10:21:16PM +0530, Shresth Prasad wrote: > On Thu, May 2, 2024 at 9:35 PM Ilpo Järvinen > wrote: > > > > On Wed, 1 May 2024, Shresth Prasad wrote: > > > > > Add `__free` function attribute to `ap` and `match` pointer > > > initialisations which ensure that the pointers are freed as soon as they > > > go out of scope, thus removing the need to manually free them using > > > `of_node_put`. > > > > > > This also removes the need for the `goto` statement and the `rc` > > > variable. > > > > > > Tested using a qemu x86_64 virtual machine. > > > > Eh, how can you test this with an x86_64 VM ??? > > > > config SERIAL_SUNSU > > tristate "Sun SU serial support" > > depends on SPARC && PCI > > > > By that, I mean that I compiled the kernel and ran the produced bzImage > on a x86_64 qemu machine. But you didn't include the driver you were testing :( > I unfortunately don't have the hardware to test it on, but I don't > think the change is complex enough to require testing on real hardware > (unless I'm assuming incorrectly). That's why I asked if you had tested this or not...