Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4375009ima; Mon, 4 Feb 2019 15:32:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IZC9fP1PuLXO7GBfAYVC3kiFrR6DQdQuuqYKMYOEug5z5nOT9ZxoZIFoXWhE3UGEDJd7ndn X-Received: by 2002:a17:902:a601:: with SMTP id u1mr1962028plq.77.1549323131309; Mon, 04 Feb 2019 15:32:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549323131; cv=none; d=google.com; s=arc-20160816; b=xGKsHZuEQHtNRWK+Mejon23YFWBn3HfaQFrYPivGTGzUJXuT4dXvRNu8YEVY6wxQoW kaQY+dWIz2XDSkLeHxiW7BltXbhKLO5JHd5VAV3OniOGX/+DNYhVRehubiB8vqrQo8uR xScDyUL43yZztKuX/13RYLY08m/Va+/mcDStDUJ4uru3TbuO+vIriC4H+5uQCqti6/Zm 0xzl/y+389P5Lh0mNd7/+afKGQv7bVYf24+HlI9OfSe0UG+0OHiBeM2npWiX7641BOtO etaQJtHR6mTpgWTZD/tYsPwOwmGsM/ODY+Iv9em+bYGO1P8eisrrUvDu/ldl2ETManBk 0aJw== 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=0V/TMQLEuniZGtt1p7qkCY5RK/W906b0WDOprEueBME=; b=r5x/i1UyuwGUHgwysJOm1uKfQ19hh8PVahQefDF9INk96lVqVX0BZ9OdbvdMXrfHL/ A3EMAmlLpvZoVRJue50xIjVjwh6PalE2kxOkXNVbHb/diNJssbD7uTNje2w66HRX7Rdf h4hcvuGPOVzbn0Z3/vhjPuvycrwNIeGWEkV8xvn7s5GsIx4rfELhPXNXV0m7hLTolKIl AESnun5+LJPpj8O4SuouIH8TRC5w+juuh3qqlHaYMdq+Ec1QsZTfSbkLTcEhfvSNk2n4 cXRaYqsfaPrLCZPHcqxKDUMJBCfD996CulQ2AIBNqQBcu+7jVLdcEZjPlnX/raajszLx su1Q== 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 e68si1307759pfb.101.2019.02.04.15.31.55; Mon, 04 Feb 2019 15:32:11 -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 S1726855AbfBDXaw (ORCPT + 99 others); Mon, 4 Feb 2019 18:30:52 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:42491 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfBDXav (ORCPT ); Mon, 4 Feb 2019 18:30:51 -0500 Received: by mail-yb1-f195.google.com with SMTP id l20so327346ybl.9 for ; Mon, 04 Feb 2019 15:30:51 -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=0V/TMQLEuniZGtt1p7qkCY5RK/W906b0WDOprEueBME=; b=uK0IXp880K1mlaeSli9xg2XlD9ocfMW2wpQAvJ9xIbyg5y3sW/8Szp7HtKL5SSlZ4S owDIyh0/W8wmbczM1uxUtMvgOgY07dsJE2ngRw+/pv41xHG6nH5VGz/fsdzF6JAs56DV SnuP+sXdcFVbOEXTDosqsur+62PF21g+wxC0tLfj9my+7e1xzMVNlPtES404ts+G+hOW mv0G31bzWM8KyJZGnm9U9OzfzafyNyvctyhq/214ht5uCXHoIMoetmsiltvSx0f6jhCY UC1cuT6vmukBz9++r9q9fPSzzRXvXlwuMg62PEtYSB60fphT6sEGSTrtFTzAMYFyks2/ qqMg== X-Gm-Message-State: AHQUAuYTNWlOevXGPA02bFEAKUbFzSUR33RiXFDEKl2E3LiY9Wy8IlA8 qxTHGrqevN0165LkR8F/P2Y= X-Received: by 2002:a25:7751:: with SMTP id s78mr1611101ybc.78.1549323050642; Mon, 04 Feb 2019 15:30:50 -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 p3sm620534ywc.14.2019.02.04.15.30.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 15:30:49 -0800 (PST) Received: by garbanzo.do-not-panic.com (sSMTP sendmail emulation); Mon, 04 Feb 2019 15:30:47 -0800 Date: Mon, 4 Feb 2019 15:30:47 -0800 From: Luis Chamberlain To: yuankuiz@codeaurora.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: hardcode the debug message for -ENOENT Message-ID: <20190204233047.GT11489@garbanzo.do-not-panic.com> References: <7e752055f72d67a4b963436d67965123@codeaurora.org> 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 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 > > When the return code of "-ENOENT" was printed inside > of the debug message, which could be hardcoded meaningfully. > > 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 > > > On 2019-01-14 03:19 PM, yuankuiz@codeaurora.org wrote: > > From d6892f54a81bf85ad011bfb8822567690713d575 Mon Sep 17 00:00:00 2001 > >