From patchwork Sat Aug 5 17:41:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 710951 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8020C41513 for ; Sat, 5 Aug 2023 17:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbjHERmN (ORCPT ); Sat, 5 Aug 2023 13:42:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjHERmL (ORCPT ); Sat, 5 Aug 2023 13:42:11 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3AE6183 for ; Sat, 5 Aug 2023 10:42:10 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-68706b39c4cso2161381b3a.2 for ; Sat, 05 Aug 2023 10:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257330; x=1691862130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CXEH8Wa3ojD+esCQhV22he8Pc5JwMdbmIGFKAtqq3lU=; b=i9tbqf5TzsxdR8yFifphKZWnrPl1Ckv74LxFEHOMpMMvv5kdJzVDtoDtExAZ7t0N9t KzG638x7INF+Mac7aTRK4k7wN2umrVA+od63KF/I/lzeYFvljlGw64ocISCIS3r2OxqU nZAjyQ2VCY15S2Va+1eFSMG3rK0RbgmLaFC6VJLxa9rODoISrce5p32Kr4G1cn85p6Qi 8twOkwW0nP5ucMoTQ59lLnVlpkxHcIHdLd3FseL8GOWelgkX3m7jrUKqdPWMMkrakER+ vlUgPoF/zCoAbcvoiUdWHiNlMnFtN33kkQarBJtlyWG/av+eu8MN5H6qne6JGZb0ElWK F0Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257330; x=1691862130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CXEH8Wa3ojD+esCQhV22he8Pc5JwMdbmIGFKAtqq3lU=; b=dp4qL2p2prIOuON8s0uqSiCjxEgFY5sr6DaROw9rWG6WBL+Ry2rLW4cdiwgh31XT1L +awkstUjeuYPgciQi1+/geBYXE1RHfaoG8DOqJzvicj2KYj+hGRIHSW+1rY5g0ZBU+vt eAmm1MEt+9Gxgu2Dp8Q3/QDFNAwpt56xp5M1iiCiIqPnyHU9Og11emfJgxRdonSzvkiN +LfYc0ojjcnZdGc3owMCQj0M4OtKZdjfDW0OU1Jgj9Q4JHXu2ok9V3qbeMw9RtCfQmAk c64j0uxr62AJteeFEXKpqqpVQzUaB6Mc/r8hAJrPdbkhRpnS2jobiF3AK3utZI48f60E Erdw== X-Gm-Message-State: AOJu0YxMhSKxcX+sZREwSRqaoWTPrq4Y1cYTsIH2Kd5i3t+j4cGYS3nL YLVzB7mYEO/GSd+HgiYJu1bV X-Google-Smtp-Source: AGHT+IEQZKy6eZ9zB73Nlmrdh8OA6cfrfr262pAHVYOI+3rkx6/lhGQc0+CoG0aVyM/nTPlKCjypgA== X-Received: by 2002:a05:6a00:1501:b0:675:ef91:7922 with SMTP id q1-20020a056a00150100b00675ef917922mr4571732pfu.4.1691257330155; Sat, 05 Aug 2023 10:42:10 -0700 (PDT) Received: from localhost.localdomain ([103.28.246.21]) by smtp.gmail.com with ESMTPSA id i14-20020aa78b4e000000b006874a6850e9sm3363160pfd.215.2023.08.05.10.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:09 -0700 (PDT) From: Manivannan Sadhasivam To: miquel.raynal@bootlin.com, vigneshr@ti.com Cc: richard@nod.at, linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mdalam@quicinc.com, quic_srichara@quicinc.com, dan.carpenter@linaro.org, Manivannan Sadhasivam Subject: [PATCH 02/10] mtd: rawnand: qcom: Rename variables in qcom_op_cmd_mapping() Date: Sat, 5 Aug 2023 23:11:38 +0530 Message-Id: <20230805174146.57006-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230805174146.57006-1-manivannan.sadhasivam@linaro.org> References: <20230805174146.57006-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org qcom_op_cmd_mapping() function accepts opcode and returns the corresponding command register. So let's rename the local variables and parameters to reflect the same. Reported-by: Miquel Raynal Closes: https://lore.kernel.org/all/20230804190750.3367a044@xps-13/ Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index b6751fb17587..be428b80a39b 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2555,39 +2555,39 @@ static int qcom_nand_attach_chip(struct nand_chip *chip) return 0; } -static int qcom_op_cmd_mapping(struct qcom_nand_controller *nandc, u8 cmd, +static int qcom_op_cmd_mapping(struct qcom_nand_controller *nandc, u8 opcode, struct qcom_op *q_op) { - int ret; + int cmd; - switch (cmd) { + switch (opcode) { case NAND_CMD_RESET: - ret = OP_RESET_DEVICE; + cmd = OP_RESET_DEVICE; break; case NAND_CMD_READID: - ret = OP_FETCH_ID; + cmd = OP_FETCH_ID; break; case NAND_CMD_PARAM: if (nandc->props->qpic_v2) - ret = OP_PAGE_READ_ONFI_READ; + cmd = OP_PAGE_READ_ONFI_READ; else - ret = OP_PAGE_READ; + cmd = OP_PAGE_READ; break; case NAND_CMD_ERASE1: case NAND_CMD_ERASE2: - ret = OP_BLOCK_ERASE; + cmd = OP_BLOCK_ERASE; break; case NAND_CMD_STATUS: - ret = OP_CHECK_STATUS; + cmd = OP_CHECK_STATUS; break; case NAND_CMD_PAGEPROG: - ret = OP_PROGRAM_PAGE; + cmd = OP_PROGRAM_PAGE; q_op->flag = OP_PROGRAM_PAGE; nandc->exec_opwrite = true; break; } - return ret; + return cmd; } /* NAND framework ->exec_op() hooks and related helpers */