From patchwork Sat Aug 5 17:41:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FrLN7knG; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=e1bZg3WP; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ9080R7vz1yYl for ; Sun, 6 Aug 2023 03:42:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lxl35SOkbQr/dHr/mpixAdPdcoFs/loEoGeR8U/HtB8=; b=FrLN7knGZPq6gI gfTwjPuOd7bT+vdSNs6u+MspqExgvbNKud4EOMTTUqsI+6XXnW8saoIIPV1beMgy+n2vAunmD9xC4 OAdJgMTo4JH11xuTyCBhjx5f/00CEcbeQkBg3mZDqlDkTAlNP0NbaYiPHZCsoFYywSiiFm7lFoPz0 RRElN8IuL+fQ4ka3r5UL/viTpJVTld1E4wMCK7rAfgoxWacEwEqaGRWYAkX9Rmr8pfMoMEyWUzbIB HbgkWq+FmMkKPYSp7YHXEE0Y51CIM/GRNoggWHrGkL0RO15jLjvSHRVC/UeQaM7zq1qToK8VXx8NR nmf/TIqphCSw+bwkLhUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLI4-00EOty-2z; Sat, 05 Aug 2023 17:42:12 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLI2-00EOsy-2N for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:12 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-686ba29ccb1so2111053b3a.1 for ; Sat, 05 Aug 2023 10:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257327; x=1691862127; 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=LzHoBg1aTtFdNgIFHIxm61nutJbPmolyU88qKYX8avE=; b=e1bZg3WPmbUxYy4tVUd2YabTZ8JXTzEPZRnA0bqC3L7uQXcn6U887EK3lAeNlDZyNC vQjEbD9X1fJLxuU5Zv/7ik4UhOHvvdSysx4b4cCOLfdSo9+IbFEQx/QDw9Zair9WhJyJ 0pDNjZAmedfhhDhiC+hcnm6hLq+kf2Ma3ecnjHM/R6tfqcRftOpsw1bXYOrQVsOLJjas J4p85ACOLMtCOVfV3nW/3jAGe11uzBmQzbdlzmGs/O+TIpgy8SLk3TpWPKtYyvnk5v4d hkHTWzB5dWlbQWhRalHEGZghsjx5CPq/FKL3q4R5PtlvenwD61jnGfrZk9y6vn4kTYIG YIFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257327; x=1691862127; 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=LzHoBg1aTtFdNgIFHIxm61nutJbPmolyU88qKYX8avE=; b=hMrzgTe52SGKI5pvhwX/pFyt0jG2/WgqaErWoEwWnO5EWqfzYXxJj7QZmNNdFTlgKa hsMmVyNFpK+l+dD2cGvRBoipEEjdQfIMWC7U81ZGMPlijQEUAcjU2X7/ZRzXg1Uwz7gl /rO5Bi00yw1/ZqA3soIan/jIzLe+nJsYCjVo4WhyvafaPQAvSrznwlC9IyNLft9YDioE yrFKGnU+rs3uEqfXT/HpjVNo64ZEMz2fZjf3iUXkPCDv4GgXTXuo6nKpfbJ7cm3BHw// 1A9US/rgf1g4oxXwNk6fs/1XlhAVIJdHxyBiOTD97Z2EWKEw/88exMaM5NzSTxvey/Wj xyQA== X-Gm-Message-State: AOJu0YwwxzUhO1dcCeFJvLvLoCuqvGNpmsC33aqcroRpc5uM4FWYHv+J SQye+CiIla55n3oPQlBZQmCX X-Google-Smtp-Source: AGHT+IEOiKPKt0ItAknA4l5B8LXP+gGY8RF1sPeFYB7R7juUVo86q4NWggmSxvfpHBmQc9/dyHihKQ== X-Received: by 2002:a05:6a20:7fa3:b0:12f:d350:8a12 with SMTP id d35-20020a056a207fa300b0012fd3508a12mr4024851pzj.21.1691257326933; Sat, 05 Aug 2023 10:42:06 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:06 -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 01/10] mtd: rawnand: qcom: Remove superfluous initialization of "ret" Date: Sat, 5 Aug 2023 23:11:37 +0530 Message-Id: <20230805174146.57006-2-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104210_775729_93225AF6 X-CRM114-Status: GOOD ( 11.05 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: In all the cases, "ret" variable is assigned a value before returning it. So there is no need to explicitly initialize it with 0. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In all the cases, "ret" variable is assigned a value before returning it. So there is no need to explicitly initialize it with 0. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index b485d8517fce..b6751fb17587 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -1554,7 +1554,7 @@ check_for_erased_page(struct qcom_nand_host *host, u8 *data_buf, struct mtd_info *mtd = nand_to_mtd(chip); struct nand_ecc_ctrl *ecc = &chip->ecc; u8 *cw_data_buf, *cw_oob_buf; - int cw, data_size, oob_size, ret = 0; + int cw, data_size, oob_size, ret; if (!data_buf) data_buf = nand_get_data_buf(chip); @@ -2684,7 +2684,7 @@ static int qcom_read_status_exec(struct nand_chip *chip, const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0, num_cw, i; + int ret, num_cw, i; u32 flash_status; host->status = NAND_STATUS_READY | NAND_STATUS_WP; @@ -2747,7 +2747,7 @@ static int qcom_read_id_type_exec(struct nand_chip *chip, const struct nand_subo const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2795,7 +2795,7 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); struct qcom_nand_host *host = to_qcom_nand_host(chip); struct qcom_op q_op = {}; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2841,7 +2841,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ const struct nand_op_instr *instr = NULL; unsigned int op_id = 0; unsigned int len = 0; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); @@ -2935,7 +2935,7 @@ static int qcom_erase_cmd_type_exec(struct nand_chip *chip, const struct nand_su struct qcom_nand_host *host = to_qcom_nand_host(chip); struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); struct qcom_op q_op = {}; - int ret = 0; + int ret; qcom_parse_instructions(chip, subop, &q_op); 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: 1817357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DM5oT6/V; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=i9tbqf5T; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ9080cMhz1ydt for ; Sun, 6 Aug 2023 03:42:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=I2iy3YKtseP4UsJVsu5U9gJLFS6CutCKD8G12jJe80Q=; b=DM5oT6/VK3R3oI 3YxqNnaIsF3TG1OBpRWFewPsPSJkYGMLj32FQNkrZ87e5rOECTry76pe2H1qNARdJPhtXXFyXhqDo OA9YRuExd7QkoJi0SS8cJcmWXV6KGGB3Lg1wqtlM6zs4fjJpdWEK1kwytI8/v/a+AhwpjcGRJlgKw 5BeSjmV8tZHQnckdkzUx8kvBocANNORKoOLjqTanUud3DsIaJNMotcY9Ql1jQrqNKdcGP7BMHY8zN Qakx6UKor0h9lHrK3M3z47nFMjMpUqqbZuZpdKWNHv6hGvjCb2kG0OWm+VeyuDZE535FqQelpf4XR MZuXWyMLpal/noBjUEWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLI7-00EOuM-1q; Sat, 05 Aug 2023 17:42:15 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLI4-00EOtN-0e for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:13 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-68783b2e40bso2162177b3a.3 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=Cx0CHNiDw1V6Vachg2x+GI/yTUY4TltT2EORRNDrGmXxON2Rf4+XhQRRU/eBy6cnOD V9giByjuOi0TvccBkD70eZ+0eIgVNaxTAZ+aAyO7eQy8BisA3Ni1xitB3nEQVcWXleLF gjsYIfxBNqksm3CbRScCQrsTTkqoVDL1a8Q02d/MiDiaJo4bPYzwYXUNGph+SkLsuHMB 4wK3QTTngrkhyalRy1tKCP9e/BP+k7CRFBBEmv3U2JDBHsWDNi+z5P4/d5QsGxMPLEAi yeiq2tf50ui0bxchcOWtOjedPrBiACybuR1fZgWq1poITIRF0b6x+Jh23e6E8KrJAjHL NWPg== X-Gm-Message-State: AOJu0Yym43U0TxOLYUS8B1JjOrh+QQwRgjmSFI9ROe6y+611VLX28jCm LvFbPXzNZSdexoE1uP+p2nEOEP6woXEhLtWvsQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104212_239968_E777FD7A X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 --- d [...] Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:436 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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 */ From patchwork Sat Aug 5 17:41:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KQQs64vL; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=spmuW220; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ9080Vvkz1yZb for ; Sun, 6 Aug 2023 03:42:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ta8bDYIg3C14gVXYZY1fJGs9FOjN8LiIr9P4WRpi5z8=; b=KQQs64vLhvc+uQ 6QxCmoCtN+Gv2g5PIAG1P8TfdXxzoii7j7hxBEt9hXUPvWGEimAEN/7icqEbXJ/maFlD4Qa9qyBoa yPpi/vZmY043PIhxqdtxCXfQ9G197LMoc0ASk/gig28/qhAz915TbaX2bw2Uw1pZGIInBrUl6ATQU uUWV9ZM2C8pdj0VjFNp04xto7t+VtzuHGusPXyAbXfUhFiDYodrfyRr3poukzG6KKjvYbOoVnrHo5 UUTLf5lUCIiZpKmM/EGd2VaGD+imQqw0J7eHWpTqDbx7sWiMZQk5Z0QvGLZg8ssWf/fkeym4qXaeM OFCNcqAOkVXnBvip+Yvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIA-00EOvk-3A; Sat, 05 Aug 2023 17:42:18 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLI7-00EOuF-1j for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:17 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-686efb9ee3cso3005451b3a.3 for ; Sat, 05 Aug 2023 10:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257333; x=1691862133; 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=uWgVvz/rSzQAaNBR+0GRt5Tgri/Am0g/0Utn1T92Y2Y=; b=spmuW2205c4AMxvmTZqta+KfpbmGiMADfX552zTgjqqhuoU5jB50Rvj6YA5huHCmxS Clj8Tc/0sYIjn8v3eOqz9XQ/ICo1AOxtgTjNwJn285MAh7sCg0B6/9qmkvNTKmqY31KM kF1ntOt634CLv/Qdwqiiwb2WbWP5MocBnkT7Hj96LUqUuSGE8g9FdfBT64hp5UemWICs uwVemBDY2CR9JB7S/JBkewlSzcg2alQG4DzmdXAuZQpoTdUqiYiHwIo2cw9fbXvyOaip vDDwiawt5foQ3dgQ2Och6bf1DoT/UDLHoj87uHzsYv/h3mQQcFlvkFrYqiB/E/U1Bb+m +0Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257333; x=1691862133; 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=uWgVvz/rSzQAaNBR+0GRt5Tgri/Am0g/0Utn1T92Y2Y=; b=Fi9EOXlHGMDw8z8uCb5EY6jMvXBK2wMWL1B5OjygL+bdU1WwkJjmkbmesdyWwFXSxT re+bQlBeRW+w9R/0aD5pCZt9zKzxSzvabrvkFZjtX/8RKPyu8ynb3wyq5rYMypTzKAOR 00h7nS+OSEzo7/6zZbBgkLj6kzaW4VfX6E1Z9JS9g7niJm4WslphNDwblilEITrjUu4T Bjq03hQB4IACuTg9KU0WOEnVSKOzaJQrj2FT4xZ+mQ/dFUpTDKQb0CeV6swCHwuvR9LZ v0V7L9TRrifkQX+M5suAj9wNQ7eR/qfHlWPuo+k3GhXRswBlnmmMf//GAG529js/+AA5 EMAA== X-Gm-Message-State: AOJu0Yw9Ft6Nh904RuEKZEfo27K7mZ9O7n7Nf1mMm3QZk8KQxwdVEK57 j3HCluDMNNtjvOmXLXVGzkAJ X-Google-Smtp-Source: AGHT+IElfmMvpoXzEv7T8xFD3V6MeRB4DjmbKf0fKAgK1eie9hb1tQx+4CUQdeE1PPVXG/iSNIBwXQ== X-Received: by 2002:a05:6a20:1456:b0:13f:5234:24ce with SMTP id a22-20020a056a20145600b0013f523424cemr6875817pzi.28.1691257333498; Sat, 05 Aug 2023 10:42:13 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:13 -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 , kernel test robot Subject: [PATCH 03/10] mtd: rawnand: qcom: Handle unsupported opcode in qcom_op_cmd_mapping() Date: Sat, 5 Aug 2023 23:11:39 +0530 Message-Id: <20230805174146.57006-4-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104215_575204_A8606DB4 X-CRM114-Status: GOOD ( 15.25 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Handle the scenario where the caller has passed an unsupported opcode to qcom_op_cmd_mapping(). In that case, log the error and return the -EOPNOTSUPP errono. Also, let's propagate this error code all [...] Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Handle the scenario where the caller has passed an unsupported opcode to qcom_op_cmd_mapping(). In that case, log the error and return the -EOPNOTSUPP errono. Also, let's propagate this error code all the way up. This also fixes the following smatch warning: drivers/mtd/nand/raw/qcom_nandc.c:2941 qcom_op_cmd_mapping() error: uninitialized symbol 'ret'. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202308032022.SnXkKyFs-lkp@intel.com/ Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 35 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index be428b80a39b..4957e9253878 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2585,20 +2585,23 @@ static int qcom_op_cmd_mapping(struct qcom_nand_controller *nandc, u8 opcode, q_op->flag = OP_PROGRAM_PAGE; nandc->exec_opwrite = true; break; + default: + dev_err(nandc->dev, "Opcode not supported: %u\n", opcode); + return -EOPNOTSUPP; } return cmd; } /* NAND framework ->exec_op() hooks and related helpers */ -static void qcom_parse_instructions(struct nand_chip *chip, +static int qcom_parse_instructions(struct nand_chip *chip, const struct nand_subop *subop, struct qcom_op *q_op) { struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip); const struct nand_op_instr *instr = NULL; unsigned int op_id; - int i; + int i, ret; for (op_id = 0; op_id < subop->ninstrs; op_id++) { unsigned int offset, naddrs; @@ -2608,7 +2611,11 @@ static void qcom_parse_instructions(struct nand_chip *chip, switch (instr->type) { case NAND_OP_CMD_INSTR: - q_op->cmd_reg = qcom_op_cmd_mapping(nandc, instr->ctx.cmd.opcode, q_op); + ret = qcom_op_cmd_mapping(nandc, instr->ctx.cmd.opcode, q_op); + if (ret < 0) + return ret; + + q_op->cmd_reg = ret; q_op->rdy_delay_ns = instr->delay_ns; break; @@ -2641,6 +2648,8 @@ static void qcom_parse_instructions(struct nand_chip *chip, break; } } + + return 0; } static void qcom_delay_ns(unsigned int ns) @@ -2689,7 +2698,9 @@ static int qcom_read_status_exec(struct nand_chip *chip, host->status = NAND_STATUS_READY | NAND_STATUS_WP; - qcom_parse_instructions(chip, subop, &q_op); + ret = qcom_parse_instructions(chip, subop, &q_op); + if (ret) + return ret; num_cw = nandc->exec_opwrite ? ecc->steps : 1; nandc->exec_opwrite = false; @@ -2749,7 +2760,9 @@ static int qcom_read_id_type_exec(struct nand_chip *chip, const struct nand_subo unsigned int len = 0; int ret; - qcom_parse_instructions(chip, subop, &q_op); + ret = qcom_parse_instructions(chip, subop, &q_op); + if (ret) + return ret; nandc->buf_count = 0; nandc->buf_start = 0; @@ -2797,7 +2810,9 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub struct qcom_op q_op = {}; int ret; - qcom_parse_instructions(chip, subop, &q_op); + ret = qcom_parse_instructions(chip, subop, &q_op); + if (ret) + return ret; if (q_op.flag == OP_PROGRAM_PAGE) goto wait_rdy; @@ -2843,7 +2858,9 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ unsigned int len = 0; int ret; - qcom_parse_instructions(chip, subop, &q_op); + ret = qcom_parse_instructions(chip, subop, &q_op); + if (ret) + return ret; q_op.cmd_reg |= PAGE_ACC | LAST_PAGE; @@ -2937,7 +2954,9 @@ static int qcom_erase_cmd_type_exec(struct nand_chip *chip, const struct nand_su struct qcom_op q_op = {}; int ret; - qcom_parse_instructions(chip, subop, &q_op); + ret = qcom_parse_instructions(chip, subop, &q_op); + if (ret) + return ret; q_op.cmd_reg |= PAGE_ACC | LAST_PAGE; From patchwork Sat Aug 5 17:41:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KTcgeblO; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=RvaRNKwq; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90B4rByz20G4 for ; Sun, 6 Aug 2023 03:42:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3mzbVecYlRl/pY/o8wiokt7nBwhoBkqf4tr3gSGmnz4=; b=KTcgeblO83uLzK eHrauJe8hlpoHjHAcS7GYYh7xURoN3rF/ut8Hk0RgpBX8trNldunJSBhS/SsypeqlsUH4jUOc7RkB VSOW9mnmwQsSlX9u/Z18ISo8jkYnPkCkzfyOmNe5ch73Ztr0VcAk1R6rTVR63s1qsXPQJz3INYdBp 6MLXlic5HRmKXQQWLurD8GDDaqQc2nfDFGPvvra+HC6zjK6srjg4+zwe5TB7YmsZ5K2L2TU7zMCjG lkOgszxczOctIEplscmAIrizFmUVv/AFYXjyvHH8tP52jir/IDIrqTBF3nn+47CYZImBrZQYKw7hr ucVoHfjHAnXSfbSN/hqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIF-00EOwr-29; Sat, 05 Aug 2023 17:42:23 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIC-00EOvB-2H for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:22 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-68783004143so2214782b3a.2 for ; Sat, 05 Aug 2023 10:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257337; x=1691862137; 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=fw1sNygr+6EOLB0Bp4iKWYmwaK5BTcQtXrfXFuq/ooI=; b=RvaRNKwqniSRcehrR0lce9LhJjPEMUynlSdYrqa0l0Stp5DYnvJBYyg5XWgF5xF+09 NCRQTj+LLwGgcnNuaeSKibgV1TC6oesV1KVl0/ZMKD9g1UaDJX8pvnIi5IAkjf05Vm4p RukbhjCgP8zj6IZYmiZYQ5TLsQ2W1Gm4VN5hVWKOOPU9FdzgBQziLCrPmRhQU5gZNtOu 6qpshnoZBT+0w5A/Cw7JgP0RJ15MUojMgQqYgP4r3nCpBscB7FNj/6xz8iH5z8LCgqrF AbRHBjHs7FVep9gQsJUCVe/6LdP6LXna8hY+lV/UN7jeQ12TtZyzczJls80inwqLaRI3 fNlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257337; x=1691862137; 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=fw1sNygr+6EOLB0Bp4iKWYmwaK5BTcQtXrfXFuq/ooI=; b=BsxwxzySpparitH5EtnSRBPol10v3Fi1BgxXRlbZy8A2wLO2+jAXt0d3LiSG6l2KN7 HeThhwXJbInT0I/i6yA2yIwp8+FrkcwYjeIh3pBn4m7+9HT3BWKjPinr6l73vS/B8/48 VLQIGnBH0Jk2IYJcUeUcc9A4XphdPabm6b2rlXUW3zZjBm+WewgJAFw5oFljeW1mbLmy DAK3IiGC5DLH8tpN6c97v4Hj1ahE54Jv8E3en5fQxt8xPCxbRFfMxyH/6J0J5Od3rGjG x+aJ/8Zoe00I//5sxdRZ4a+6MGjf6rusBP3XcpEMUp0Nx2oBBuQycuEl4sIboWsL89GK Z6cg== X-Gm-Message-State: AOJu0YyKVnDmKLOV3uLDIPT0xwzi/T0NmUi54Fj0Joujp7NSUlbFBHat tBBjUCNj0LrEccNYjtop0+W932pcUls06Cfq1g== X-Google-Smtp-Source: AGHT+IF5OInHqRHyGBbYddAN6cm7dEHOkjfzNQKZvIYJ4gy5VyCVJXSOv047XOI0sN9UpTafW2p9+A== X-Received: by 2002:a05:6a00:2d13:b0:67b:f249:35e3 with SMTP id fa19-20020a056a002d1300b0067bf24935e3mr4741963pfb.26.1691257336916; Sat, 05 Aug 2023 10:42:16 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:16 -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 , kernel test robot Subject: [PATCH 04/10] mtd: rawnand: qcom: Fix the opcode check in qcom_check_op() Date: Sat, 5 Aug 2023 23:11:40 +0530 Message-Id: <20230805174146.57006-5-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104220_742897_76C764BB X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: qcom_check_op() function checks for the invalid opcode for the instruction types. Currently, it just returns -ENOTSUPP for all opcodes of NAND_OP_CMD_INSTR type due to the use of "||" operator instead [...] Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org qcom_check_op() function checks for the invalid opcode for the instruction types. Currently, it just returns -ENOTSUPP for all opcodes of NAND_OP_CMD_INSTR type due to the use of "||" operator instead of "&&". Fix it! This also fixes the following smatch warning: drivers/mtd/nand/raw/qcom_nandc.c:3036 qcom_check_op() warn: was && intended here instead of ||? Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202308032022.SnXkKyFs-lkp@intel.com/ Fixes: 89550beb098e ("mtd: rawnand: qcom: Implement exec_op()") Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 4957e9253878..29fcdac932f1 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -3033,12 +3033,12 @@ static int qcom_check_op(struct nand_chip *chip, switch (instr->type) { case NAND_OP_CMD_INSTR: - if (instr->ctx.cmd.opcode != NAND_CMD_RESET || - instr->ctx.cmd.opcode != NAND_CMD_READID || - instr->ctx.cmd.opcode != NAND_CMD_PARAM || - instr->ctx.cmd.opcode != NAND_CMD_ERASE1 || - instr->ctx.cmd.opcode != NAND_CMD_ERASE2 || - instr->ctx.cmd.opcode != NAND_CMD_STATUS || + if (instr->ctx.cmd.opcode != NAND_CMD_RESET && + instr->ctx.cmd.opcode != NAND_CMD_READID && + instr->ctx.cmd.opcode != NAND_CMD_PARAM && + instr->ctx.cmd.opcode != NAND_CMD_ERASE1 && + instr->ctx.cmd.opcode != NAND_CMD_ERASE2 && + instr->ctx.cmd.opcode != NAND_CMD_STATUS && instr->ctx.cmd.opcode != NAND_CMD_PAGEPROG) return -ENOTSUPP; break; From patchwork Sat Aug 5 17:41:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817359 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EZMAVWL1; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=z4YGgwR2; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90D3ltXz1yYl for ; Sun, 6 Aug 2023 03:42:52 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TSG2eLi9KX6qRXdbvpqFBtaM+ZTJLl0NP1jGGO1X3vw=; b=EZMAVWL1wx561j mISEoRQmFKOau7CgLBXAzvjEmku9G3nHmvQDBQz91IRIB6HfHcluIxexpu5EyIE0FjLmwJsUplw63 Ykmn6gGAj89Hp2UA1g/v6gfx5hTW8pd6tdvWl+KbrKifOExUpxWmBVb9xp/fiI90S9TSIkpeTkEp8 BreEY9ukGHeIOPGsKBdFE2Y9KOfi+PDKn0hRB4Qm+Xu0tkkuj8fUqmpMtHIaggM70xv+Ca1Reiyfk c7kqBJi/D3hAcS0AufyyGuhvvUQlcfWvoSaHcJ1ZCM6NSwYIrGvMMNw6FKMVPN4uNec4YCMmWylNZ 8qHWGqBOuwY7rzrVAKYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIH-00EOxd-10; Sat, 05 Aug 2023 17:42:25 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIE-00EOw6-32 for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:24 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-68783004143so2214796b3a.2 for ; Sat, 05 Aug 2023 10:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257340; x=1691862140; 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=6DdQ17i05e7SXOOOl5eag5513m9DyQQ031lLX7RYOeM=; b=z4YGgwR2elh/iFIEMIUuNAj75llc2sReLBB/7yRb9iY10hRhPLGSIKMAOsbKqiruEJ e85zr/jUwZeceCfIFHWnSjwCUynVarvL9gIntTCBoIFNHDNG3jBkfvS5kuXKOkkRLlYc lQX4Zignzpz7MQw2vQs/TjRvy4buMPaSBMCEDzA/iNe60kq3H4nwf36F00sUo4Ia0Moy hNl0DKN8mImdD6VcaBgs8v6ftvL2fz6IkM7C2zySYqRW/cjpzZRqndVbN+QNqgBMKIWu CwKRaJCs6xZEaauXEJoVLEKvQN9IFredPVAFJgHzLGaaZAhLfvyyxaizTUbNx6B0qbCw 6Gng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257340; x=1691862140; 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=6DdQ17i05e7SXOOOl5eag5513m9DyQQ031lLX7RYOeM=; b=fBgTMhwYRGSPI5b34Wr5L/tdUzKwF5nL7yn98pIZdQBc9bWoJuO0pYOkGtLJfayO/1 ai2ia7M7SY61spCgBKWaXeLn6RcieScDH0qHVoU63pnXnkQMZ8SfEk2D4sbJGl0eCCmQ T5PMSMETZk2AUelme5xhvE/mLfuEL2bBk8LQRnPRRP0yjU7les7l6oDdxeSaf9CS6vfs cDTg1908dhlBeO1S6nCqIVsVo6XGsi2sVLmkmJKCydY6ivNZOSqSse/77JvsqvUycwc3 jSZjhQnUmhXDV+bS4nL55HiEfEWLsdW6h3wHJ3B6RfzHdJEuXbG9PW/pjgKalRPww+lD OLMA== X-Gm-Message-State: AOJu0Yxl1eQr/ltQ3HWX7l1b9XUe/Fl4s6C/18aG3TBo/zy/++3CaQma l0X16C95JUSmUPbLvd1VHfPc X-Google-Smtp-Source: AGHT+IFKwnABP3vDMVazc2QTk+cvtQZ8yH68NQhgjQamItU7KcCa/d/HqrT5m1bOe/BPp6jzK4AlmQ== X-Received: by 2002:a05:6a00:2d91:b0:687:29ce:2fa6 with SMTP id fb17-20020a056a002d9100b0068729ce2fa6mr4911550pfb.7.1691257340058; Sat, 05 Aug 2023 10:42:20 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:19 -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 05/10] mtd: rawnand: qcom: Use EOPNOTSUPP instead of ENOTSUPP Date: Sat, 5 Aug 2023 23:11:41 +0530 Message-Id: <20230805174146.57006-6-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104222_974873_B416BFA5 X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Checkpatch complains over the usage of ENOTSUPP for new patches as below: WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP So let's fix the error code which is already present in qcom_check_op(). Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:435 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Checkpatch complains over the usage of ENOTSUPP for new patches as below: WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP So let's fix the error code which is already present in qcom_check_op(). Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 29fcdac932f1..a7a9421ef003 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -3040,7 +3040,7 @@ static int qcom_check_op(struct nand_chip *chip, instr->ctx.cmd.opcode != NAND_CMD_ERASE2 && instr->ctx.cmd.opcode != NAND_CMD_STATUS && instr->ctx.cmd.opcode != NAND_CMD_PAGEPROG) - return -ENOTSUPP; + return -EOPNOTSUPP; break; default: break; From patchwork Sat Aug 5 17:41:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uFJ+p4hv; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=r3e0kB4h; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ9092P4kz1yfV for ; Sun, 6 Aug 2023 03:42:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EQzqp8RqaZVUFFNTYFChjiJaqXcTot4167dYOrMXRUE=; b=uFJ+p4hvLvg5gN ruux8mrwkrVREq4yeMkbRNAGJXh/RiZfEPB0nlKbM9jzrbNbF03eKxW93vjN2fQevh/N25/XWrIMT VeAB/kFEnww/jl9qZWMoRF8DZKX+yq8c3huhCpHdo4rCOo75cQtN40fqA+9dSZVFRZeqBlbfdjB7D brNd+fRyRJ9WR6N7H+5bWWHsP2cnYgFdsJnClRdBA9qweEcJrWo13BRFgaovzsUWT0wrbuGOyCiSD tL4CUm4L2xiHY0F+KrtRn01Un2Xzc7UZNVxlKrYeWao7BqHZqYoaklrj+pjFMMwI7zAPKqJtWaNTY jEK0FS8acdFSdsvKV9Jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLII-00EOya-36; Sat, 05 Aug 2023 17:42:26 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIH-00EOwo-0U for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:26 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-68730bafa6bso2826573b3a.1 for ; Sat, 05 Aug 2023 10:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257343; x=1691862143; 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=1Sk0pPWqBxPd0LZRhqUZVkkGQlVge4WAhNj/aqE/s4Y=; b=r3e0kB4hxBfTtxIB0onMjnTolvvCfOWZ6jFqGifW4WvCZljrocy7UTblzz5SgbZSMV Tsg6Grb5tNsecdh7a3xvki0xfGCzsjstt2awTgo5qChvIy5eZZHhzs3p9ax0WcWC3Tei tgcyE9SjI8JNLSsZz7XZn+YlxNV9B7RczmluWvy6OA5QTxU+XnstbRxTykip1aunBR+w wvO3V5k/mzf7dNLhvllWENRiaYAON41uRSDRlsd3pI4/QUAx8NVDMFoRJUe9M331xiDK WRxJ80B9Pix7WXIMMX/Eh7wTIMNZMUz6ESVIzmjKRIGxflRDWv8dy9e9WDLjaLBsQmj/ CLow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257343; x=1691862143; 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=1Sk0pPWqBxPd0LZRhqUZVkkGQlVge4WAhNj/aqE/s4Y=; b=gHZuLf8OepemQFPlGTzSWQelb4uQhQObPImbSii9RcA4t9RAbl7Lq1hruJoyOQdR7u a2+2YxHMIWr9j2Hxy0Xm41iIGV5Jh9Ki3axRsOJ9Q5qNauaiQOFiCUJf0VQVgeA7Havc nAp/3MIhmUGtKx2VbHKyFGUjrezRGeSzpgn6d7XqBqs2LSug71hfNYc2uXDnPrfecHm+ VM7kamCKzN7UJlc1p9lcmkYwk7C4NIVci55ZfuRFq2ZAzQBwAcMUZQOAXeWIVo6n929z OPaz8m7PsQF5vFYXIDmbiYq21N5zDIrgrO9wSLlnFUMzUTidKpiZIS5ki5A9DqShZ7oQ F4hw== X-Gm-Message-State: AOJu0YzsEQzyuBqSRXRx3nF9I39TOoxJeJ0Tu7KQUEjSZXaFbAhZOxCm 6FiVDK0/JY/U7G0nIjwRd8kh X-Google-Smtp-Source: AGHT+IGfVwqNV2yZu3HBwsINeFiBqSoo6eDBh4XGHw3BY2S/rCtcxHL+55POlo+nJk6aFa9hHqDL5A== X-Received: by 2002:a05:6a20:12c2:b0:12e:caac:f263 with SMTP id v2-20020a056a2012c200b0012ecaacf263mr3443189pzg.20.1691257343130; Sat, 05 Aug 2023 10:42:23 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:22 -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 06/10] mtd: rawnand: qcom: Wrap qcom_nand_exec_op() to 80 columns Date: Sat, 5 Aug 2023 23:11:42 +0530 Message-Id: <20230805174146.57006-7-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104225_187359_DE9F6D09 X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Both the function arguments and the definition could be wrapped to 80 columns to save line space. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:430 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Both the function arguments and the definition could be wrapped to 80 columns to save line space. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index a7a9421ef003..4f38579ae03e 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -3051,14 +3051,12 @@ static int qcom_check_op(struct nand_chip *chip, } static int qcom_nand_exec_op(struct nand_chip *chip, - const struct nand_operation *op, - bool check_only) + const struct nand_operation *op, bool check_only) { if (check_only) return qcom_check_op(chip, op); - return nand_op_parser_exec_op(chip, &qcom_op_parser, - op, check_only); + return nand_op_parser_exec_op(chip, &qcom_op_parser, op, check_only); } static const struct nand_controller_ops qcom_nandc_ops = { From patchwork Sat Aug 5 17:41:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Bp5Vj9NA; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Z0rsGlk9; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90P2R9Jz1yYl for ; Sun, 6 Aug 2023 03:43:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XqIfmNJ1q9CfbHG/swGaBSS8l7OhHWSFUQGbEq7wBt8=; b=Bp5Vj9NAzFGPmt hbee4AA0f6VR90TuaKuZyYDyIVqm9m0JhYvGoua3PXhEktnwWiv6Jq++Ubw5cflhZBaWnSNrxBwMD fvT9LzTmvl3jZBkUrlRKDhnPkdvo/7bi9wozA39IHEIzyHzuZtFbtHyKrg9e3m9E9vHNS91N5FsvC Va5ghoHkLyxp6ZjwRlVd3WvzeW0EYs6ZfW3OJEpsniqaIlQa5xIp9BcDKm+zI8/PixqQC54yy/xe+ vyUuWkROvdaYtE37TbKbVD0hk5fFijs/WE3rbcydmCovm9eXnFuemqW+zXicMQSKGCWZfofiAAgyA MkccTJy5N1MFqoNFxWjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIO-00EP22-1z; Sat, 05 Aug 2023 17:42:32 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIK-00EOyV-2k for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:30 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-686efa1804eso2309055b3a.3 for ; Sat, 05 Aug 2023 10:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257346; x=1691862146; 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=VYFveuajqMNbJCnKR8oO9CBtWwxD9/VCo5pORmPNdlI=; b=Z0rsGlk9CrnX6KVTupzoH16ngQguKUiMLp4IcGcF5qF83R9Sae4ptKVIGeRPYzFddo A4PQYtAEU4Y1mEqmjEEu0i/lUPVSw6Hvl9wDZDVjwoO1Qc7fpEFlUI5zN7gbRDwKtIzO 7UeXU2v9CDUIuXdP6WfMQaV9Adham0dZOHzjBQqr7/Gua9r2byQzkTJE8EA9+Pb7JYt1 uKm4tNjU6zcLt2Wfxh9nJHHoAy4Djy1gVJWbiOpl0CpDYvpBAoJlUlDdjzNmQOFq5xYI XPDX9hZw+LB/CkeVpTF6VWFSb/MUm+S80lupIp9hW+IaRYFGCasX8hi+rCvVffLNUhEo lHwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257346; x=1691862146; 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=VYFveuajqMNbJCnKR8oO9CBtWwxD9/VCo5pORmPNdlI=; b=kjgfW68EP9h/1BxXGKpjxyzaanyFcN3hDF/T+2pAGxN9VbxrajeoFtg3QblewrUgWg f0GO6NbNJNL/N11Owueh76QBXX/hqGJvBt2AASYN8+QBrGzcka6pypVNk1egCSBGKq2b jGWot1os8TXNhzz0FlcDgKIL+0RJagKT1FNn40zlER3z3i3XaCHTdNo+gw0+K48owkqe 0iKKolKrArgf2WTtBxLTtra4roQVCQDXhyHMlveybvJo2sQd+DjfT0duHZMzWJ790ZIt LWIxmz9Oiypo+0ztfGGU1aQ9SUNvSwXadhZIf1tKCIZO0MkK2DI1axW2xNRH2NcM6gYC 4wRQ== X-Gm-Message-State: AOJu0YzzDdY3vDLpnqXMkUGt+eFufilSz9W184bVqf17hpVC4ZSdzhpD FMyjW/yOQQ6N8PtLJokHwBDOppvnlNsuSQNrwA== X-Google-Smtp-Source: AGHT+IHH6+dP6OXMoFZa/czZ291Ny/1pzW1V0k09uiUaTaZbHxnwAlGEXmfTAtBzoULAhQsAFpCDhw== X-Received: by 2002:a05:6a00:1a44:b0:687:404f:4d5a with SMTP id h4-20020a056a001a4400b00687404f4d5amr5179650pfv.13.1691257346243; Sat, 05 Aug 2023 10:42:26 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:25 -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 07/10] mtd: rawnand: qcom: Unmap sg_list and free desc within submic_descs() Date: Sat, 5 Aug 2023 23:11:43 +0530 Message-Id: <20230805174146.57006-8-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104228_886488_4C6A297F X-CRM114-Status: GOOD ( 17.80 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: There are two types of dma descriptors being used in this driver allocated by, prepare_bam_async_desc() and prep_adm_dma_desc() helper functions. These functions map and prepare the descriptors to be [...] Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:434 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org There are two types of dma descriptors being used in this driver allocated by, prepare_bam_async_desc() and prep_adm_dma_desc() helper functions. These functions map and prepare the descriptors to be used for dma transfers. And all the descriptors are submitted inside the submit_descs() function. Once the transfer completion happens, those descriptors should be unmapped and freed as a part of cleanup. Currently, free_descs() function is doing the said cleanup of descriptors. But the callers of submit_descs() are required to call free_descs() in both the success and error cases. Since there are no other transactions need to be done after submit_descs(), let's just move the contents of free_descs() inside submit_descs() itself. This makes sure that the cleanup is handled within the submit_descs() thereby offloading the cleanup part from callers. While at it, let's also rename the return variable from "r" to "ret". Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 65 ++++++++++--------------------- 1 file changed, 20 insertions(+), 45 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 4f38579ae03e..1dbe17dcdb84 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -1306,30 +1306,30 @@ static void config_nand_cw_write(struct nand_chip *chip) /* helpers to submit/free our list of dma descriptors */ static int submit_descs(struct qcom_nand_controller *nandc) { - struct desc_info *desc; + struct desc_info *desc, *n; dma_cookie_t cookie = 0; struct bam_transaction *bam_txn = nandc->bam_txn; - int r; + int ret = 0; if (nandc->props->is_bam) { if (bam_txn->rx_sgl_pos > bam_txn->rx_sgl_start) { - r = prepare_bam_async_desc(nandc, nandc->rx_chan, 0); - if (r) - return r; + ret = prepare_bam_async_desc(nandc, nandc->rx_chan, 0); + if (ret) + goto err_unmap_free_desc; } if (bam_txn->tx_sgl_pos > bam_txn->tx_sgl_start) { - r = prepare_bam_async_desc(nandc, nandc->tx_chan, + ret = prepare_bam_async_desc(nandc, nandc->tx_chan, DMA_PREP_INTERRUPT); - if (r) - return r; + if (ret) + goto err_unmap_free_desc; } if (bam_txn->cmd_sgl_pos > bam_txn->cmd_sgl_start) { - r = prepare_bam_async_desc(nandc, nandc->cmd_chan, + ret = prepare_bam_async_desc(nandc, nandc->cmd_chan, DMA_PREP_CMD); - if (r) - return r; + if (ret) + goto err_unmap_free_desc; } } @@ -1351,19 +1351,17 @@ static int submit_descs(struct qcom_nand_controller *nandc) if (!wait_for_completion_timeout(&bam_txn->txn_done, QPIC_NAND_COMPLETION_TIMEOUT)) - return -ETIMEDOUT; + ret = -ETIMEDOUT; } else { if (dma_sync_wait(nandc->chan, cookie) != DMA_COMPLETE) - return -ETIMEDOUT; + ret = -ETIMEDOUT; } - return 0; -} - -static void free_descs(struct qcom_nand_controller *nandc) -{ - struct desc_info *desc, *n; - +err_unmap_free_desc: + /* + * Unmap the dma sg_list and free the desc allocated by both + * prepare_bam_async_desc() and prep_adm_dma_desc() functions. + */ list_for_each_entry_safe(desc, n, &nandc->desc_list, node) { list_del(&desc->node); @@ -1376,6 +1374,8 @@ static void free_descs(struct qcom_nand_controller *nandc) kfree(desc); } + + return ret; } /* reset the register read buffer for next NAND operation */ @@ -1521,7 +1521,6 @@ qcom_nandc_read_cw_raw(struct mtd_info *mtd, struct nand_chip *chip, read_data_dma(nandc, reg_off, oob_buf + oob_size1, oob_size2, 0); ret = submit_descs(nandc); - free_descs(nandc); if (ret) { dev_err(nandc->dev, "failure to read raw cw %d\n", cw); return ret; @@ -1775,8 +1774,6 @@ static int read_page_ecc(struct qcom_nand_host *host, u8 *data_buf, } ret = submit_descs(nandc); - free_descs(nandc); - if (ret) { dev_err(nandc->dev, "failure to read page/oob\n"); return ret; @@ -1815,8 +1812,6 @@ static int copy_last_cw(struct qcom_nand_host *host, int page) if (ret) dev_err(nandc->dev, "failed to copy last codeword\n"); - free_descs(nandc); - return ret; } @@ -2024,8 +2019,6 @@ static int qcom_nandc_write_page(struct nand_chip *chip, const u8 *buf, if (ret) dev_err(nandc->dev, "failure to write page\n"); - free_descs(nandc); - if (!ret) ret = nand_prog_page_end_op(chip); @@ -2100,8 +2093,6 @@ static int qcom_nandc_write_page_raw(struct nand_chip *chip, if (ret) dev_err(nandc->dev, "failure to write raw page\n"); - free_descs(nandc); - if (!ret) ret = nand_prog_page_end_op(chip); @@ -2149,9 +2140,6 @@ static int qcom_nandc_write_oob(struct nand_chip *chip, int page) config_nand_cw_write(chip); ret = submit_descs(nandc); - - free_descs(nandc); - if (ret) { dev_err(nandc->dev, "failure to write oob\n"); return -EIO; @@ -2228,9 +2216,6 @@ static int qcom_nandc_block_markbad(struct nand_chip *chip, loff_t ofs) config_nand_cw_write(chip); ret = submit_descs(nandc); - - free_descs(nandc); - if (ret) { dev_err(nandc->dev, "failure to update BBM\n"); return -EIO; @@ -2722,10 +2707,8 @@ static int qcom_read_status_exec(struct nand_chip *chip, ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure in submitting status descriptor\n"); - free_descs(nandc); goto err_out; } - free_descs(nandc); nandc_read_buffer_sync(nandc, true); @@ -2787,10 +2770,8 @@ static int qcom_read_id_type_exec(struct nand_chip *chip, const struct nand_subo ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure in submitting read id descriptor\n"); - free_descs(nandc); goto err_out; } - free_descs(nandc); instr = q_op.data_instr; op_id = q_op.data_instr_idx; @@ -2835,10 +2816,8 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure in submitting misc descriptor\n"); - free_descs(nandc); goto err_out; } - free_descs(nandc); wait_rdy: qcom_delay_ns(q_op.rdy_delay_ns); @@ -2932,10 +2911,8 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure in submitting param page descriptor\n"); - free_descs(nandc); goto err_out; } - free_descs(nandc); ret = qcom_wait_rdy_poll(chip, q_op.rdy_timeout_ms); if (ret) @@ -2981,10 +2958,8 @@ static int qcom_erase_cmd_type_exec(struct nand_chip *chip, const struct nand_su ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure in submitting erase descriptor\n"); - free_descs(nandc); goto err_out; } - free_descs(nandc); ret = qcom_wait_rdy_poll(chip, q_op.rdy_timeout_ms); if (ret) From patchwork Sat Aug 5 17:41:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=PNoBeZoL; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UjtG8HGD; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90P2RbJz1yZb for ; Sun, 6 Aug 2023 03:43:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=haXd8/wt4E8LBtQJkFo9TM9nCdy7iZQBmKuP1HmvjCk=; b=PNoBeZoLcp2wE9 iG6VIfXiau4MGPu0za1IBGA3jECIwyxz6OY4W09WSMoNBtpkymr5DA+qLb/xY5GgobQMERx9I/pH+ QNHiujEJNybZX49FKDoFCX8E0s4H5JOHFEyijJ0fGvUaMx7oTkrrwo/ugUzUtVyDfNMus6Bp9rck7 klUuXU+p+NRWfWY02HDL/yTgtFJ/7JhLHmybHJQ8Ztb5YDDbNzHnAowXqjj8cyCcPqV1CQImn+fGc rGR/kR6ec6ngQpKUYe+jVu3zIwznIvmve/wSO7apnFgGLXZHErL1POmxJltpJfuDAA0Xq9HjIA2yc 5x+ZNuWCuXLISWOOjjvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIR-00EP45-10; Sat, 05 Aug 2023 17:42:35 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIO-00EP0O-12 for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:33 +0000 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-68783004143so2214840b3a.2 for ; Sat, 05 Aug 2023 10:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257349; x=1691862149; 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=VzjUVbmqujkXx5jszw63KmEj0mqPrkYgNLPBEumwUM4=; b=UjtG8HGD0HXhbYE6KOMjYvoRrgHtcqD2ZE8722LK6PTedcUT6bAAuZT3T5lZa/0BFq dpRdRzNQV2xMdM2b+6b+GcCfiDZ6u5eMcDb9c1Zuc/Ng3RH3SLGtds/VgBpuZ4HfHyxt KHokfIMsu0H0rfXzPOoDDFVbVxs+V+ke7GyWVrUygP8tu3B+HsJyM6cVo2gxbMgP3Wli ypdb3XWpikZowDgZgaAy5c/UImiho4fNo3gUdTiqDDJwF1a67JSsrBJ+dM6M40sxaZv0 otPqs4LjwZvCsIHBKI59i3308tE/Q2IfLhO0XhkJSFtZ1npPdl466eg2XEpsx0lh9jJl gP5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257349; x=1691862149; 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=VzjUVbmqujkXx5jszw63KmEj0mqPrkYgNLPBEumwUM4=; b=YCJZbj0Mg4G92a8VxuPKuOmyZX4xpX3s23IgFDur1kfsYF0om6r0geYJIgEQOaRS2q TvOg+5hp8lH8yuBqOlWKQHvLOaFpm1A2yJfuaRHzh8QjewU/T2aAXkqdkG714hL3dlI9 r4KnGtPkuo1X1abJJMlo4+2P2ZBN8CAnlj4fBIpMEhp7Y0G29/vdoepiHCRdN/r7kcvP oS4+BJ5e1T55V/Kgv5OfNmFM0xCMIfOAWjYkuEDHI+MDPv8g9Pn7rVRg3AcAw+YPuhZf IsiFQycpFy2Ml5M3DJreSEABbNKVaNrT1nTK2ml3VZkKxHHKQleROvV169umSH3UNUNd EAhw== X-Gm-Message-State: AOJu0YyiSW5uuZ32F9SE+MHpR8HQrmkl1e6bc7WPYGEJCGn3A0PtiQ18 dyQTbdPS9XHABur2l6P5pgzI X-Google-Smtp-Source: AGHT+IHeVbzFK1nWPZK6UOOQ+nXvClEVy5meGh11RDFEADwwp55gDn+bwJzz5DYrUJzfXoFc5uD6IA== X-Received: by 2002:a05:6a00:114d:b0:687:3bc2:58de with SMTP id b13-20020a056a00114d00b006873bc258demr4086067pfm.6.1691257349344; Sat, 05 Aug 2023 10:42:29 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:29 -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 08/10] mtd: rawnand: qcom: Simplify the call to nand_prog_page_end_op() Date: Sat, 5 Aug 2023 23:11:44 +0530 Message-Id: <20230805174146.57006-9-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104232_354582_C8837BC2 X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Now that the dma desc cleanup is moved inside submit_descs(), let's simplify the call to nand_prog_page_end_op() inside qcom_nandc_write_page() and qcom_nandc_write_page_raw() to match other functions [...] Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:429 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Now that the dma desc cleanup is moved inside submit_descs(), let's simplify the call to nand_prog_page_end_op() inside qcom_nandc_write_page() and qcom_nandc_write_page_raw() to match other functions. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 1dbe17dcdb84..6b81781aa3ad 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2016,13 +2016,12 @@ static int qcom_nandc_write_page(struct nand_chip *chip, const u8 *buf, } ret = submit_descs(nandc); - if (ret) + if (ret) { dev_err(nandc->dev, "failure to write page\n"); + return ret; + } - if (!ret) - ret = nand_prog_page_end_op(chip); - - return ret; + return nand_prog_page_end_op(chip); } /* implements ecc->write_page_raw() */ @@ -2090,13 +2089,12 @@ static int qcom_nandc_write_page_raw(struct nand_chip *chip, } ret = submit_descs(nandc); - if (ret) + if (ret) { dev_err(nandc->dev, "failure to write raw page\n"); + return ret; + } - if (!ret) - ret = nand_prog_page_end_op(chip); - - return ret; + return nand_prog_page_end_op(chip); } /* From patchwork Sat Aug 5 17:41:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=qroRYG7I; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=B7+DzBY2; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90S70mFz1ydh for ; Sun, 6 Aug 2023 03:43:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5m+kdlQXQIvYJGZcIk+S6OrSACdBsdfRoQa7Gouq1mg=; b=qroRYG7IJ4EMIM GEt+FdXE1y3Wbn1jK2LDvzU4buvWzayUi4V1oOxZry3TY9snoB2Bho0qoSpC9W3JX9nBTQOqTtj8z wIB/hVnnq8xjbKhXcH3lvTpgZ1spvTvkQJ5jhzWr8vKQ9jpddmCohGEozKdhM6qUDarqbv2cf+vsn pIEYSRQhbtd3vBqOjEYBWdfme9nqRDccLzuHO675CV4YqjYOrDyD9JhBVfcWK5j/ljUMux0Y5EU7d /NbAG3SV8ZcPE3sfcdr6l7Sz0nCY/JCEafXFJaQoSlLTibahPSe0DbBCyYWLSHzoaKCqgmCwQrr8S ZX0UrKYYUHmA5rd0TwKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIW-00EP7p-1j; Sat, 05 Aug 2023 17:42:40 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIR-00EP2B-1H for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:39 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-686e29b058cso2247338b3a.1 for ; Sat, 05 Aug 2023 10:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257352; x=1691862152; 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=QJ7ZrjoLTJ5efHJXOrPgGJNKRMjipI8+wvO528txH4s=; b=B7+DzBY2BMwN0TLLydmymYkwIsWR3JxW+iSLL/V0XXHiIcE3NOr18Mx0HwbSsKBhWO iSMn8u1sw5GfUeTPmKYFpey/hPwsfNH6CjWl5ihSCT5no007WqjK5pReXK+gZlb0WAY0 KWbAiyuDbbu8HgDPCO7iP2Xtsrb4JM+LVllxFOk18UAS3QLkqjL99MFkl5burHWLq8Ir dd9XoQiNvoT4dchGITvTV03HB+KUPoGQOEGX1HBN8XR6LVkZ2PfQZpG5jXn0Bh5ciSIk BBuCkn1sWiwt9otxwf0K5C3sJ9ddgPDJt6mLgXI8STYQ1qbePkvSExEqvAz2MaeMIxs1 Mrkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257352; x=1691862152; 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=QJ7ZrjoLTJ5efHJXOrPgGJNKRMjipI8+wvO528txH4s=; b=WxiYGJOCz8xaxVkbV0E0l8UNiC8H90Hyrmi+vPmdPG5jB7+fz29i9esbrrDG6y1pd5 VmeNPbxCD8AiogOu0+zboDfdDC+3PJu6ccysg0mQIsY32dRrr8J8FhusXXzg40YVuSHb yXIeA9xKc05RG9q3IFS2XAsKQ1F8x4qc5WwogkappWgBCP5uLaCPuIMnjYr/cLRB8Nam 1rYNfWB5dSYGnjgj0ctZ9Gdkc/BOR5dXk7tPsk8IxZ02R6vz/qZWN3oPN/QQn8ZXzfFP m0Xm/301e7bLf9tNEEm0R5xf2/z6ALQweWXaJk9TJ2QBqdaeHFae5mQLDuxtosNGHLCt 0j0A== X-Gm-Message-State: AOJu0YwDXX7eMSVBeUKoowTU7z2xHDXZ+cyJ47T9KssUbh67o2Pvzs9Q f5fcUdOmzNt4PB5Xpuax8ZIS X-Google-Smtp-Source: AGHT+IFm4QL3fDeb80cVEsePvUuRS1mI1D46MeBn/d5FvxO7kyVdAKVt/ZJPShAB9Yhp4SDJY8pR7w== X-Received: by 2002:a05:6a00:814:b0:687:78fc:e961 with SMTP id m20-20020a056a00081400b0068778fce961mr5558898pfk.22.1691257352461; Sat, 05 Aug 2023 10:42:32 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:32 -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 09/10] mtd: rawnand: qcom: Do not override the error no of submit_descs() Date: Sat, 5 Aug 2023 23:11:45 +0530 Message-Id: <20230805174146.57006-10-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104235_445771_85A2AD1E X-CRM114-Status: GOOD ( 10.99 ) X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Just use the error no returned by submit_descs() instead of overriding it with -EIO. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Just use the error no returned by submit_descs() instead of overriding it with -EIO. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 6b81781aa3ad..0fbc6d1a558c 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2140,7 +2140,7 @@ static int qcom_nandc_write_oob(struct nand_chip *chip, int page) ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure to write oob\n"); - return -EIO; + return ret; } return nand_prog_page_end_op(chip); @@ -2216,7 +2216,7 @@ static int qcom_nandc_block_markbad(struct nand_chip *chip, loff_t ofs) ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure to update BBM\n"); - return -EIO; + return ret; } return nand_prog_page_end_op(chip); From patchwork Sat Aug 5 17:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 1817364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WM89qSo3; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kAh3rzHl; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RJ90X6LZXz1yYl for ; Sun, 6 Aug 2023 03:43:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iB7DXlOsyGuOlOHiE8xzoMBxFl/rPKRSSSYUnJYY4Qc=; b=WM89qSo3qMlcoM OY+6G+QrfhB04XiNjWUgApC9pGJazxmnCfzA3pnb73PPkY9bg0s8fMqSRfhFTTqPZockPTLtJUkeo Ivutmnds6tNBs5PrrTkYhg+sDiuNGEItWZBV8rokhYyI5jnhoINTRNtbdfAA00dXBVd6TnUU84LiJ ZLPuLRlwkBWGlqXcAQ9Q0a+fqrbaQgKGg/OdLbyI/eD/JHNnsO3xo4Cs44e5YuL2qUnE6ggpaQ9Ds ObFXVQbkVwwFL+zWr9upDU1AVbCox9wjjKGF6g2GxaU1rcadzBXsxbILff50exKbb0TXclRLf71gW YYZa3yAUf/Mkm1O20hOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIa-00EPAf-38; Sat, 05 Aug 2023 17:42:44 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSLIU-00EP53-0X for linux-mtd@lists.infradead.org; Sat, 05 Aug 2023 17:42:43 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-564ca521549so870083a12.1 for ; Sat, 05 Aug 2023 10:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691257355; x=1691862155; 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=HN0f2LOKeZ6eEoWkB3wmreNy3AFR6iUd1H9kbvp/ehA=; b=kAh3rzHl75lVGO7PZrVPAypy0Oexu0VKTje94TlCGbSduQ+Man2JdW9EbqXb7oNuJD Uc3fItb3E9yDaFi0dayjguINssLDunrCXo2we89n4zjze6JekLxTQhV2RiiZZ+gDv7lX /c0EDF4xL8NMKtp69j9pc0+k17hR3sHwo3tzmrcK4/yyJHT7B669scqmRJYcsENqdLrv 0ecYm0IuWiMAFg3OZFHOn+GLL+ovcplRgWCNezFF2UiiKENlKru/EskP01YIqKX2lLXt nbrTaCNxB5UZnoGRuDcowQQQZ9NKJyqpMoFbO/B8sWhj7cu4zeeNdHMISM4JObt+soxW MSPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691257355; x=1691862155; 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=HN0f2LOKeZ6eEoWkB3wmreNy3AFR6iUd1H9kbvp/ehA=; b=PxMsm6Txe+iI0njRe8ukkNyypaihnBOg6aFeoOOmGKXCsrxoIKIOCatfT+G39A3/+7 S6yh/bTvd6Zzo2q5OLnb26IBNJFxyZL3uLZMizv8qdvSN+J/1qR31GiwOe00KJp10qef roVFXweWaRuwhCdWzzgVwjHurt6wdRG8b2Po1EID4w1cnWGbdiEwb+Yy57emouS+CG9I aggrZp+G7Rgao8qtSPaPR0HylUu6uou6N9QsrX688/5hf08R9DVcwAdAJcrfGoc8N19h tF/a37K6nP9/c4LMhGdLekheMgsTQfigpsmRHIZu2r9QLm7jicJcdHMMU5RC4Qa0cfBW QMUQ== X-Gm-Message-State: AOJu0YxiwgjwDsH9TE+9Yu/Nwc8mGE/GdxtakcGkwfZcRvU/OnAzsIPX PAXkvmWq2r25addm7vC4LQIb X-Google-Smtp-Source: AGHT+IFjBXPzDhGC+YxAaUnKhYgvfBaOEAF4Hp9xdEsX8uxBumlNIYcVEzsjcorJg843xxFN9GBbUA== X-Received: by 2002:a05:6a21:789a:b0:133:7276:324b with SMTP id bf26-20020a056a21789a00b001337276324bmr6489967pzc.23.1691257355606; Sat, 05 Aug 2023 10:42:35 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 10:42:35 -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 10/10] mtd: rawnand: qcom: Sort includes alphabetically Date: Sat, 5 Aug 2023 23:11:46 +0530 Message-Id: <20230805174146.57006-11-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_104238_220696_8B47936F X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Sort includes in alphabetical order. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Content analysis details: (2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.6 RCVD_IN_SBL RBL: Received via a relay in Spamhaus SBL [103.28.246.21 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:52a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Sort includes in alphabetical order. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 0fbc6d1a558c..d4ba0d04c970 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2,19 +2,19 @@ /* * Copyright (c) 2016, The Linux Foundation. All rights reserved. */ -#include -#include -#include #include -#include -#include +#include +#include #include +#include +#include +#include #include -#include #include +#include #include -#include -#include +#include +#include /* NANDc reg offsets */ #define NAND_FLASH_CMD 0x00