Received: by 10.192.165.148 with SMTP id m20csp3685420imm; Mon, 7 May 2018 17:21:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqykSE/qLWDW5mfEpa+u+qtwkmCyki7FdZ32WhWAXRurgHP2IY/WoPQhe3pzewwGBZK4WOu X-Received: by 2002:a17:902:4b:: with SMTP id 69-v6mr15570230pla.178.1525738909807; Mon, 07 May 2018 17:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525738909; cv=none; d=google.com; s=arc-20160816; b=ThhITQZyjQmlcKFyh9wMmxZOGGsmYeEgE3Cjvyryuix+K81FSexqbV/ILfa5qIWDaC Fb3dJQcA3c4iU4GH0n258fo/zn6nabipBhySM1/kI5V5khgqpUe0S99BZgv0kNywIBmt DEgJJtPNmLD6AowTVqKNFmuKzYracmLLyJYMopDR4hOw/a260lNm2Ax1JGnxokK9ltBi jSoM3SxWCJv/VT9gSmGrmfQ61WgZbAWQ3F/U7gtP3viEt90TKXE+iOIsGQiIvuKlkD8I 3YSup4xl6omqhmeQeHP/G8Bs5YY2WYCLJ0Ec0cZpbePu6szbT0OraNnvenrk3YVeU97/ VT3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pM6N9DgbilLtI3W3eb6mmg+GeWYPHr5/BdLpN8LVmoU=; b=m3bzyrOn+UFEbaTBvz0hsgft2NtfXGXbnGlImlHegJ4VkV9MZJAkBH9hEuEF5wgsj8 3ra9TuA3HZYyeuODXGuKFaserrmEXtGY9kUuOoacr75cbY/WzEcJyO5Inl183tyGu8x6 eAM4NKoW+Otui09SRWLaTQn4EutJmHxxHS/cr2jVb3YYz/3w6TI55uaIR6Nnni8zgoha T8G8FzQ44mGi7adYwYgVvy01v0lFCJGuUjK4WhUfafTshZkb+KiYYiFAV3dPYcbcxoCt kJ+bwREaRhsqsJuo2UuCKkKDhZIS7MlyzSOz1i0RlYG/krtOqh0UUtS4w6tto5m6PZU0 RBqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189-v6si18260212pgb.126.2018.05.07.17.21.35; Mon, 07 May 2018 17:21:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753645AbeEHAU7 (ORCPT + 99 others); Mon, 7 May 2018 20:20:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:53445 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbeEHAU6 (ORCPT ); Mon, 7 May 2018 20:20:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EC878AF2F; Tue, 8 May 2018 00:20:56 +0000 (UTC) Date: Tue, 8 May 2018 00:20:55 +0000 From: "Luis R. Rodriguez" To: Andres Rodriguez Cc: "Luis R. Rodriguez" , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, alexdeucher@gmail.com, christian.koenig@amd.com, kvalo@codeaurora.org, arend.vanspriel@broadcom.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, hdegoede@redhat.com, Kees Cook , Mimi Zohar Subject: Re: [PATCH 6/9] firmware: print firmware name on fallback path Message-ID: <20180508002055.GY27853@wotan.suse.de> References: <20180423201205.20533-1-andresx7@gmail.com> <20180423201205.20533-7-andresx7@gmail.com> <20180503234235.GX27853@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 10:57:26PM -0400, Andres Rodriguez wrote: > On 2018-05-03 07:42 PM, Luis R. Rodriguez wrote: > > On Mon, Apr 23, 2018 at 04:12:02PM -0400, Andres Rodriguez wrote: > > > Previously, one could assume the firmware name from the preceding > > > message: "Direct firmware load for {name} failed with error %d". > > > > > > However, with the new firmware_request_nowarn() entrypoint, the message > > > outlined above will not always be printed. > > > > I though the whole point was to not print an error message. What if > > we want later to disable this error message? This would prove a bit > > pointless. > > > > Let's discuss the exact semantics desired here. Why would only the > > fallback be desirable here? > > > > Andres, Kalle? > > > > After we address this I'll address resubmitting this lat patch > > along with the last one. For now I'll skip it. > > You are correct. I initially thought it would be useful to know that the > usermode fallback was being triggered. And for that message to be useful we > would need a fw name. > > But now that you point it out, this behaviour is inconsistent with the > _nowarn() definition. We shouldn't have a message in the first place. > > So it might be better to instead have: > > if (!(opt_flags & FW_OPT_NO_WARN) ) > dev_warn(device, "Falling back to user helper\n"); > > No need to add the firmware name, cause we either: > a) FW_OPT_NO_WARN is set and no messages are printed, or > b) FW_OPT_NO_WARN is not set and we get both messages. > > Yay, nay? I welcome such a new warning but not for any of the reasons stated. It make sense if FW_OPT_NO_WARN is not set and only because the fallback mechanism can fail for a slew of different firmware files, and just getting informed a failure with a fallback occurred does not tell us for which file it failed for. I'll add such a patch to my queue and send it off soon prior to your own new API nowarn call. Luis