From patchwork Thu Aug 18 09:35:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1667619 X-Patchwork-Delegate: david.oberhollenzer@sigma-star.at 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=CCvTb7/g; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=E/ihAXPc; 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 4M7ft12Yj3z1ygH for ; Thu, 18 Aug 2022 19:36:57 +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: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=NVPl6o9oI2WYTLIk/L2EtTcPiWL0YwSAuH5MK3M7lNQ=; b=CCvTb7/g6HftmY qfCMSzqxMpfjpC79Jo9xMwW6E9Ri/2zvDVpZqbHn1MsVlO28vV1EhapLnSZA1nyKF8qWAkGiMneR4 IC8IVNFBarrLFCXD+t4T5tzEeYlUsnqGLxt7PEcZCB7+MohE5lhavEl7LpSD0d8JQeyDjgFl/Fjdb /w1VoiovW6C7871hTWTGZEPvCh8O9J9W8Ng1lF6DHdzdrWjByNOi9R9IysBvup8/dNeEQY/xK5K5J YVbvCXl1U2+E9jHl4MX0SXewgF38Skl0W1HOKPq9eOO4bcHXveGZgdZp/JruQZM79RCHEBwu2TwkN rnUAllUQVZMZOrSgEf5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oObws-001ipD-7d; Thu, 18 Aug 2022 09:36:22 +0000 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oObwp-001ijK-65 for linux-mtd@lists.infradead.org; Thu, 18 Aug 2022 09:36:20 +0000 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 0028222175; Thu, 18 Aug 2022 11:36:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1660815364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TZv97iU+nE4J9iD72giS1GK/LNb6udxf9nNJFxCneq0=; b=E/ihAXPcfr1NT+ZVIvrl1HBebWiYuQKQbhgi+ETP6O163INj6RzdgQxAvBXc61uJqaw2IO w7R7fMFYQl16eynGk12aghYW2+6QqQWI5xzqY1IYr3Mk7qhFEG5GvcZrN88YZpruHvZC07 4QXBhFQcbGGe//qC2K1+xeKaIke2B2M= From: Michael Walle To: David Oberhollenzer Cc: linux-mtd@lists.infradead.org, Sergei Antonov , Michael Walle Subject: [PATCH] mtd-utils: flash_otp_dump make offset optional Date: Thu, 18 Aug 2022 11:35:48 +0200 Message-Id: <20220818093548.1932952-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_023619_464440_6343B730 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) 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: Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump") introduced an offset parameter. This should have been optional, but there was a typo. Fix it. Reported-by: Sergei Antonov Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump") Signed-off-by: Michael Walle --- misc-utils/flash_o [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a01:4f8:151:8464:0:0:1:2 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 Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump") introduced an offset parameter. This should have been optional, but there was a typo. Fix it. Reported-by: Sergei Antonov Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump") Signed-off-by: Michael Walle Reviewed-by: Sergei Antonov --- misc-utils/flash_otp_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc-utils/flash_otp_dump.c b/misc-utils/flash_otp_dump.c index f1e1782..324d856 100644 --- a/misc-utils/flash_otp_dump.c +++ b/misc-utils/flash_otp_dump.c @@ -20,7 +20,7 @@ int main(int argc,char *argv[]) int offset = 0; unsigned char buf[16]; - if (argc <= 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) { + if (argc < 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) { fprintf(stderr,"Usage: %s [ -f | -u ] []\n", PROGRAM_NAME); return EINVAL; }