From patchwork Sun Jul 7 05:14:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kousik Sanagavarapu X-Patchwork-Id: 13725968 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 CC2E8C30653 for ; Sun, 7 Jul 2024 05:54:22 +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=Lf5eB5gQe+ugDPVo5OexhK1yFoWg+Ll1LkaVKdwFPUs=; b=Om/VU/w3VcNsrWFPNXE9bh0mHG FxsXW8ypuRXoCGFDqOgrLLhEIVBoiRwNkVAyEC76LEX3LDYmckYyX/YfUTtvvhV5SwCUJhBnBrWBL upo8geBfIH65nWHM5aMqC/EZFeZRyTSj8q0BdscpgYFRCCc6NRLYxcvkME2WnynZzQ9TSra5n3ueS Rw9FDaEU25W8uLylfvCA2vdFbGMkf9PVRIw7NrpnLq3MnJ+qDuk6cOovm9XTifp1C4uN8vHbwlCio Ic6vdVQ9bqSHh5MzJdHN1MFZKBBSicmZOKU9ArvOCeHxOPw1lKwXF28G4NJI9qMWmcJxHsxg619i2 eZrcavuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQKqk-00000001O7g-0yhe; Sun, 07 Jul 2024 05:54:14 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQKqV-00000001O44-0RrI for linux-arm-kernel@lists.infradead.org; Sun, 07 Jul 2024 05:54:00 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3d566d5eda9so1466355b6e.0 for ; Sat, 06 Jul 2024 22:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720331637; x=1720936437; 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=Lf5eB5gQe+ugDPVo5OexhK1yFoWg+Ll1LkaVKdwFPUs=; b=iP+WPEruP2WjEE07nwHvbowi0IGWI4Ug3tym5VN7RU7qcI1kNzcLmzp5c78kLcSPjv 0eSO0aZU7InqW6t+ZlIMYkSjpyYhgktvIHNNlI1dFUPfJeO+M4Hzo6W1pW1pyokw3FBH mv2kSY5AjgoWQ+qRKEgMYAZ/DiEahnxq+SfTmW/6wvHLE153Qps/sBQKzl1wl+yVyqOt ej6YFPyqbxJZXRe/jXxNAyZj1Yx6Vts/y9rAgRR5nqWtg3wN9DH5ygz5mg3re2g7Z4ju Zm4K2UMXbiHPHp1ojk1acNFC20aJnV/87dqazaFwEzgx/yD8DY/stLqvNnVybItrWgjd 4U5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720331637; x=1720936437; 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=Lf5eB5gQe+ugDPVo5OexhK1yFoWg+Ll1LkaVKdwFPUs=; b=U78ahwV5t6lm+seUnZgAQAqn4jq+KMjZsEFzGWrHALpbG5Ht1uun24qsTP2x7wB16x +ffNigyrJaap753MHhZnsnOdpYKYrEVYITSN4rQT3RvV78cQMt6hi0Vsw2LbaGvaIvYs agz1j6ewA7qqa+9mmTzXE3AVEomTDBwM1wHCxYQxexYFbxIAsyvxL7pyGpJ0qadyD5OK Qh6wlYSxBQFgS9QRZTl9DxVtmsm5RRd1B17AH63bWmlIrzOHSC5qvpZEbLIBofZWWZBa Xx0MYsVnxFQY2otvlbWsbNCJIId+rRgteexLRqBYltsqFjbhyPwxmSRnld3IlX6WuL/k ttZw== X-Forwarded-Encrypted: i=1; AJvYcCXdlRSN8Qs2YP8slBnWxkhfPALQVoSodJu0QQrFN6hQFO83ST6vFMzt44FOEMUdJw2RCQZ5ZmHWOh+IxYDul/PXmJLLtN8hgyx9oLxXNI4wDt5sBjg= X-Gm-Message-State: AOJu0YytUKrA6iI6aFywkDxaIb9yLxfr2Uf+FX4lVzekjNbFXRmqJT/H 543C82VRhhGeMGw00DGGqZvODb1GaZCaOdmU8fdKAhpm3rRXFoXG X-Google-Smtp-Source: AGHT+IHtZmtvjyz1tctc81zBzknJCbRvgfLGu2vyxfT+krGwYhRqYnmkSx5OeON3Ld5M3jLa0B0/9Q== X-Received: by 2002:a05:6808:2386:b0:3d5:5c77:fc1b with SMTP id 5614622812f47-3d914c8282bmr12832641b6e.26.1720331637100; Sat, 06 Jul 2024 22:53:57 -0700 (PDT) Received: from kousik.local ([2405:201:c006:312d:252d:94b8:b79c:d7bb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b2e5fe3dfsm94429b3a.97.2024.07.06.22.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 22:53:56 -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 v3 0/4] Do device node auto cleanup in drivers/soc/ti/ Date: Sun, 7 Jul 2024 10:44:15 +0530 Message-ID: <20240707055341.3656-1-five231003@gmail.com> X-Mailer: git-send-email 2.45.2.561.g66ac6e4bcd MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_225359_190243_8E72E323 X-CRM114-Status: UNSURE ( 9.38 ) 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 Jonathan for the review on the previous round. 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(-)