From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 032F3C433E0 for ; Mon, 10 Aug 2020 13:52:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEBBD20734 for ; Mon, 10 Aug 2020 13:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbgHJNwk (ORCPT ); Mon, 10 Aug 2020 09:52:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:34104 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgHJNwk (ORCPT ); Mon, 10 Aug 2020 09:52:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DC036AC2F; Mon, 10 Aug 2020 13:52:58 +0000 (UTC) Date: Mon, 10 Aug 2020 15:52:38 +0200 Message-ID: From: Takashi Iwai To: Mark Brown Cc: John Stultz , Kuninori Morimoto , Srini Kandagatla , Linus Torvalds , Liam Girdwood , Linux Kernel Mailing List , Bjorn Andersson , Amit Pundir , Vinod Koul Subject: Re: [GIT PULL] sound updates for 5.9 In-Reply-To: <20200810122254.GA6438@sirena.org.uk> References: <20200810122254.GA6438@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/25.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Aug 2020 14:22:54 +0200, Mark Brown wrote: > > On Sat, Aug 08, 2020 at 10:07:36AM +0200, Takashi Iwai wrote: > > Takashi Iwai wrote: > > > > Does the patch below fix the bug? If so, it's rather a bug in the > > > commit cf6e26c71bfd ("ASoC: soc-component: merge > > > snd_soc_component_read() and snd_soc_component_read32()"). > > > That said, the commit cf6e26c71bfd dropped the capability of returning > > an error code from snd_soc_component_read() completely, while many > > code still expect an error gets returned. The assumption mentioned in > > the patch (the error can be ignored) looks too naive. > > I did an audit of the users when the series was posted and wasn't able > to turn up any code doing anything constructive with the return values, > but then once you're past probe error handling often makes things worse > if you try. This is the first one which actually seems to have had an > impact. > > > Morimoto-san, Mark, could you address it? IMO, we may still need two > > variants in the end again: the former snd_soc_component_read32() that > > returns the value directly and snd_soc_component_read() that returns 0 > > or an error. Only once after we deal with the error handling in each > > caller side, we can unify the read functions. > > I'm not sure if that specifically is what we need but yeah we should do > something, if it fixes things your change is certainly good for the > immediate problem so could you send it with a signoff please? OK, will do soon later. > With the new code we do now have the core code printing an error message > if the I/O fails, before they were just being ignored more often than > not. This did turn up a couple of cases where drivers were relying on > being able to do things like silently read from registers that just > don't exist or aren't currently accessible without any diagnostics which > is it's own problem :/ (especially the volatile cases). Yeah, we may need some raw access helper for such a case... thanks, Takashi