Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756076AbaDVTRM (ORCPT ); Tue, 22 Apr 2014 15:17:12 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:49982 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754749AbaDVTRH (ORCPT ); Tue, 22 Apr 2014 15:17:07 -0400 MIME-Version: 1.0 In-Reply-To: <20140422184518.GC3528@book.gsilab.sittig.org> References: <1398175396-7560-1-git-send-email-grmoore@altera.com> <1398175396-7560-2-git-send-email-grmoore@altera.com> <20140422184518.GC3528@book.gsilab.sittig.org> Date: Tue, 22 Apr 2014 14:17:05 -0500 Message-ID: Subject: Re: [PATCH V3] Add support for flag status register on Micron chips. From: Graham Moore To: Gerhard Sittig Cc: Graham Moore , ZY - marex , Geert Uytterhoeven , Artem Bityutskiy , Sascha Hauer , Jingoo Han , linux-kernel@vger.kernel.org, Yves Vandervennet , linux-mtd@lists.infradead.org, Insop Song , Alan Tull , Sourav Poddar , Brian Norris , David Woodhouse , Dinh Nguyen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 22, 2014 at 1:45 PM, Gerhard Sittig wrote: > the patch appears to not have dev_err() references, were they > removed? see below [...] > this emits a message that an error has occured, but doesn't tell > where it occured -- can you dev_err() here to make the message > even more helpful? Yeah, the previous dev_err was actually copy-pasted from a similar function that already existed. When I rebased to l2-mtd/spinor, I did the same copy-paste but that branch has pr_err instead of dev_err. I'm a noob, so I didn't want to change things without a good explanation :) On the other hand, I'm in favor of using dev_err instead. [...] > this logic always returns "timed out" when the ready flag is not > seen, even in the case of read errors -- can you "preset" the > error code with "timed out", and update it with something more > appropriate before returning when other errors are seen? > > though this is an internal helper, and callers may not tell the > situations apart in the first place, so this might be a minor nit Same here as above, copy-pasted, and so the logic is what already existed. I double-checked the calling code, and like you say, the callers do not tell the situations apart. About half the calls assume any error is timeout. The others either pass return value or some other error up, or they ignore it. Thanks, Graham -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/