From patchwork Thu Mar 17 11:43:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 552256 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp1097421mag; Thu, 17 Mar 2022 04:44:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzswzMjPoZUcb/t1mo53h9EwrXlLaLVxsCorqEZ8uuwLkQ1d14hlC2AMrO/Zy9Rfw3mz2Mb X-Received: by 2002:a4a:e828:0:b0:320:a1e9:3e1 with SMTP id d8-20020a4ae828000000b00320a1e903e1mr1197496ood.68.1647517455277; Thu, 17 Mar 2022 04:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647517455; cv=none; d=google.com; s=arc-20160816; b=WNCLI0OXOT67O7fTjkCjuiZr10NqC7p2EQm5fAzk+Yhch55WDBC75uYuO1E6mDlVmq VBEfQBXx5/Hch0DzQKpHi3tY/bRXfTY/aycExDHrZPcU1yLVfe64JyoYBw/G2qHRquur qfNP5e9BG4LwGFoDo9oMJSDJy7Pu9I1JdPebGnAh8oET5jrKFLjt0AqIhEomP7OHBugF ieB8NVNW+uJYfUmTDNu7EzB9UnNWFln9lYccWoTpjOg9kt7uOAGCjXCQSUg0qcrWmqiy nI/QDeNX2Flylj01hsl3eUwFeNI2BiHYbyPGIrhOasy7scANPEc5fuiLPK8e/8vj1nnn UyfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature; bh=IWxpf7xCCqFqef3FgWzjMRWfD2w2wSsOdFeqltDEbW4=; b=AYs8Aske/WlbLHP55cvKkyeKAXGJl5kGbhQMZ1hKwOeEPzaVVF3OkK5yM9GHO+2EJO 9uYVDUIqMH9OncoJY3DHX7BCo2QHgTI8Z7n3q0sTiFP5jcRw3t59MBBMup+iNb/1OCku dyZ5Qs65u6BDpVYhfPIhg2ICHvxf4HuNwlWOjjk0IiPyiwErOfABVusbqUO1H3YIIZmE flPmp5aRHdSaFqb4xMi299Io4vxRqLi9HRUoAvE9OQAFSVv70R0btXRITvAkF0bKhC7/ KFG2+LwWXVwR36T8vCADM1joi0yU+RdX5GlsOCWCf/nwIUA9ng1DrsVNljZ5DhAfk78y qQow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=aFPTjhhT; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=YIIu8Y2N; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id n2-20020a056870240200b000da716e61e7si726865oap.112.2022.03.17.04.44.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 04:44:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=aFPTjhhT; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=YIIu8Y2N; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IWxpf7xCCqFqef3FgWzjMRWfD2w2wSsOdFeqltDEbW4=; b=aFPTjhhTQFSIMh bFrL0zjklQ/iLLwLisfzBGlzQmX0DHZP9FY4DM/NzgJNWAgGsEgoWusgJD6sD7VYReQqrFGuej5HB 6Cso8/ftXKt7ZeEd4CstbL+2tQShvnHtpSyDdEfpJV9NwRxUKeYHrth+CwV4JYnuN6iDC8oBmT9Kn xTax/OELHQ0gmabLV5eqHJRL4jl5FOxQOIniyuxSQTyGG9ZO2hDUEyEF4M33RSs9DJ29EqnT0d/gf g51GH3Ykxq0qs2UbKruQCCMC1Hmxt48T7CcvAZYe4JE8hfphMd+AmbaHWPNeCksdyW1UcSNt3J8S3 WrNPJwJiPrV+iGfWEgOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUoXP-00FqYu-6E; Thu, 17 Mar 2022 11:43:27 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUoXM-00FqYJ-Fa for linux-mtd@lists.infradead.org; Thu, 17 Mar 2022 11:43:25 +0000 Received: by mail-lf1-x12c.google.com with SMTP id s25so8501717lfs.10 for ; Thu, 17 Mar 2022 04:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kOLCmK3+zo8AxaRS7/lRqltwPNipcf9iVgMPvtIqyFM=; b=YIIu8Y2N+FMspBVRt/UNQMqyRgcNTDoasJbbKRX7WJ7JQZEvOn75eXUN54b4wazjUQ BSF46T3Yzu+bbyqKIGPNy8r5LqJ/AWTUasBz7WWH/dhNslnWEkvXTyKHalQbfLlQQxVy KLlfjBsfw+LtCn7FjiaPuTnxacPG8OWrblz11VO6kwP+e20fzglNyqsGbOn3ketKlWl8 N47F0vPW2Gnb4DGLS0jg2EqaKTmvN757u++q5IX9NWfdY515xZ+1Bmrrgq7zeLbjbiNu dM59vLmDxOrhhx9Fp/hgwxvzpgwrd7DqgurELJFBAKamgaoGCSK++JcBM21UIqfv29SG pthw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kOLCmK3+zo8AxaRS7/lRqltwPNipcf9iVgMPvtIqyFM=; b=cR5DnalZ/NX9ODaYuH1sVV0KEBSBRu6tIc/ilm1c1W+S7Cwzk7zdrkLhadwuc7UsHV 6cw+Rq/q9rvt3GXTK/xLNET0tTaosxjho5uS/Ck7bb+IyrkonwYcTcuzEIYUN5sCxd7P 59F/KMCcHyWwgJA1q7Z0q3NXr0EPg0vIDl4p+TCVVJdrprILfACEwgIOYQD5QihMLYJJ nc1Z9s0KaRX0AZF0p8huDRarURjmpRd0avRGfIRL2QHz2d5DBliykB19e4SwxPNrrd// vP0mrUED9UvZbvwswBMLEKi54gh3nZl26yqlm5d5ykNKdpx3JszRDYlxqf2y0Mt1z9N6 B5Ng== X-Gm-Message-State: AOAM532fcIwi0yUclCHShGcCfNXYjMQvE2+fZky13U9eor8GHg0imEn+ 1SdafvQeZMLPKqIq1zMr6L8= X-Received: by 2002:a05:6512:3f21:b0:448:2f20:586f with SMTP id y33-20020a0565123f2100b004482f20586fmr2771970lfa.431.1647517401969; Thu, 17 Mar 2022 04:43:21 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id v17-20020a2ea451000000b00247e30b50dfsm403100ljn.107.2022.03.17.04.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 04:43:21 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] mtd: parsers: bcm47xxpart: print correct offset on read error Date: Thu, 17 Mar 2022 12:43:16 +0100 Message-Id: <20220317114316.29827-1-zajec5@gmail.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-20220317_044324_541205_9BCD155C X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?utf-8?q?Spam_detection_software=2C_running_on_the_system_?= =?utf-8?q?=22bombadil=2Einfradead=2Eorg=22=2C?= =?utf-8?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_original?= =?utf-8?q?_message_has_been_attached_to_this_so_you_can_view_it_or_label?= =?utf-8?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?utf-8?q?_the_administrator_of_that_system_for_details=2E?= =?utf-8?q?_?= =?utf-8?q?_Content_preview=3A__From=3A_Rafa=C3=85=C2=82_Mi=C3=85=C2=82ecki_m?= =?utf-8?q?td=5Fread=28=29_gets_called_with_offset_+?= =?utf-8?q?_0x8000_as_argument_so_use_the_same_value_in_pr=5Ferr=28=29=2E_Sig?= =?utf-8?q?ned-off-by=3A_Rafa=C3=85=C2=82?= =?utf-8?q?_Mi=C3=85=C2=82ecki_---_drivers/mtd/parsers/bcm47xxpart=2Ec_=7C_2_?= =?utf-8?q?+-_1_file_changed=2C_1_insertion=28+=29=2C?= =?utf-8?q?_1_deletion=28-=29_?= =?utf-8?q?_?= =?utf-8?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_required?= =?utf-8?q?=29?= =?utf-8?q?_?= =?utf-8?q?_pts_rule_name______________description?= =?utf-8?q?_----_----------------------_-------------------------------------?= =?utf-8?q?-------------?= =?utf-8?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_at_https?= =?utf-8?q?=3A//www=2Ednswl=2Eorg/=2C?= =?utf-8?q?_no_trust?= =?utf-8?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoxMmMgbGlzdGVkIGluXQ==?= =?utf-8?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?utf-8?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_record?= =?utf-8?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publish_an_?= =?utf-8?q?SPF_Record?= =?utf-8?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_abused_en?= =?utf-8?q?duser_mail?= =?utf-8?q?_provider?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freemail_use?= =?utf-8?q?rname_ends?= =?utf-8?q?_in_digit?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_author=27s_domain?= =?utf-8?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_valid_DK?= =?utf-8?q?IM_or_DK_signature?= =?utf-8?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_signature?= =?utf-8?q?=2C_not_necessarily?= =?utf-8?q?_valid?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_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+patch=linaro.org@lists.infradead.org From: Rafał Miłecki mtd_read() gets called with offset + 0x8000 as argument so use the same value in pr_err(). Signed-off-by: Rafał Miłecki --- drivers/mtd/parsers/bcm47xxpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/parsers/bcm47xxpart.c b/drivers/mtd/parsers/bcm47xxpart.c index 6012a10f10c8..50fcf4c2174b 100644 --- a/drivers/mtd/parsers/bcm47xxpart.c +++ b/drivers/mtd/parsers/bcm47xxpart.c @@ -237,7 +237,7 @@ static int bcm47xxpart_parse(struct mtd_info *master, (uint8_t *)buf); if (err && !mtd_is_bitflip(err)) { pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", - offset, err); + offset + 0x8000, err); continue; }