Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1226238imj; Sun, 17 Feb 2019 00:41:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IawnCk2vlXOIKJUfvjs+79JOZcgOfmY6WM5RfeNhEH83iCiESCCfbTl2Le4oWFZEwihu2K9 X-Received: by 2002:aa7:8d51:: with SMTP id s17mr18751067pfe.16.1550392900835; Sun, 17 Feb 2019 00:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550392900; cv=none; d=google.com; s=arc-20160816; b=hg6Rt0NwpanYq4SIeOD90Xt2zZp20b/wK0LMWzeYNVysQsMJcoXZn7VCZqCbtiR4Qq hFwnS34uJAZOzc1VUxY2DiYUiipE818tUf/axe8hungiESOngAuXa804WY9TcN9Gg9HW cd3sDXd+WheM1I1ruwD5ofRD3WR/CBu7pfGn+eKhuYBcL++a3YkUvr/OVzY1BOE2raVR RXKdsGWFHGcw8Mbq8lqCPu/bDzCOXWpvJ8jYtadDBXMNxvl413luOkbzd8iFbFfybzvk QtWhxoil/gwiqIy8YbisMftyZOv74hldlyfHeDTwZYvjRxNmmOb1bnUGllqdJATjoCW3 4lnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=jUvYQei+O073MELhT4b1sO+/SN9JKdcFZCvdI2ZhaNs=; b=e5I9uUG8qDoisiLrQ4+EQf1+cDiEZrzvsFpAMiKJTGSAod6SUimTGm2cVj/bYy6e9x rQCF7bhbOK2tZKKs2BUkiCTo+DjChboU1GgUyvrpJlF9hJKOQhZftkkNbADcFXDIg71F zOdFnfXJcSM+Qe7qJCDy5bx+MjMXifqmRR4wNT/XX3QVD7lOXJHT3rKxI1Bp6B+bVc3y r08BExlFE31XqRenYddpVzXkfujnIRwL//w37QaWxtnb1esSO1IME/QLp3MwjPAMMs84 eE1iZcsGckHTVMpkBC7MZ14bktNTlZLV6L3g1aTQzMlgq6bkcnQpLpzkspLzcWdOwIMo Jq+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BBaUI1b9; dkim=pass header.i=@codeaurora.org header.s=default header.b=BBaUI1b9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si8649127pll.283.2019.02.17.00.41.25; Sun, 17 Feb 2019 00:41:40 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=BBaUI1b9; dkim=pass header.i=@codeaurora.org header.s=default header.b=BBaUI1b9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbfBQIZM (ORCPT + 99 others); Sun, 17 Feb 2019 03:25:12 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49550 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfBQIZM (ORCPT ); Sun, 17 Feb 2019 03:25:12 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8A261607DD; Sun, 17 Feb 2019 08:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550391911; bh=TH5omesshtsgGxh1iAhmsoG+/e9gU+M1EhbjO2aEJxI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BBaUI1b9Lll14sXQOHxrcRd2HmFuFYGvVSGupJKAStmyqpWb0eUhEiye681KtX9p9 nWeW7u5IOLsP3Lzet1XtInif4kOZuOl+OJ8iSgzxjasJxP1xl5LBM0/PWA5FNfeqSA PsEFyTedus/kJ7oeDoGZ+ef2Jn0w8Ut0CNQXuEfw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id EDB8A60247; Sun, 17 Feb 2019 08:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550391911; bh=TH5omesshtsgGxh1iAhmsoG+/e9gU+M1EhbjO2aEJxI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BBaUI1b9Lll14sXQOHxrcRd2HmFuFYGvVSGupJKAStmyqpWb0eUhEiye681KtX9p9 nWeW7u5IOLsP3Lzet1XtInif4kOZuOl+OJ8iSgzxjasJxP1xl5LBM0/PWA5FNfeqSA PsEFyTedus/kJ7oeDoGZ+ef2Jn0w8Ut0CNQXuEfw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 17 Feb 2019 16:25:10 +0800 From: yuankuiz@codeaurora.org To: Luis Chamberlain Cc: gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: hardcode the debug message for -ENOENT In-Reply-To: <20190204233047.GT11489@garbanzo.do-not-panic.com> References: <7e752055f72d67a4b963436d67965123@codeaurora.org> <20190204233047.GT11489@garbanzo.do-not-panic.com> Message-ID: X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. From: John Zhao When the return code of "-ENOENT" was printed inside of the debug message, which could be hardcoded meaningful. 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