From patchwork Sun Aug 25 08:48:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kousik Sanagavarapu X-Patchwork-Id: 13776721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65121C5321E for ; Sun, 25 Aug 2024 08:58:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=AWWv+v0L2sJmSk4sVkV402B/XffIijw0F0YPA7tItao=; b=y4CnnxHWywOQrNo2QMiKKoCXjW WTrne4GQ5Od9v/qMCXfXz+4ULy/bq4N7mr6IrOW+VHLP5uScYnOr7ZJkxHpwV4QR/+/gSyKA0Hpdd VEcWJcYLDNWeDedygXfmji3lVbntw0agrI6QiyAC/gYW4RIv3NDCF3eif4JmnjzRyDzL9cAUgSd2t a9y+DpNs74VSuA2R00/miIxif/qx2wtRdfxCMe1AO+N+mTcLqhcERAnCatPgdiEyx0XNjdPTrhUX3 e6esZseHlSliUHB+pssl9HVI/6vph/u6jQExCBeuPhkjEC8E5Qoyme68goRinNnn7JVqd2imQ5AqZ LQ1CzLcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1si94p-000000040nB-3yXG; Sun, 25 Aug 2024 08:58:23 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1si942-000000040bR-0qGC for linux-arm-kernel@lists.infradead.org; Sun, 25 Aug 2024 08:57:36 +0000 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-6c5bcb8e8edso2451554a12.2 for ; Sun, 25 Aug 2024 01:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724576253; x=1725181053; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AWWv+v0L2sJmSk4sVkV402B/XffIijw0F0YPA7tItao=; b=YNCep4XBg63qsKJEAYotUa0/Q79eyOwBwEffvQ+KVluy45SeJQvnguf7pMaVIVjYaE gvRJMuWst+qEa0j8yp1L5sg87WvvN/Et8KZ4iZpJOjl2MdNiB50R3F1+g+6xdE4lZUNg lMke2MJFbHUhCI1oirxtXdun5HGHcO6dQZovmeq4jeXwgrMOzD37B16EPXsQ0B9NPcWj AfJG7WHeTYCps19W+oAQ4jPz9iapfuV0Knqk4MvVBmVPnWo51zQhY4NFcwgAPL2EEXrS EgP0JHN2pvw+IQPIx+fqXO6FRs3E9nNSd3hjKb18U/G08Xdz2Tviuo5DlZjBaTdqFiQw 7Bnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724576253; x=1725181053; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AWWv+v0L2sJmSk4sVkV402B/XffIijw0F0YPA7tItao=; b=sNF091le0HGwxmIPgDuHnKDrawPBMnF0EZxap1qu3uj5Sv/wCFr4svBz2QKaHSnxf5 icz58oDm44meEqrEEHg69nAC9xiSDY9kg1TQYdH6AH0dDE+BeHjaGvLO0iZbUS+lHEio 5N3KBMnXux41ZM6fQVpV0DWcY3RXXbRnRVGyJsMlZqSj8iroOUfB9wiqRQsKSfQE4VrZ QN89lXW5upJgxXvoNtlquBn4zfJiaKFpEvWOkxRq0UZCtw5JxQcZPW5ys5DUxtK/VI+8 LvyP334WJcQa6pFmSzacKbOZSAXF9WLcJZeDKiOzbvIuCypkEqYcMitAlkk1GO4TjwW7 az7Q== X-Forwarded-Encrypted: i=1; AJvYcCUxm4+wL7/YU4n/z+XYi2IX1dPftm/jME7HYbAduWSwAOuO82gErFQXOU6VQ+cS4shCsvc07/VfnmVz/Cw8uiRY@lists.infradead.org X-Gm-Message-State: AOJu0YyBuZ1zAZSc3792PhSjqJF6WpKaSQkZn7aahPCkeuOmVHdidDPH OH0MuaLlHUy+vNXzEb4O6hQ8hhw5jQdN06JbT/G1alcfzkSXJqWr X-Google-Smtp-Source: AGHT+IHzg+/b2pA7gbvhyOZD3w24rtN3pJRqXe4t8b3QptTFV14eembYAw0GCl60Bn0S/AMdAiTAqw== X-Received: by 2002:a05:6a20:cd91:b0:1c4:c305:121c with SMTP id adf61e73a8af0-1cc8b5d88a6mr8113828637.42.1724576252339; Sun, 25 Aug 2024 01:57:32 -0700 (PDT) Received: from kousik.local ([2405:201:c006:3236:b871:d8f1:d936:dc0c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7143425109asm5414348b3a.67.2024.08.25.01.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 01:57:31 -0700 (PDT) From: Kousik Sanagavarapu To: Nishanth Menon , Jonathan Cameron , Santosh Shilimkar , Nathan Chancellor , Julia Lawall Cc: Shuah Khan , Javier Carrasco , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kousik Sanagavarapu Subject: [PATCH v4 0/4] Do device node auto cleanup in drivers/soc/ti/ Date: Sun, 25 Aug 2024 14:18:41 +0530 Message-ID: <20240825085714.10736-1-five231003@gmail.com> X-Mailer: git-send-email 2.46.0.290.g4f02c709e8.dirty MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240825_015734_263818_6895FAAE X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Do "struct device_node" auto cleanup in soc/ti/. This patch series takes care of all the cases where this is possible. Thanks Nishanth for the review on the previous round. v3: https://lore.kernel.org/linux-arm-kernel/20240707055341.3656-1-five231003@gmail.com/ Changes since v3: - s/seperate/separate in the commit msgs througout. - 1 / 4 - "return ret" instead of "goto rpm_put" as pm_runtime was never enabled by the time we call pruss_of_setup_memories() in case we return on err. v2: https://lore.kernel.org/linux-arm-kernel/20240703065710.13786-1-five231003@gmail.com/ Changes since v2: - Split v2 1/3 into v3 1/4 and v3 2/4. The memory setup code is seperated out of the pruss_probe() function and put into 1/4 and the actual conversion to auto cleanup is done in 2/4. - Replace dev_err() with dev_err_probe() in the code paths touched. v1: https://lore.kernel.org/linux-arm-kernel/20240510071432.62913-1-five231003@gmail.com/ Changes since v1: - Refactor code so that it the scope of the pointers touched is reduced, making the code look more clean. - The above also the side-effect of fixing the errors that clang emitted (but my local version of gcc didn't) for PATCH 2/3 during v1. Kousik Sanagavarapu (4): soc: ti: pruss: factor out memories setup soc: ti: pruss: do device_node auto cleanup soc: ti: knav_qmss_queue: do device_node auto cleanup soc: ti: pm33xx: do device_node auto cleanup drivers/soc/ti/knav_qmss_queue.c | 100 +++++++++--------- drivers/soc/ti/pm33xx.c | 52 ++++----- drivers/soc/ti/pruss.c | 176 ++++++++++++++----------------- 3 files changed, 155 insertions(+), 173 deletions(-)