From patchwork Sat Jul 15 21:18:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 9842517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC81A602D8 for ; Sat, 15 Jul 2017 21:19:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CFE5285D5 for ; Sat, 15 Jul 2017 21:19:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 911A5285E2; Sat, 15 Jul 2017 21:19:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46323285C8 for ; Sat, 15 Jul 2017 21:19:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751237AbdGOVTB (ORCPT ); Sat, 15 Jul 2017 17:19:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:51972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdGOVS7 (ORCPT ); Sat, 15 Jul 2017 17:18:59 -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 EAF90235E2; Sat, 15 Jul 2017 21:18:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAF90235E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org From: "Luis R. Rodriguez" To: gregkh@linuxfoundation.org Cc: wagi@monom.org, yi1.li@linux.intel.com, takahiro.akashi@linaro.org, bjorn.andersson@linaro.org, luto@kernel.org, ebiederm@xmission.com, dmitry.torokhov@gmail.com, arend.vanspriel@broadcom.com, dwmw2@infradead.org, rjw@rjwysocki.net, atull@kernel.org, moritz.fischer@ettus.com, pmladek@suse.com, johannes.berg@intel.com, emmanuel.grumbach@intel.com, luciano.coelho@intel.com, kvalo@codeaurora.org, torvalds@linux-foundation.org, keescook@chromium.org, dhowells@redhat.com, pjones@redhat.com, hdegoede@redhat.com, alan@linux.intel.com, tytso@mit.edu, dave@stgolabs.net, mawilcox@microsoft.com, tglx@linutronix.de, peterz@infradead.org, mfuzzey@parkeon.com, jakub.kicinski@netronome.com, nbroeking@me.com, jewalt@lgsinnovations.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis R. Rodriguez" Subject: [PATCH 2/4] firwmare: enable a debug print for batched requests Date: Sat, 15 Jul 2017 14:18:51 -0700 Message-Id: <20170715211853.17457-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170715211853.17457-1-mcgrof@kernel.org> References: <20170715211853.17457-1-mcgrof@kernel.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Otherwise there is no easy way this actually happened. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 6f58a15efa2b..a85dabeb1e20 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -334,6 +334,7 @@ static struct firmware_buf *__fw_lookup_buf(const char *fw_name) return NULL; } +/* Returns 1 for batching firmware requests with the same name */ static int fw_lookup_and_allocate_buf(const char *fw_name, struct firmware_cache *fwc, struct firmware_buf **buf, void *dbuf, @@ -347,6 +348,7 @@ static int fw_lookup_and_allocate_buf(const char *fw_name, kref_get(&tmp->ref); spin_unlock(&fwc->lock); *buf = tmp; + pr_debug("batched request - sharing the same struct firmware_buf and lookup for multiple requests\n"); return 1; } tmp = __allocate_fw_buf(fw_name, fwc, dbuf, size);