Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5300976rwe; Tue, 18 Apr 2023 05:12:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YTPCY4/S6SUpvGyTtES8lJkGCL1hwuvv/HlYuV0rCH8koV+TlbtRHFZx1cPnG3/+nkrtV9 X-Received: by 2002:a17:902:db0f:b0:1a1:a9a4:ba26 with SMTP id m15-20020a170902db0f00b001a1a9a4ba26mr2247593plx.8.1681819947972; Tue, 18 Apr 2023 05:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681819947; cv=none; d=google.com; s=arc-20160816; b=QUrO95j6LJvRISyhXirn7HIrZQYVAUjrB3zAayyO6r4HKTGtZOoeNsb5HQR97uRoOO GRcU2sgdv1uCZKGluTI8vo3ffyC0ap00NmNjpJH/Vi5ANb+IV1Tbk4m4JYUPV5U/jXpD aYBNAAExh//mdMHgVLjU+dNwfp9Z0v8/vj8+UkZ38o+rWcNUNBYWLvIjNuNE5ceVeN8t xoVvYJUwXQ/8Xsexyh+yMzeZ7Njsb59/4eEt+383KJdD+QT5y7uEuyJHncseDvCmk+oM QSMwdExISFpD7kxcvdy3HTLv0SsoyVNX/nl3zGwB/ZhhimVwmLe0lv/YtEJ7HTej77WX hmIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=Git9K4mQ01En13AQEsk/0K0+3aZmG7o6BvUPIAX5pZs=; b=mrFosgcBvA5O5tZgxOoP3PcRoBeAQlB5lQDayp6gLWw0XczUP+33ZukOOdgiXHDPTn pUZAlJbcr5AyO/UsJCQcrR3euFu6wAIvKfvYXTqWkyDhB4RR4giI2UUrtPSn5doAQZdC QD3dDx8FWRfP+DJ2UPw3pq5Xxf3xRH8tpS6H8vGTj/TdY1d6+T4sc3bQ3yTqPkOA1oHG gGLDzaIaiPUw6wl8iDAYoeAJq+PJrIhDuOcw8Zzo4Lu41HSnx49+WweUs64Jf+lwN6/h vxreJWn8IEi71u6r2raeaZCBmbS5YOA4cqvNBqjyF3YNhaToCBaSuWbLgNMFJ8+jx9rU 3uaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a17090311c700b001994712728csi15167308plh.607.2023.04.18.05.12.13; Tue, 18 Apr 2023 05:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbjDRMHy (ORCPT + 99 others); Tue, 18 Apr 2023 08:07:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbjDRMHe (ORCPT ); Tue, 18 Apr 2023 08:07:34 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFEDAA5EC for ; Tue, 18 Apr 2023 05:00:56 -0700 (PDT) Received: from [IPV6:2001:250:4000:5113:815:8033:3f03:627a] ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=PLAIN bits=0) by mx1.hust.edu.cn with ESMTP id 33IBnCtS027308-33IBnCtT027308 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 18 Apr 2023 19:49:13 +0800 Message-ID: Date: Tue, 18 Apr 2023 19:49:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] soc: mdediatek: devapc: use devm_platform_ioremap_resource() instead of of_iomap() To: AngeloGioacchino Del Regno , zhengkang huang , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230414092113.64514-1-zkhuang@hust.edu.cn> <9bfd1641-3f58-ca6e-1e80-13acea834ea5@collabora.com> From: Dongliang Mu In-Reply-To: <9bfd1641-3f58-ca6e-1e80-13acea834ea5@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/18 18:09, AngeloGioacchino Del Regno wrote: > Il 14/04/23 11:21, zhengkang huang ha scritto: >> In mtk_devapc_probe(), if of_iomap succeeds and any following error >> occurs, >> it needs to deallocate the resource. >> >> Fix this by repalcing of_iomap with devm_platform_ioremap_resource, >> which >> automatically self-manages the resource. This can avoid modifying error >> handling code. >> >> Signed-off-by: zhengkang huang >> Reviewed-by: Dongliang Mu > > You haven't tested this patch on any MediaTek SoC, have you? Yes, this issue is found by static analysis and remains untested. Sorry for the functionablity issue. Dongliang Mu > > This will break devapc. > > Regards, > Angelo >