From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 29 Nov 2016 20:11:01 -0700 Subject: [U-Boot] [PATCH v2 10/22] spi: Add error checking for invalid bus widths In-Reply-To: References: <1479072136-14246-1-git-send-email-sjg@chromium.org> <1479072136-14246-11-git-send-email-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 25 November 2016 at 20:28, Jagan Teki wrote: > On Sat, Nov 26, 2016 at 1:08 AM, Simon Glass wrote: >> Hi, >> >> On 25 November 2016 at 09:59, Fabio Estevam wrote: >>> On Fri, Nov 25, 2016 at 2:57 PM, Jagan Teki wrote: >>> >>>> Yeah, ie what if dts has a wrong value and do print that and continue >>>> with default width, so-that the user will update this for next run. >>>> Since it's not key a attribute to break or decide functionality better >>>> to go with it. >>> >>> Agreed. This also matches with the kernel behaviour. >> >> So it is correct to print an error, and then continue? This error will >> almost never occur and thus it wastes code space. SPI is sensitive >> because it can be used in SPL. Linux doesn't care about code size as >> much. >> >> So how about either: >> 1. debug() and return an error >> 2. debug() and skip the error > > I prefer 2. for SPL and replace debug with printf for U-Boot. OK I have sent v3. Regards, Simon