From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754894AbbCBTP2 (ORCPT ); Mon, 2 Mar 2015 14:15:28 -0500 Received: from cantor2.suse.de ([195.135.220.15]:34474 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754074AbbCBTPZ (ORCPT ); Mon, 2 Mar 2015 14:15:25 -0500 Date: Mon, 02 Mar 2015 20:15:23 +0100 Message-ID: From: Takashi Iwai To: Mark Brown Cc: linux-kernel@vger.kernel.org Subject: Re: regcache_sync() errors for read-only registers cache In-Reply-To: <20150302182418.GD21293@sirena.org.uk> References: <20150302182418.GD21293@sirena.org.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Mon, 2 Mar 2015 18:24:18 +0000, Mark Brown wrote: > > On Fri, Feb 27, 2015 at 01:59:30PM +0100, Takashi Iwai wrote: > > > A quick fix is the patch like below, but obviously it doesn't cover > > the all cases but only addresses the signle rw. > > Please don't bury patches in the middle of mails, that just means that > if the patch is useful it's painful to apply. The --scissors option of git am is your friend. > Your patch seems fine but > can you please resend in a directly applyable format unless something in > the below indicates against that... Hm, so do you think that my patch is the best way to fix? I wasn't sure about it, that's why I wrote in that style. > > Also, _regmap_write() itself calls again regmap_writeable(), so it's > > superfluous. Alternatively, we may check -EIO from _regmap_write() > > and treat as a special case not to show the error. Or, add a > > parameter to skip regmap_writeable() call. > > I'm sorry but I can't parse the above - what is "it" in this context? regmap_wrietable() call in _regmap_write(). > Silently ignoring -EIO from the physical register write sounds like a > very bad idea though, that seems likely to discard actual errors. Right, in that case, a special error code might be used. But this sounds like an overkill, too. thanks, Takashi