Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3741295imj; Tue, 19 Feb 2019 08:38:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IZaltnVYIZMudugs8GaRVe0ARuSw1kVksFFbxdqdZ9WnETR4iTM8U2CzIAF1NKpyjrTlIjC X-Received: by 2002:a17:902:1027:: with SMTP id b36mr32027241pla.339.1550594331369; Tue, 19 Feb 2019 08:38:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550594331; cv=none; d=google.com; s=arc-20160816; b=TpAJM2JJaM2LVtusUcNEgZWoNl4EaK+MhiH/CTrvdtI3OX9zerYyjzMpTtPJzCxnZF nd/GSVWLdSFLsmAFoy3rWRtGUom8SxoELXe43PGGYCq8OOUg4k29c7263bM964f7b3sF 2SOwAKarYOleEVGQ/q/I/MC11t473mqVM3UdKQlW0gfZTD/Kx+7d4s+Y7Sl4cFNziMlF VIoJTSOIy63/Z3miKZG9kkS+jvBEA3rtGcf3ldrBb73YxUgUYuaOLI+/mslXc9owuUKM VqKwrnIC2o4iLujwkoNpVVkfnB8Ubz65Z6jk0bs+gV781iO2iEqN/xlTFN245HoPrV8f qOMg== 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; bh=3vSKvwRq6Mlh59XGH+sEm/KyWQuNbx4IsYuOzKsqm/E=; b=kdhTAGCncw4U+Bd74fQBEIpDhYFeNAtUgPuuMjXfONgLcnP3OQTcD8oRvrp9G6yZaj SDWo2XxWsdSLq0AFzNy5Ah813VqKTkbquwSoVjLbEtz0k1tWrPsZUNPItqvMdicI5So9 0S9IyB/mx84N7Kd+sJUZXOz2wJnQcL8RaWDWKrd3JVP9EsxsBKP27ECkF86DRSF+bsUJ sRzVx90b22kjui+qVg+uP0l4Shyk3BBxJb5K4XgCt8WZFbzwwhwFs7O9WgMXeXUZfQcT DzYypJE89PFQoN1Cr6jvQwUJ62/LZgILTcs45CS1ckWIKhH3kpNKvwvm6+L+rJ8b9OjR Ibqg== 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 l13si16793022pgh.423.2019.02.19.08.38.35; Tue, 19 Feb 2019 08:38:51 -0800 (PST) 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 S1729095AbfBSQiO (ORCPT + 99 others); Tue, 19 Feb 2019 11:38:14 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39078 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbfBSQiO (ORCPT ); Tue, 19 Feb 2019 11:38:14 -0500 Received: by mail-pg1-f195.google.com with SMTP id r11so10374825pgp.6 for ; Tue, 19 Feb 2019 08:38:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3vSKvwRq6Mlh59XGH+sEm/KyWQuNbx4IsYuOzKsqm/E=; b=Lb2QjnAG15w0lJMpF6lHIjAsd0J7vOpTOwVXESBgLeypgumI09WyppP3Rv5f45MPCm /qbCLE5FltiLnKlKq6seqgscxaIvxvKWxWH2mwu5sl/F2dfOHKFfiWyGy803OTfOjOpx zLWD7HAiUBlwxo/qHgG2id/qlcMFDjuCPq9SCmpk15etrJnP1eiEm3quaKRuQEzFXfkB vDGSsxzBG+s6pI4D3z9BrzlRYrsBQxXhnxa3E2oHpBb5Vp1uQPeGH5BSqG+7eXHV/PgK OGnC5dseR2/SbsVo64dN5UmALLhqmt0BLVfjtjWcaZRmDW3/t4Ji1iPlI2Rs8Cqqws42 Rl6w== X-Gm-Message-State: AHQUAuaQ3Ev5JABJIWkVwnx6k7sZo5591ChjojFLcpL4A6n9fBWDNUC2 TmEbRjGE23ZTdnxj7Jd2ADQ= X-Received: by 2002:a65:5003:: with SMTP id f3mr24937180pgo.39.1550594293608; Tue, 19 Feb 2019 08:38:13 -0800 (PST) Received: from garbanzo.do-not-panic.com (c-73-71-40-85.hsd1.ca.comcast.net. [73.71.40.85]) by smtp.gmail.com with ESMTPSA id o85sm33679768pfi.105.2019.02.19.08.38.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 08:38:12 -0800 (PST) Received: by garbanzo.do-not-panic.com (sSMTP sendmail emulation); Tue, 19 Feb 2019 08:38:10 -0800 Date: Tue, 19 Feb 2019 08:38:10 -0800 From: Luis Chamberlain To: yuankuiz@codeaurora.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: hardcode the debug message for -ENOENT Message-ID: <20190219163810.GI11489@garbanzo.do-not-panic.com> References: <7e752055f72d67a4b963436d67965123@codeaurora.org> <20190204233047.GT11489@garbanzo.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 17, 2019 at 04:25:10PM +0800, yuankuiz@codeaurora.org wrote: > On 2019-02-05 07:30 AM, Luis Chamberlain wrote: > > On Mon, Jan 14, 2019 at 05:58:30PM +0800, yuankuiz@codeaurora.org wrote: > > > Hi, > > > > > > Refined at below. > > > > > > From bbd0d9c8f28eb78ca34353347c3d4092e88f000c Mon Sep 17 00:00:00 2001 > > > > This is all garbled, not sure why your patch looks all messed up. > > > > Are you using git sendemail or something manual? > > > > Luis > > > Done. Update it with resend it as below. Sorry but I have not received it, can you resend? While at it please address my comment below. > From: John Zhao > > When the return code of "-ENOENT" was printed inside > of the debug message, which could be hardcoded meaningful. This sentence doesn't read well. Please adjust it a bit to make coherent sense, and resend it. Perhaps you can use something like this: We already issue a custom firmware debug print message when no file / path was not found, however only the error code is returned. Stating clearly that the file was not found is much more useful for debugging, so let's be explicit about that. Luis > > Signed-off-by: John Zhao > --- > drivers/base/firmware_loader/main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/base/firmware_loader/main.c > b/drivers/base/firmware_loader/main.c > index 8e9213b..7eaaf5e 100644 > --- a/drivers/base/firmware_loader/main.c > +++ b/drivers/base/firmware_loader/main.c > @@ -328,12 +328,12 @@ fw_get_filesystem_firmware(struct device *device, > struct fw_priv *fw_priv) > rc = kernel_read_file_from_path(path, &fw_priv->data, &size, > msize, id); > if (rc) { > - if (rc == -ENOENT) > - dev_dbg(device, "loading %s failed with error %d\n", > - path, rc); > - else > + if (rc != -ENOENT) > dev_warn(device, "loading %s failed with error %d\n", > path, rc); > + else > + dev_dbg(device, "loading %s failed for no such file or directory.\n", > + path); > continue; > } > dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name); > -- > 2.7.4