Received: by 10.192.165.148 with SMTP id m20csp319198imm; Fri, 4 May 2018 10:46:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqEAAyaRMxnEFuBJJFNZeOySR3Kw+Hkwu+HCavAuxJ0T7YVLYdA8HZVtxObaucAX2aAuSqN X-Received: by 2002:a63:62c6:: with SMTP id w189-v6mr23430959pgb.263.1525456017422; Fri, 04 May 2018 10:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525456017; cv=none; d=google.com; s=arc-20160816; b=lADSrD1Vz5+atkNYGKZLEmBR7GM0h4zqPMd8F4+8c19/nCgvgxY9hrJ4ThAxz1tstC 7J/J/iP6wvwugtjhuz2y6MW5W2ojCJLbTMik/00qys2SOC6nsDDk+d8WBskImXAXGpqc RMtQ3D4Y7CYergvMoFAq/EwaEClp17uQxb7x3tIFySGoWbp9N/UJd7aR+V8fyjaw4MDI yRqN8qIRTqsPySy0m+VnnUeragn3iyLxmn8ljDnuP1OVw9FNvE7Y6TlwBRlE1yYfZ4sh Wgd48m49wPJ49Ag0eZTAXYmbY4OcFDaCqihKBJMUvXqwQqpR6Fqc+A26q/gSRtqXNkj2 GGkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sFLRgTHgxeYbCiMbyHuCvTP7Hg+jDIttVO9afuWQWtE=; b=kZ/MP5V+vvRHx3Z/v6etelVxT27fIMQ7zGcX5UdR/HrT6s/wyqvI5VtlW90YcYnj0T 2W4dTnfpJjA57E+hRilfQobJ7Z6qPkrNttwYFIKuLWl/S4WDd7IJYcKHQSq+i2mfdcQK CF/W34aL+cRSeZibkKUZojoWatdKVVxvnb0XKhJ29XSNyBqCtL0bWiIbe6s2K9FCK4Y3 5WPncDEvc4QUpmH4d/gPiRGLsxknrQG+9RmhkewWSsJMNBlZUQWXJ2N4PD2V6VeD01rw KTy5OBKUOdrY1Z9sfFwDgb2+kLAQlgy0Kp2GG0WVn8ihOOfLl3mpYb6QySyjzOJiV2FB xAzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0kV4OYrj; 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=pass (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 z12-v6si11380014pgr.376.2018.05.04.10.46.43; Fri, 04 May 2018 10:46:57 -0700 (PDT) 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=@kernel.org header.s=default header.b=0kV4OYrj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbeEDRqA (ORCPT + 99 others); Fri, 4 May 2018 13:46:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:53886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbeEDRoE (ORCPT ); Fri, 4 May 2018 13:44:04 -0400 Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 70A0121837; Fri, 4 May 2018 17:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525455843; bh=lK4/cul2Qp4z1aa/o7dUTTM1j0Mk94t6ww8DTI6qiTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0kV4OYrj2leXXWrdYbdIgLn0aLXLVp6yF6T2MKA5fDN3DIbo5o+L042iRcuXLsFhN hbaLaImJC+VCEJ0XEe58tWt3Hc0Yr/4UZjd7rXWmTxPW7Mjrdxd0b1oRs1+UG19upb afow114eDmlnma/Aru44WnaIB1AUZjH8E8JV7Q+Q= From: "Luis R. Rodriguez" To: gregkh@linuxfoundation.org Cc: akpm@linux-foundation.org, keescook@chromium.org, josh@joshtriplett.org, teg@jklm.no, wagi@monom.org, hdegoede@redhat.com, andresx7@gmail.com, zohar@linux.vnet.ibm.com, kubakici@wp.pl, shuah@kernel.org, mfuzzey@parkeon.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, kvalo@codeaurora.org, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, markivx@codeaurora.org, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, bjorn.andersson@linaro.org, jewalt@lgsinnovations.com, oneukum@suse.com, cantabile.desu@gmail.com, ast@fb.com, hare@suse.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, khc@pm.waw.pl, davem@davemloft.net, maco@android.com, arve@android.com, tkjos@android.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, "Luis R . Rodriguez" Subject: [PATCH v5 3/6] firmware: rename fw_sysfs_fallback to firmware_fallback_sysfs() Date: Fri, 4 May 2018 10:43:52 -0700 Message-Id: <20180504174356.13227-4-mcgrof@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180504174356.13227-1-mcgrof@kernel.org> References: <20180504174356.13227-1-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andres Rodriguez This is done since this call is now exposed through kernel-doc, and since this also paves the way for different future types of fallback mechanims. Signed-off-by: Andres Rodriguez Acked-by: Luis R. Rodriguez [mcgrof: small coding style changes] Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loader/fallback.c | 8 ++++---- drivers/base/firmware_loader/fallback.h | 16 ++++++++-------- drivers/base/firmware_loader/firmware.h | 2 +- drivers/base/firmware_loader/main.c | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/base/firmware_loader/fallback.c b/drivers/base/firmware_loader/fallback.c index 529f7013616f..3db9e0f225ac 100644 --- a/drivers/base/firmware_loader/fallback.c +++ b/drivers/base/firmware_loader/fallback.c @@ -662,10 +662,10 @@ static bool fw_run_sysfs_fallback(enum fw_opt opt_flags) return fw_force_sysfs_fallback(opt_flags); } -int fw_sysfs_fallback(struct firmware *fw, const char *name, - struct device *device, - enum fw_opt opt_flags, - int ret) +int firmware_fallback_sysfs(struct firmware *fw, const char *name, + struct device *device, + enum fw_opt opt_flags, + int ret) { if (!fw_run_sysfs_fallback(opt_flags)) return ret; diff --git a/drivers/base/firmware_loader/fallback.h b/drivers/base/firmware_loader/fallback.h index a3b73a09db6c..21063503e4ea 100644 --- a/drivers/base/firmware_loader/fallback.h +++ b/drivers/base/firmware_loader/fallback.h @@ -31,10 +31,10 @@ struct firmware_fallback_config { }; #ifdef CONFIG_FW_LOADER_USER_HELPER -int fw_sysfs_fallback(struct firmware *fw, const char *name, - struct device *device, - enum fw_opt opt_flags, - int ret); +int firmware_fallback_sysfs(struct firmware *fw, const char *name, + struct device *device, + enum fw_opt opt_flags, + int ret); void kill_pending_fw_fallback_reqs(bool only_kill_custom); void fw_fallback_set_cache_timeout(void); @@ -43,10 +43,10 @@ void fw_fallback_set_default_timeout(void); int register_sysfs_loader(void); void unregister_sysfs_loader(void); #else /* CONFIG_FW_LOADER_USER_HELPER */ -static inline int fw_sysfs_fallback(struct firmware *fw, const char *name, - struct device *device, - enum fw_opt opt_flags, - int ret) +static inline int firmware_fallback_sysfs(struct firmware *fw, const char *name, + struct device *device, + enum fw_opt opt_flags, + int ret) { /* Keep carrying over the same error */ return ret; diff --git a/drivers/base/firmware_loader/firmware.h b/drivers/base/firmware_loader/firmware.h index 4f433b447367..4c1395f8e7ed 100644 --- a/drivers/base/firmware_loader/firmware.h +++ b/drivers/base/firmware_loader/firmware.h @@ -20,7 +20,7 @@ * @FW_OPT_NOWAIT: Used to describe the firmware request is asynchronous. * @FW_OPT_USERHELPER: Enable the fallback mechanism, in case the direct * filesystem lookup fails at finding the firmware. For details refer to - * fw_sysfs_fallback(). + * firmware_fallback_sysfs(). * @FW_OPT_NO_WARN: Quiet, avoid printing warning messages. * @FW_OPT_NOCACHE: Disables firmware caching. Firmware caching is used to * cache the firmware upon suspend, so that upon resume races against the diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index 7f2bc7e8e3c0..d951af29017a 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -581,7 +581,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name, dev_warn(device, "Direct firmware load for %s failed with error %d\n", name, ret); - ret = fw_sysfs_fallback(fw, name, device, opt_flags, ret); + ret = firmware_fallback_sysfs(fw, name, device, opt_flags, ret); } else ret = assign_fw(fw, device, opt_flags); -- 2.17.0