From patchwork Wed Nov 8 09:43:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1861418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=GCEmqarr; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Qxnkrg+6; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SQKsc1lLfz1yRL for ; Wed, 8 Nov 2023 20:43:48 +1100 (AEDT) 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:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lilvUH2DflOpxw0J341vezK1vO65mGmerUx4jqLsDNg=; b=GCEmqarrVmxlTx fyOlqd5XICp1nfALFIVgMlBZJGZxBu9iMk+EpCGgYa8Sk7vZ5zseMNUot4JAEaFTgOoSeBvLmj+5S kpZPhQFcTfsP3g4hv6DVfe95QxEDGun82+Mh0ouMxAAd+BoTjPLVBO7IhpDSUmmH5ZB2grAnfD/8G E/xwRIKmxoIyercichGnX+T4iovXjRDihz+xfP1oU/bvbhGBWKv+DgqVNtaY4yQ2f6Vdc3Ubs98XI yD065kz3f64MIdgXYxOaM7JK3QsBYmcquOvH8ZkJAT9E70dLzyD4JUq+ovG8waOmohkXRU8mrH6kO LUrWNDKPKVebPBwOdtyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0f5c-003Nk4-0L; Wed, 08 Nov 2023 09:43:12 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0f5X-003Niy-2D for linux-mtd@lists.infradead.org; Wed, 08 Nov 2023 09:43:09 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507e85ebf50so8301144e87.1 for ; Wed, 08 Nov 2023 01:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699436585; x=1700041385; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=NNgNeA+u/JG3dEDGHsCnM23bBRNPsNNIJ7v/48PUAqU=; b=Qxnkrg+6qjvlhN48I4ZLq7vbsxObB7iOzh4Te3ffx3xDCIpXAkobJSN5C5CCb7al0I YyiIE1197gERWDJK7EiJk7i40iYh2f1dKTsbsxVQs8SufJ53jV0hnZ/naz1V3pOjo/gd 9tX39wVnwEkyU2dEfgrVR6IzqiJnghV1quKxDFCLO107UgZ2jlg3Eu5i9Z+Jzv+n8d0z +uCIFgirPyo6w4VLWG4zNydoYbBLSFWe0lVE5/N9d16qBd8pbMOjkHOl1MiBRTZONVse hR4cLo0MxfPLSuCpAQAuXsWH6q3DMsNTh/yXc6ns6eaNg49zd1Vb9FG4GFrK8MLUz6re 9fAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699436585; x=1700041385; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NNgNeA+u/JG3dEDGHsCnM23bBRNPsNNIJ7v/48PUAqU=; b=rA+Ari6ts5DecUpUPdm7zJEPEKKpCwCNemItbyvYjbvS5Yy9gUAiNxYf3ndNBmJuG0 ql+q09ckbVQFvG58sGgvPVUr+hgJjLNcXi4Ie9JIj0teF6Th+/atr6DVjec3GgqZ/f8k jWsdpqsJz9CSc/B7RohiCBQsdDx3zoWP2UiELpKRStTwdrfXWvtA/Oehe5s0Y42iOrC+ m0VVM/vBx2mjdMnMLi6CHaZnvLpswyH6EfV/utskwqtDOOP1t5fOkLTU0yjabJoN0+nE tt58EInb2VmZBU6+GYK3OgAOy9Ozm3UZUVmA7CfZGpyGjja0l3DQ3UtUoG3GrfU7GxFO NJdw== X-Gm-Message-State: AOJu0YwxLHYAwJQ+ykeGB3YoSoyNS2HLJxzv+0MtewhrbbK7smvMObVy SPerJ+xGTpwr69DDwNMdcSA= X-Google-Smtp-Source: AGHT+IFRUyOnJMY5kv/BmZ5a7xXVG9PzwlcBzcVJUddNpWTxLnFR2m9649vH9tJ19JapgSjvwUH32g== X-Received: by 2002:ac2:5edb:0:b0:4f8:77db:1d9e with SMTP id d27-20020ac25edb000000b004f877db1d9emr823229lfq.12.1699436585110; Wed, 08 Nov 2023 01:43:05 -0800 (PST) Received: from localhost ([195.13.248.78]) by smtp.gmail.com with ESMTPSA id u3-20020a05651206c300b00501c51ab085sm622510lff.60.2023.11.08.01.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 01:43:04 -0800 (PST) From: AceLan Kao To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Dhruva Gole , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/2] spi: Replace -ENOTSUPP with -EOPNOTSUPP in op checking Date: Wed, 8 Nov 2023 17:43:02 +0800 Message-Id: <20231108094303.46303-1-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_014307_723922_79FE3A2E X-CRM114-Status: GOOD ( 17.15 ) X-Spam-Score: 0.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: From: "Chia-Lin Kao (AceLan)" No functional changes are introduced by this patch; it's a code cleanup to use the correct error code. Signed-off-by: Chia-Lin Kao (AceLan) Content analysis details: (0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:133 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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [acelan[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -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 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 From: "Chia-Lin Kao (AceLan)" No functional changes are introduced by this patch; it's a code cleanup to use the correct error code. Signed-off-by: Chia-Lin Kao (AceLan) --- v5. distinguish -EOPNOTSUPP from -ENOTSUPP --- drivers/mtd/nand/spi/core.c | 2 +- drivers/spi/atmel-quadspi.c | 2 +- drivers/spi/spi-ath79.c | 2 +- drivers/spi/spi-bcm-qspi.c | 2 +- drivers/spi/spi-mem.c | 6 +++--- drivers/spi/spi-npcm-fiu.c | 2 +- drivers/spi/spi-ti-qspi.c | 4 ++-- drivers/spi/spi-wpcm-fiu.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 393ff37f0d23..d1df5cd401cf 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -973,7 +973,7 @@ static int spinand_manufacturer_match(struct spinand_device *spinand, spinand->manufacturer = manufacturer; return 0; } - return -ENOTSUPP; + return -EOPNOTSUPP; } static int spinand_id_detect(struct spinand_device *spinand) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 3d1252566134..370c4d1572ed 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -272,7 +272,7 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op) if (atmel_qspi_is_compatible(op, &atmel_qspi_modes[i])) return i; - return -ENOTSUPP; + return -EOPNOTSUPP; } static bool atmel_qspi_supports_op(struct spi_mem *mem, diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index c9f1d1e1dcf7..b7ada981464a 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c @@ -146,7 +146,7 @@ static int ath79_exec_mem_op(struct spi_mem *mem, /* Only use for fast-read op. */ if (op->cmd.opcode != 0x0b || op->data.dir != SPI_MEM_DATA_IN || op->addr.nbytes != 3 || op->dummy.nbytes != 1) - return -ENOTSUPP; + return -EOPNOTSUPP; /* disable GPIO mode */ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index ef08fcac2f6d..d96222e6d7d2 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -1199,7 +1199,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem, if (!op->data.nbytes || !op->addr.nbytes || op->addr.nbytes > 4 || op->data.dir != SPI_MEM_DATA_IN) - return -ENOTSUPP; + return -EOPNOTSUPP; buf = op->data.buf.in; addr = op->addr.val; diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c index edd7430d4c05..2dc8ceb85374 100644 --- a/drivers/spi/spi-mem.c +++ b/drivers/spi/spi-mem.c @@ -323,7 +323,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) return ret; if (!spi_mem_internal_supports_op(mem, op)) - return -ENOTSUPP; + return -EOPNOTSUPP; if (ctlr->mem_ops && ctlr->mem_ops->exec_op && !spi_get_csgpiod(mem->spi, 0)) { ret = spi_mem_access_start(mem); @@ -339,7 +339,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) * read path) and expect the core to use the regular SPI * interface in other cases. */ - if (!ret || ret != -ENOTSUPP) + if (!ret || ret != -ENOTSUPP || ret != -EOPNOTSUPP) return ret; } @@ -559,7 +559,7 @@ spi_mem_dirmap_create(struct spi_mem *mem, if (ret) { desc->nodirmap = true; if (!spi_mem_supports_op(desc->mem, &desc->info.op_tmpl)) - ret = -ENOTSUPP; + ret = -EOPNOTSUPP; else ret = 0; } diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index 03db9f016a11..f3bb8bbc192f 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -556,7 +556,7 @@ static int npcm_fiu_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) op->data.nbytes); if (fiu->spix_mode || op->addr.nbytes > 4) - return -ENOTSUPP; + return -EOPNOTSUPP; if (fiu->clkrate != chip->clkrate) { ret = clk_set_rate(fiu->clk, chip->clkrate); diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 4c81516b67db..0877dc5058a1 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -613,12 +613,12 @@ static int ti_qspi_exec_mem_op(struct spi_mem *mem, /* Only optimize read path. */ if (!op->data.nbytes || op->data.dir != SPI_MEM_DATA_IN || !op->addr.nbytes || op->addr.nbytes > 4) - return -ENOTSUPP; + return -EOPNOTSUPP; /* Address exceeds MMIO window size, fall back to regular mode. */ from = op->addr.val; if (from + op->data.nbytes > qspi->mmap_size) - return -ENOTSUPP; + return -EOPNOTSUPP; mutex_lock(&qspi->list_lock); diff --git a/drivers/spi/spi-wpcm-fiu.c b/drivers/spi/spi-wpcm-fiu.c index 852ffe013d32..d76f7b5a9b97 100644 --- a/drivers/spi/spi-wpcm-fiu.c +++ b/drivers/spi/spi-wpcm-fiu.c @@ -361,7 +361,7 @@ static int wpcm_fiu_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) wpcm_fiu_stall_host(fiu, false); - return -ENOTSUPP; + return -EOPNOTSUPP; } static int wpcm_fiu_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op) From patchwork Wed Nov 8 09:43:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1861419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=lEJEZfnB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VjLfV+/E; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SQKsc1jWyz1yQK for ; Wed, 8 Nov 2023 20:43:48 +1100 (AEDT) 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:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RnEXPvoZISyRIToFb0EBWypzBJ8wWz3bYVZun5ZFUSw=; b=lEJEZfnBW1n2Ap 0bSmg9tZ6/wHCuwX8rTd/R45bMhILhLxGCFd2Werxy7kEFYz1ZEQgDWftX8vrcsXg2O0Yw3qLTJhM q4+GqZLsZjW1AZyoRKosFi1socjvxWzFdBCGAiZ626QySvSC8+jeLq3ivv9qNrHQ80st1I0mlLBul hljroz761ptExpvtw40FRTTPW/n3HtnHAvHlnPAMeVv3TrOne3ZRXCmpebhQ+zj1YgBhMCYkACl3B bnGzlIwfSXDFep8SJHFiMwekqD1nskGcMwaSh+ZMJZn9vt1bZU/LDlO/chXTYX+/XKRss2ctOv62N iUhEJQjXkPVnMnFXPxHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0f5e-003NmT-2K; Wed, 08 Nov 2023 09:43:14 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0f5b-003Nj7-29 for linux-mtd@lists.infradead.org; Wed, 08 Nov 2023 09:43:12 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5079f9675c6so9024174e87.2 for ; Wed, 08 Nov 2023 01:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699436587; x=1700041387; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=iTdWMQca1C4HNDwcm5hUdGGDITp+wUmav3/Udbm5/KI=; b=VjLfV+/E9OMGLfdvQQ4WrGAW7KVR0m6vXQHlgnQZiePx11zM1gaZjUIC9UZnOAaJYd 7FEqlKABjs0fQtVdbzJDXG0YjJhlp6S6n28sjqQrwqu2MQmvn31EgrPpCQc5D6aKobpJ lSqgZmwU90msRIL3CNHAK7WTt+0TBw74PSff97BL/YFEJlkFQaoV8ZySsZtqxcKZtgy2 wGla4PITbRiZAw/5s1Zjxs/FwEBC26GhTE+sqmAkuspiKZzsIxq3792FOe6ZgAZsZOg6 jnal2+HBSvZJBxIgCKnMk/GiQclCNj8cbV4CWxj+qhTp+Cv9wzz67DO6Fwa3LrVYaKhe AvnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699436587; x=1700041387; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iTdWMQca1C4HNDwcm5hUdGGDITp+wUmav3/Udbm5/KI=; b=b/uPHy/+BOKtTq1pHGDqNvW7Xd8/AFNp4ueBc5Mde4FHG4v7r0w+UN0vMbUns3iIyu xJ4cvYZslsudIy303CCXbPGlp8fQPB5RVByl7zApIxPmJJmW68BwCGYT2IqToX7l+BuH 0iDxzSZnPliUS4CXuLiypbDBI86TJHXgtsYq8WdtB3Uath9AbKMvaABc73H674MuKNpR DZinACYaq85xf47SC4AID/RW48y5ZZZrBKUHaT01KB0rk0QWSRQuNvWi/1V0kF1k6co7 EqKaocf+VWCaAcZZthfagG1NYVyowlFte6nRSAraXA8zaapRiRaJeUvC44SActHaOIB5 fQ5Q== X-Gm-Message-State: AOJu0YxMYi2mgOkm1oH/vI13rGwQULZO6kRDijSW+6eCRRN9hJGtBXKP woCkUVBZYOjAUhinDBBrYJA= X-Google-Smtp-Source: AGHT+IGN2eNKB4yscUruMipZNeY2T5Lza6kfYIJcO34HkG89KBnnQO6rwioTsWDSLIeoKAO8YxOUNQ== X-Received: by 2002:a05:6512:6d3:b0:4f3:9136:9cd0 with SMTP id u19-20020a05651206d300b004f391369cd0mr967668lff.44.1699436586681; Wed, 08 Nov 2023 01:43:06 -0800 (PST) Received: from localhost ([195.13.248.78]) by smtp.gmail.com with ESMTPSA id x14-20020ac259ce000000b005091492ac3fsm621470lfn.175.2023.11.08.01.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 01:43:05 -0800 (PST) From: AceLan Kao To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Dhruva Gole , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported Date: Wed, 8 Nov 2023 17:43:03 +0800 Message-Id: <20231108094303.46303-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231108094303.46303-1-acelan.kao@canonical.com> References: <20231108094303.46303-1-acelan.kao@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_014311_705763_BEBF04B2 X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: 0.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: From: "Chia-Lin Kao (AceLan)" When the software reset command isn't supported, we now stop reporting the warning message to avoid unnecessary warnings and potential confusion. Content analysis details: (0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:136 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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [acelan[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -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 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 From: "Chia-Lin Kao (AceLan)" When the software reset command isn't supported, we now stop reporting the warning message to avoid unnecessary warnings and potential confusion. Reviewed-by: Dhruva Gole Signed-off-by: Chia-Lin Kao (AceLan) Reviewed-by: Michael Walle Reviewed-by: Mika Westerberg Acked-by: Pratyush Yadav --- v2. only lower the priority for the not supported failure v3. replace ENOTSUPP with EOPNOTSUPP and check the first command only v4. move the version information below the '---' line v5. remove dev_warn if soft reset operation is not supported --- drivers/mtd/spi-nor/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 1b0c6770c14e..75bac1418045 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -3252,7 +3252,8 @@ static void spi_nor_soft_reset(struct spi_nor *nor) ret = spi_mem_exec_op(nor->spimem, &op); if (ret) { - dev_warn(nor->dev, "Software reset failed: %d\n", ret); + if (ret != -EOPNOTSUPP) + dev_warn(nor->dev, "Software reset failed: %d\n", ret); return; }