Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3386574imu; Mon, 14 Jan 2019 02:00:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN66evZ8pHckeDQae5bad1yE/n7hi9zo4elMd4QFEiVa5fy1POx0Oh/rUUqkNxdAVfL2Qmfj X-Received: by 2002:a62:7a8b:: with SMTP id v133mr25052250pfc.159.1547460029143; Mon, 14 Jan 2019 02:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547460029; cv=none; d=google.com; s=arc-20160816; b=etapkslDdzGVpQw4xkMi4XwWc7th/to65K3jD/I9cVHgHBg1vjBvcjeF4kUYdfmpyK cMInURG96glJ7Bq1YKww7v8MuHCAH3cNH09by0Tvh3QPYwstSIsytqfWE7Wwa2Hf90RR hEhxfbjUDHMCJBCGrEpIW/c90UjsLZ0kInghlA7+XkGfP8LnptBS4GUiKBu4NDHRDxbO ceDZin0Xd6Nvcx4kkkTTWy0YA3TPW1kCmoOj5T2MqoVebcudZy5P+rpvlxWQ/bhlLzV2 14PyiG96f45eNEv0hFDToYhbj5RZiOZEjv0hLvY6G6RWpgW21/IhTf2nruXo30tLY8s1 sLqQ== 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=Pa43wk/4SJN4ZWf4CJ6r4e3ytGADvTXIgWtULj1FFpw=; b=h1mE0+4vdF12IIK+jYd7qqxpZ/cn/LsNK/smzuQmgi3DZK//MA5neKNoTabx4IdCj6 mnjksqJ+riQcM1/Z7pUKKJiDowMHvdDBKRECCB9/W4dUrM7blwegUcaU83ylIUUJvpkq mhOW/1uzqSe+eQPJXZvn0FJdXhuGMGQTHkvBqOAId1hoIHG7yiNxR6cQvrUDzOIYE/8N UQYGykr7i+MFhwOCQ3CmYqcyYs5yOv3J9U+kS2CK81G9tzxGah5S9bHH1dKkJHHHn8lJ +Kc47eixbnlZ2NgxPqRfKL6LG+UjdukcVBJb8UtYQDeoIavmx2ZX8NrIKigNsx8JCuB9 OONw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BYszJ07h; dkim=pass header.i=@codeaurora.org header.s=default header.b=BdOXKNX+; 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 o127si28972580pfo.251.2019.01.14.02.00.13; Mon, 14 Jan 2019 02:00:29 -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=BYszJ07h; dkim=pass header.i=@codeaurora.org header.s=default header.b=BdOXKNX+; 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 S1726856AbfANJ6q (ORCPT + 99 others); Mon, 14 Jan 2019 04:58:46 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51854 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbfANJ6p (ORCPT ); Mon, 14 Jan 2019 04:58:45 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5CB2F61193; Mon, 14 Jan 2019 09:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547459924; bh=RlNPQrJ3EJ+myg10De+//B2pgBUzjuLDgUZiyrtCjA8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BYszJ07hvEQChyJpMnLLoCgu4Q1kUGD0Q+nKMWU1p3f89zpgADO05AOB6yiXuPJNP sVpoO8aYJXl9tr+cxiTTMk5d6g5qK/rjrVZLvBimoO5JNTtpMz0uQ855enjUDpyDx+ GTXjpIKKJZknLcJU7yxzD5yZZUfe50k+1ewjnfUo= 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 378B7611A8; Mon, 14 Jan 2019 09:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547459911; bh=RlNPQrJ3EJ+myg10De+//B2pgBUzjuLDgUZiyrtCjA8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BdOXKNX+lK0PqypGRfKkot6dfbn8ihW7dKSO7Qntg4wMlWbZZC7eb9DVAgewG+o6N 39djhIHm550auVlRrkvwQUMINW0kXZ85DyoLwXCDjitLr7tVHaTJweaIpneiuYd6eY rttZdwrBLPFxewUoVLTERgG5ofi4vGBjBCkLkquU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 14 Jan 2019 17:58:30 +0800 From: yuankuiz@codeaurora.org To: mcgrof@kernel.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: hardcode the debug message for -ENOENT In-Reply-To: <7e752055f72d67a4b963436d67965123@codeaurora.org> References: <7e752055f72d67a4b963436d67965123@codeaurora.org> 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 Hi, Refined at below. From bbd0d9c8f28eb78ca34353347c3d4092e88f000c Mon Sep 17 00:00:00 2001 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 >