Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 600F2C77B73 for ; Tue, 30 May 2023 13:37:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6732785ED2; Tue, 30 May 2023 15:37:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1685453850; bh=YmlL+REmH6uxCoOVP4ax8R+1SNizgcDGBy5JvSoQPOM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=yCQoaguoK/C3Z+MXz5GgBt1gEV5+QHzhQTHUSWknfI2RISjbZ6OlJqDsYYzombSpM p3iREkrI17onaF9yrHx7q7r5wPsJOC56vwNJfW6rGau622X5CfnbzojZxkKthl4v8T M/mCpdWnAlNG/r81JGm89hFNrbuA3a+KzKsMfS+OHyyLjnvsgKTOWide3feNiSGVpm 6dkrIhM4yq4PxNJQt5K3eka/ORCsLsPs9xaU0B1MzBjHkEVVju5oFl3GR22rz4a6YA HYxzMNB8pFPeEtZxkuq9vO7pqLkIpNJ4k1LiwCeXny8mI3PdD+MavgfklQjJop20Wx ZwRT2kHZgDm8A== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 7D03985AFF; Tue, 30 May 2023 15:37:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1685453847; bh=YmlL+REmH6uxCoOVP4ax8R+1SNizgcDGBy5JvSoQPOM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=U9QMlR36ZTo5K3T3XOq+y0YGabtfH6l5MPH9d/3RXZZhnApQmPQAxTfudmvNW44eQ 31//zwQ35mVxL+ZsaHTs4MQa8zyhs4RNT++QX3DziCmR/bMLIRfGGB1HEycC4ncuJ2 ilDxE2NwYEjr8Z/BeAXXAArblQiHGo6s0AW9W/Xtr2iCPNpt04dIddln5iVgGLQx4Y InjGBYt1p+he7lTDiHS1mm1gVOCo86KZIfGBpQsv6mpkdDT3Xlrx1MKhL9i+Wu/msh E85Ze7RabtF7pPuPcC/OOS3qgrEcJbBUH5yuaCm94vzmM4TNcK9dHNJSr9SLmPLMQ1 HwQnGGTLl2MrA== Message-ID: Date: Tue, 30 May 2023 15:37:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3] cmd: sf/nand: Print and return failure when 0 length is passed Content-Language: en-US To: Michal Simek , Ashok Reddy Soma , u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, xypron.glpk@gmx.de, sjg@chromium.org, d-gole@ti.com, jan.kiszka@siemens.com, patrice.chotard@foss.st.com, git@amd.com References: <20230516115236.22458-1-ashok.reddy.soma@amd.com> <4dfd40b1-65cf-73a8-6621-8677a880ff42@amd.com> From: Marek Vasut In-Reply-To: <4dfd40b1-65cf-73a8-6621-8677a880ff42@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 5/30/23 14:23, Michal Simek wrote: > > > On 5/16/23 13:52, Ashok Reddy Soma wrote: >> For sf commands, when '0' length is passed for erase, update, write or >> read, there might be undesired results. Ideally '0' length means >> nothing to >> do. >> >> So print 'ERROR: Invalid size 0' and return cmd failure when length >> '0' is >> passed to sf commands. Same thing applies for nand commands also. >> >> Example: >> >> ZynqMP> sf erase 0 0 >> ERROR: Invalid size 0 >> ZynqMP> sf write 10000 0 0 >> ERROR: Invalid size 0 >> ZynqMP> sf read 10000 0 0 >> ERROR: Invalid size 0 >> ZynqMP> sf update 1000 10000 0 >> ERROR: Invalid size 0 >> ZynqMP> >> >> Signed-off-by: Ashok Reddy Soma >> --- >> > > Applied it to my queue. If someone else wants to take please let me know > and I will drop it from my queue. I believe Jagan should be picking SF patches ?