Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1498493pxf; Fri, 19 Mar 2021 08:23:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjP908lkcSbxSIygKZQpADpGOafRRPJxnZJAdfkkXZvFXWiAJk6n7D3hCB4dtUYyUlU7bA X-Received: by 2002:a17:906:6817:: with SMTP id k23mr4896091ejr.6.1616167416728; Fri, 19 Mar 2021 08:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616167416; cv=none; d=google.com; s=arc-20160816; b=R/xptlvpUxQqfTNXLUpWUyVSzyQr6JHThHF3E4p6cqy/t5tsc57ep7JPVsINm3STgy JVjj9jKgQXVKjCGDi3aUtsEhg9TX8bx6bOeK+ExPWngG7OBoTsjvJbjQ431lZs4qp4EJ x6TBDVSvtJM9WSddAljRRZg2vfgeVKw1M2YmSfpPKvaeV7UE4MYvgYCU82zDhW5c2kas hYy5esXqzpk8vKu0Inm+C7xyOKucocWDXe6LtuC93PMe8mJgJA+M9E5C1y3Hq7JC2VLY SrU4B+D/cOwhOkyukZhhlooe0DzXp0fXlcicANO9MhT199KlVYWChrOEJzzXaLH8/WK4 VGxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=EyrxdYGskd5nndv9DffBff17H/pW8ipDLECkcAeVTfk=; b=kXzJfdXQGu7Lbyb97uDWIkUTjz9bSQ/tkytOLc0/sDr9U/biRCX0tApQHD5QRWDdyH 9rU0s5gndJMbi6CwqSwJ2xDzF7sUcRUb83WM7j2S0A/EfDiL2O8z75GtTGjxC9ptQWEw 5cpuk/JVU7zQAXhNg1Q/6mnLQuQ8DLWSv/JHjdi+0MJWfqYlqhc+gcHMyyECsSAue6P4 2TzcHWqzbtok+pMHjcrYLPNd2RojvxKDoscszxYuudh52Yw/qTKO46S+m3xJ31OLgZ7j gJLPsXxnsxA1bXDHt0EEeb1I9i2ZSBPaBjdG5ozE0qzFWPcRQJjOzYmSFz46WPUNfAzL OeVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=G5KdmoHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si4619407edz.99.2021.03.19.08.23.14; Fri, 19 Mar 2021 08:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=G5KdmoHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230327AbhCSPWP (ORCPT + 99 others); Fri, 19 Mar 2021 11:22:15 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:13264 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230314AbhCSPWE (ORCPT ); Fri, 19 Mar 2021 11:22:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1616167324; x=1647703324; h=from:to:cc:subject:date:message-id:mime-version; bh=EyrxdYGskd5nndv9DffBff17H/pW8ipDLECkcAeVTfk=; b=G5KdmoHOoZeZaCMxvWvsfDq+uHHTT16BIAun33Nn998wtdrzEgw9Ynpn NWcVqHXbeZ4VnTCQUKcVnc5A7OPRJ14gA3j8d2Qu19eWEuFDSRTxqRfNZ gCZV9e1/0dU71QBZfyHCODmSo1CICQ0ikzy2bjHvRPyu4lN2MnpDYvxce M=; X-IronPort-AV: E=Sophos;i="5.81,262,1610409600"; d="scan'208";a="121703728" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2a-53356bf6.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 19 Mar 2021 15:21:57 +0000 Received: from EX13D19EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2a-53356bf6.us-west-2.amazon.com (Postfix) with ESMTPS id A6DAFA1D50; Fri, 19 Mar 2021 15:21:55 +0000 (UTC) Received: from u8a88181e7b2355.ant.amazon.com (10.43.161.244) by EX13D19EUB003.ant.amazon.com (10.43.166.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Mar 2021 15:21:49 +0000 From: Hanna Hawa To: , , , CC: , , , , , , , , , , , Subject: [PATCH v4 0/3] Fix pinctrl-single pcs_pin_dbg_show() Date: Fri, 19 Mar 2021 17:21:30 +0200 Message-ID: <20210319152133.28705-1-hhhawa@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.244] X-ClientProxiedBy: EX13D37UWA004.ant.amazon.com (10.43.160.23) To EX13D19EUB003.ant.amazon.com (10.43.166.69) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches fix the pcs_pin_dbg_show() function for the scenario where a single register controls multiple pins (i.e. bits_per_mux is not zero) Additionally, the common formula is moved to a separate function to allow reuse. Changes since v3: ----------------- - define and set variable 'mux_bytes' in one line - update commit message Changes since v2: ----------------- - move read() register to be outside of if condition (as it common read()). - Remove extra parentheses - replace offset variable by direct return statements Changes since v1: ----------------- - remove unused variable in In function 'pcs_allocate_pin_table' (Reported-by: kernel test robot ) Hanna Hawa (3): pinctrl: pinctrl-single: remove unused variable pinctrl: pinctrl-single: remove unused parameter pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux is not zero drivers/pinctrl/pinctrl-single.c | 65 ++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 28 deletions(-) -- 2.17.1