Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3276486imu; Sun, 13 Jan 2019 23:21:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Ek+3/Mr6wvWi55/rf+TyOJZCu+lM/8ij5C3FKIfdhokFCAx/OCyzZvigMr420glqJ0iPS X-Received: by 2002:a17:902:b83:: with SMTP id 3mr23145424plr.42.1547450497711; Sun, 13 Jan 2019 23:21:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547450497; cv=none; d=google.com; s=arc-20160816; b=CTngBymjx9M8B8RgMhGQFTX4+vO69b51RVI77FjXJbvn6a2l9/cYQJOIvZ6j7sr3ru NbXZkd/xoZV7jVVfFbcUgGIIOW6YZHj7lR+16h98YQkBSlTkt5gUHeBxn2svOxPrwCvK C07wD9Yykub6X8ntgNUZMvf/ckKWMmCRGf/1zPyC6ez1M/TCPaJdIwm9ZpY/E/oiGpo2 63EpmOCiphldsuoZpGulWJeMKdaZKPF3rN8OoeLMLUfhqP+IYxeedCU1PzGvkvf0+zOj VvivZSQlZiyiSFU/8wFyOZKcWfBpxzfea4HXftNEsWmUYU51LfaMASJCW4UknJ9MGyJd Lk4Q== 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:subject:cc:to:from :date:content-transfer-encoding:mime-version:dkim-signature :dkim-signature; bh=M0+k3lFQp865k218V6NPUEvTM/TLd5aXpm6QTs90d/w=; b=WSOwA4ntMnPVHCNXfYdTVUcW/ehJX+SXWBZcc3UTn/5KG7E2P6k5I3nFEazzjSVTZi GcYDOLLO8/O7fX04kvGyFucZx6YJNlC2CcXCJSWLrv6kuLqDkQE4r15LALACociTq2BK CvgZA/Yk0+6ahj4NiRBhWws3lSXMvd/7Y/1rGiI0y0YKclvImP6XG22dN1c4zIB2SZYR qxg/AnGUO1K4oQIBbSC1wQ5q5UWtnTcDQFXbZUxoG4UOVN1EwrQjHI4E0jhTPlfS3NTE LEr1Z+gviJRWOy4S2L+sTjp73GRs/eqvlXdcSJsHnb6XndEyvcG5Xv4HdbVhnsn/rDbt innQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=YjByJ4Pc; dkim=pass header.i=@codeaurora.org header.s=default header.b="Cvhv/Kg/"; 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 t5si33002268pgm.79.2019.01.13.23.21.21; Sun, 13 Jan 2019 23:21:37 -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=YjByJ4Pc; dkim=pass header.i=@codeaurora.org header.s=default header.b="Cvhv/Kg/"; 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 S1726580AbfANHTL (ORCPT + 99 others); Mon, 14 Jan 2019 02:19:11 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:55878 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfANHTK (ORCPT ); Mon, 14 Jan 2019 02:19:10 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3405460886; Mon, 14 Jan 2019 07:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547450350; bh=Z+svzhK5SMN0zjlYUpaaNFfbRpMzTU/a3Jtm13ynYHs=; h=Date:From:To:Cc:Subject:From; b=YjByJ4PccQNNOY5bCmKHwgC8tOEHrP1628AneGbO7+t/wWdbjJLECP4HZNvQLSLVe WURmil+J30CEF0JQgBPuHSWIzoMhMAnwdzgAO8FqrMnNjh3Of/yWmBKGEaF+QcBwwR LSpGqBapXqYBh94iFGLHYdInAKUBC06OMxYtLHFc= 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 DF9E56079C; Mon, 14 Jan 2019 07:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547450349; bh=Z+svzhK5SMN0zjlYUpaaNFfbRpMzTU/a3Jtm13ynYHs=; h=Date:From:To:Cc:Subject:From; b=Cvhv/Kg/sKMervrOCp478XW9Ztt5ZDE0F70GuTex3NTkYITSfWcu6wmE6ypMvUcVv tPWeTSbOXndr2Wpl0532oqq04ovAnaUlBMpHm94qMIqo2S9KedHfboXgAV7Iravx8e 6QHmMYXzAhutiBB/3sUT6UngGM0Ncub2vaOH9O08= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 14 Jan 2019 15:19:09 +0800 From: yuankuiz@codeaurora.org To: mcgrof@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] firmware: hardcode the debug message for -ENOENT Message-ID: <7e752055f72d67a4b963436d67965123@codeaurora.org> 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 From d6892f54a81bf85ad011bfb8822567690713d575 Mon Sep 17 00:00:00 2001 When the return code of "-ENOENT" was printed inside of the debug message, which could be hardcoded simply. 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..9ab1409 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 with error -ENOENT\n", + path); continue; } dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name); -- 2.7.4