From patchwork Mon Jan 22 20:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Perry X-Patchwork-Id: 190405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:805:b0:101:a8e8:374 with SMTP id e5csp4950dyi; Mon, 22 Jan 2024 13:08:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAbscadDU179DaONKstc8dI3mmrhC3QB9khFfkNtrcR4Wc4QRHMk3kiKPi/YmItiPM2fs0 X-Received: by 2002:a17:903:110d:b0:1d4:4ca8:eef7 with SMTP id n13-20020a170903110d00b001d44ca8eef7mr6012559plh.103.1705957688954; Mon, 22 Jan 2024 13:08:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705957688; cv=pass; d=google.com; s=arc-20160816; b=KRJtT7YEDs014zyzGn1eOY+ra4JGypMkUey4Je1XIhSZfYqgvHh2aJRC6GqzksFxSC seYbuzvPmYC/gzCqvXmttnrrXiAeXc+HNNWYQMCDxZHyuPlSKJE4+eOR2fS0xv4Poh+j ZBHGrqY9wQwtpSi0CoCv+Uub2K6uOuLfOGfc7t92eK/hHlk64sYaHiZrsxe+Rkl3PUuw /dXHd3K89ieHFZZ0PaUKqotVZPxvyjfh/tAlLa3nlNw4nMc/XVdT+GyMXL2/BLvu5yoy sRpCK5b1UntpCjuOXbOIPGeOB/LXSbU0NhNvEe4ZjqisraAPrvHd7luGtGQGTshcafxK rxbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=4Try0d3gARfABB9Khq0TKkInuqkrGo1hSUCaiODzTeU=; fh=4gZXev9gztZYHFggMaFkGmFZmFWQbzUbRUOqvWWrF1E=; b=dt5NpGp+wKZSySDSupZ8FS+fHqGULGOlPYYc/u/k3PeHw81uz8cy/s4JxXVqjzHVkz 5oD639VkjvQMTsf2bO0Nflb+d6MyXYopuwT2wpFGjDbTE1iCLNj33fY3N2aELwXDUh7f 7TEYjmhTWLL+B6KdJtqKJ0fiC748BP36cQcoZ4Ir0lYPz3alCjtvAi3FnjC0YCiU/04t hwOJFdvd1T3GEvq6ephKXOMmOhVP6vK5z6ot0QJlVkw/I0eLAzkpY7LcOCwysN/joJQU 7DQv9Xu+P4Rl1cR5wLWWqLmidA4QA+x6eU7ETPwQHB5jL9A1Sl/WKBOstA2hhHPw95Xl IwGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=UoUuw2su; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-34166-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34166-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h15-20020a170902f7cf00b001d745a90d59si3134228plw.515.2024.01.22.13.08.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 13:08:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34166-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=UoUuw2su; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-34166-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34166-ouuuleilei=gmail.com@vger.kernel.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 CA4202877DC for ; Mon, 22 Jan 2024 21:08:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CAE1481C7; Mon, 22 Jan 2024 21:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="UoUuw2su" Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (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 6B68A2CA8 for ; Mon, 22 Jan 2024 21:07:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705957654; cv=none; b=l5ICg8Z4Ny9idXS94HatqB5/FnyAMurkCM2JtDs/USz5If2g7mlvgbWR/JIlaMdzs+0NVv4xOn0Si9jnCTkXE+UmLXCuGKqO08g/OFPWZELNZ+Gkti4I+2aDf9BLdl+JJ19rQVaLGYJYvHX3n5KlD0ynI9yExgroKE/xVv0PXXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705957654; c=relaxed/simple; bh=9ZAKgwynKYmLmHzZEI2unMAaUO05k1UKaeCJdHvX+3E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qS3SF9WmFQMoyaQ/euuTn5Q0pOk5ZKQ4Ph/Qrq8Q3wQ7O3sSvFqsUEyGz3ixk09nRIXK6euQmo3ZiP7nAnokF662sEO3q1FxuL5Tyc3zGna992ESRsO1yKEGh+FZNqzzD9fodlKYW3z7+n7HjdKPh8n6L8iRQox8U53P8AJe9Zw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=UoUuw2su; arc=none smtp.client-ip=208.88.110.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 2AC209C340A; Mon, 22 Jan 2024 15:57:46 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id RoIy10GyaVZN; Mon, 22 Jan 2024 15:57:45 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B81A39C42AC; Mon, 22 Jan 2024 15:57:45 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com B81A39C42AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1705957065; bh=4Try0d3gARfABB9Khq0TKkInuqkrGo1hSUCaiODzTeU=; h=From:To:Date:Message-ID:MIME-Version; b=UoUuw2sulRYeHDCrEPw1m033gQXMsDZV/+O1j5ipl0APBORLuCPHJJujWzD5dPyOl XPabEv51jUuHhwAwBkOxTYEE+K3VWzkHGOGNCsQZK/u4FJvtv9HAlh9axhvTgKvOOF YjEgjw1f9Osfp6tCw2D4bmOsqZzGGfmxQeRozXv5pwOux7eNUktwXv9nC28gZVgF2e Revp0tgTQjExl6GPtWB2R8ODJpN52uSJAwNPE9lndn7PU0bi1SeaqXQ1Ly7/uFUBDA BBu4YuS8X3fjRzTIaVusfaU5s6sqg5VRJb5afyE8M799sRT3Of5wAno/wc0tOW3TK6 0r++i13iX3TPQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id lAyDf_RnOqJi; Mon, 22 Jan 2024 15:57:45 -0500 (EST) Received: from pcperry.mtl.sfl (unknown [192.168.51.254]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 90EEE9C340A; Mon, 22 Jan 2024 15:57:45 -0500 (EST) From: Charles Perry To: shawnguo@kernel.org Cc: robh@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, charles.perry@savoirfairelinux.com Subject: [PATCH] bus: imx-weim: fix imx_weim_gpr_setup() Date: Mon, 22 Jan 2024 15:57:29 -0500 Message-ID: <20240122205738.2432552-1-charles.perry@savoirfairelinux.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788826288558508186 X-GMAIL-MSGID: 1788826288558508186 Commit 2a88e4792c6d ("bus: imx-weim: Remove open coded "ranges" parsing") changes the parsing of the "ranges" field by using for_each_of_range instead of of_property_for_each_u32. The number of iteration of the loop is now equal to the number of range within ranges. It is therefore no longer needed to check that i is divisible by 4, otherwise, valid configurations will fail imx_weim_gpr_setup(). Fixes: 2a88e4792c6d ("bus: imx-weim: Remove open coded "ranges" parsing") Signed-off-by: Charles Perry --- drivers/bus/imx-weim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 6b5da73c85417..837bf9d51c6ec 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -120,7 +120,7 @@ static int imx_weim_gpr_setup(struct platform_device *pdev) i++; } - if (i == 0 || i % 4) + if (i == 0) goto err; for (i = 0; i < ARRAY_SIZE(gprvals); i++) {