Received: by 2002:a05:7208:13c3:b0:82:bbfa:f723 with SMTP id r3csp1136005rbe; Tue, 14 May 2024 12:38:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUohpvVirOWPQ/DFSR5/giWjJLejsrRGcUsVnKO/IrRKDmX7etZwvEWRdDkMCeg5WOPmE/vYKz2Hlrwghm08L9FHK+WrPIC5kIqElrcmQ== X-Google-Smtp-Source: AGHT+IEWaeZsUjtvPC6nMqH5aYZ3RC9EudMko7BWbsuENZIhTPwpFcgkjPcq/RuZrTwRlXdFKe5V X-Received: by 2002:a17:906:dd7:b0:a59:d5e4:1487 with SMTP id a640c23a62f3a-a5a2d5cb6ffmr1290837666b.42.1715715502356; Tue, 14 May 2024 12:38:22 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1797b9cesi646035866b.214.2024.05.14.12.38.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 12:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=jCAyFNUu; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-179103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 250961F222FD for ; Tue, 14 May 2024 19:38:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04E2B18131C; Tue, 14 May 2024 19:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jCAyFNUu" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D239D1E4B3; Tue, 14 May 2024 19:38:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715715493; cv=none; b=MGlIBljO1Uv8NB2SZM9NAuH4TxJ263t5m5AGUdWZe/K5syurtgYgEL7yYFB6GlveqgUIml2026tSJP95E/yGtTuqLhNk+2JX3LUCW02AxBZd+EP5BjcfcnQwA1QJq4gNVInxueNAz93ux2e74zOrjnQF/QFc78rKdSP+CLA45DA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715715493; c=relaxed/simple; bh=lQwl2puuKbV72+DsiO9T7adpACTwdXUGgRTJQloSNHw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AM+giA9osH0RGCEEDcGjRec6mYpZE5Uz/Zn69mW6eHZIYml4CYzFLVUxdp/0/Ozmw0F+4KbryQfrPUp+sX4rhyjsGgILsPlhng7YoQQaZNHPVcDw0xZEWdF3N4wuW9b6RIAHe+s53uX8iKCaIGfgGU5hv8hW0KLHM3ZBgHvzz8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jCAyFNUu; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5e8470c1cb7so4072578a12.2; Tue, 14 May 2024 12:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715715491; x=1716320291; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WZ2nrAvoRZbBvV3Qzn3kjm6zRoNtce+1pSkoAvyjL18=; b=jCAyFNUudUtOlRMGFQXXniiPGkmwt2aXkvrM+PKDJCVjMrSR9fnRDMtqOBF7qHHcz1 r5+M5wdEgUG+5xVNlQss9zkz8LvsC+fKGwdtkCivTUM8wIS+ziuqOcjA/ObgJPwNzsxr tYXWjKVRenyjjanImHckT1QK9OQgf1hvac3HlQAkKSYG0Qw9fApm6bL2K9Diz5nahpRa 2xMRjxykmPRwMBqkjw2USXQBfNtGnuAJnYFy5e3/TCSYbWpKZuhKgj/FgqSW9g9F+QlM ZLasVUTC1dsFclPfFGD7pI9YkXPZNlAexEKVV7X/9NsaCg7O9a1rD7E9U3gNYX75p1SQ e0qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715715491; x=1716320291; h=content-transfer-encoding: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=WZ2nrAvoRZbBvV3Qzn3kjm6zRoNtce+1pSkoAvyjL18=; b=TarcRkA1g40KInImlDc9eD9cW2VQQ3uO25lcpU00IGLr/cJkbXyGOFcr5mAgFVoXyD vpTMa9uLDw4cLHP7Lf6H9ufNy/ZBLfyqp0f+HPOXL/UFqC9kQTMvcM8x6PgmqfrBwEDS iizJEe1+ln2jVG7lwzBQ1VS025IhJAPuyI9CRYukRsWfpFIYtiXAdBp5D9A/jwL+AIg+ nGpsjhjcRsk2AnEXHJ7pWkVlqTltLse/MmvRd+yIdlbuTnHirJnHiZ4TmN152rr4FAU/ S47aFmpPX85DpPFGONiP1NjQRy2TpzkthONIStfKpKQ6L/dlsaDnL+ZTB6iFkuh+rLXU kiJA== X-Forwarded-Encrypted: i=1; AJvYcCUsrP5sw/QlxvlxmJc6QheyIn0ISmeFI710GU9SOqIdiI1FRENdRwlXU07OMplwwj3vd0/XXgXbxhYKYw4MQHA4g9vQRLujEk0kXuD9vmfDY6zcIrF4FAoZKmdgjlN7Y7qD8RCrX6wzGgMqKZ0CsAq69Kmzmwq8QPczPz1jG2xfQXWitxMtMQ== X-Gm-Message-State: AOJu0YyXQocrA8pdnWa+NcpqgPtPPjdmksf1k1DsJPG6VV4dCBtijaOy wki2Ls8UhoQGJ+mznXSH6j4BQYUNT8NvwsrxAbowkFma/q1ohtYoft5RDvYcQopHFVgiBH1JvlT /X+a5OpQlJVfdxVFe1C6f7UvxY+k= X-Received: by 2002:a17:90b:4c8d:b0:2b3:ed2:1aaf with SMTP id 98e67ed59e1d1-2b6cc76d3acmr11217429a91.29.1715715490914; Tue, 14 May 2024 12:38:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240501084110.4165-2-shresthprasad7@gmail.com> <2024050357-shading-fedora-2d4f@gregkh> <2024050402-eraser-stimulate-3908@gregkh> In-Reply-To: <2024050402-eraser-stimulate-3908@gregkh> From: Shresth Prasad Date: Wed, 15 May 2024 01:07:59 +0530 Message-ID: Subject: Re: [PATCH v2][next] tty: sunsu: Simplify device_node cleanup by using __free To: Greg KH Cc: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 4, 2024 at 9:32=E2=80=AFPM Greg KH = wrote: > > On Fri, May 03, 2024 at 02:31:22PM +0530, Shresth Prasad wrote: > > On Fri, May 3, 2024 at 11:04=E2=80=AFAM Greg KH wrote: > > > > > > On Thu, May 02, 2024 at 10:21:16PM +0530, Shresth Prasad wrote: > > > > On Thu, May 2, 2024 at 9:35=E2=80=AFPM Ilpo J=C3=A4rvinen > > > > 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 soo= n as they > > > > > > go out of scope, thus removing the need to manually free them u= sing > > > > > > `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 bzI= mage > > > > 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 hardw= are > > > > (unless I'm assuming incorrectly). > > > > > > That's why I asked if you had tested this or not... > > > > > > > Really sorry about that, I thought compiling and booting would qualify > > as testing. What should I be doing then? > > Compiling and booting the code you change would be a good start :) > > thanks, > > greg k-h I've managed to successfully cross compile the kernel for sparc, along with this module, but I couldn't figure out how to boot the generated kernel image. I looked around for quite a while but couldn't find any straightforward guide suggesting how I would go about booting my own kernel on qemu-system-sparc. I would really appreciate it if you could point me in the right direction. Regards, Shresth