Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp228345ybz; Wed, 15 Apr 2020 07:41:16 -0700 (PDT) X-Google-Smtp-Source: APiQypILR41q3qzKkKjVmRlmd9f7yqsZPLZNJk9o/Ywbd4AAjqpBRtdocBXHMxzSORD6MqcKQv9/ X-Received: by 2002:aa7:c352:: with SMTP id j18mr7420304edr.196.1586961676340; Wed, 15 Apr 2020 07:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586961676; cv=none; d=google.com; s=arc-20160816; b=jjUfzgRz3CorMvSTIqhWwIgjPtXx4RVevrmXptFxB+2b1Y16V2VDcIMw1C8U6WuiC2 jbqJl3VV1RERXcZ0FUl0N4g2yOwSbOwrO/fSGZgz/KEHd5D+powT+M0g/pPA/Tq2S6Xa xu7RTBdtdiJttzhlrD94neeb0v54uifb2b0xAgYqAqWChoawSzD4tfh+Wud+Drp7If2W Ji95yYso04JCN+WFmad5ej9/tI7IkyknX2cw0cUagdT9a6hWSukJuotUfBoxEDwKX9Uw 5zLtZgbNi3/rwav6Z+5i4wTDhclysT0ie7Id2kLfBFxZUsePKFSoo6zdcSADss+Gc9CD M59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Y4P8rWiotzQvb4JxyUfpgXR3sblXTGBUlf8HwRLY7Kc=; b=g9nMwxPp9I1hrFjqED397JRntSRu/TH8LNEHnxYBO17HStmKoQIpSFWZButTPGF2yA WCa4dE85Upl6XrSfoapbhJ1XzX5pI9+0ioM95ZnhTK9Kq70tHzIEC7aWCpA23rip1QFO nk4jUrOnwkQEdwR1Dk2wgLUNiRE28d4MnCa/FoLSTThpn43QnxIQ9YZv3pqiEVWUo4td 9Lo7VsQf36VYylAq75L+P4y7vYTN0Jum9lL/2jBl4C3FmtnTnrrf7LOAfNOHuuhCcSAs uXP19bHH6YavG8VfjNURq7W+YLQaxsX/N1IqP+kome2K5dezKHLqlWNXKZl7HfcZ52CX WXUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=AsYJABa9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg10si11062297edb.447.2020.04.15.07.40.52; Wed, 15 Apr 2020 07:41:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=AsYJABa9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2634584AbgDOAZm (ORCPT + 99 others); Tue, 14 Apr 2020 20:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732540AbgDOAZf (ORCPT ); Tue, 14 Apr 2020 20:25:35 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFDDC061A0C for ; Tue, 14 Apr 2020 17:25:35 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id ay6so3185969pjb.0 for ; Tue, 14 Apr 2020 17:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=Y4P8rWiotzQvb4JxyUfpgXR3sblXTGBUlf8HwRLY7Kc=; b=AsYJABa9hWEbNsCLZkMt/OCoNzfNwn/PFH5DvXWcOFmj0zSxjoT9Xj7gjW0EwgQqeg 2YtAplcWXxOBgTdg1AhsL1QHgA7fYSSgofdbx395pC9kP74ENeJrHlA2WZsiqsvt3lQt KQSry7u4otle1WPyN5l08+Ebf6aMQ1NA1mC/8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Y4P8rWiotzQvb4JxyUfpgXR3sblXTGBUlf8HwRLY7Kc=; b=T2tL9kFOlk+2580tKdKT8slyuEGR2whQc03K1lddI7apKz1+bxw1JQtK4+a6xgW0p7 Kmbk7CGe8WM+BwnGmmx9UwangEwGF30INRl3OYPV2299IxBtGUWHiRCUcOegeuxc8W3O SsEGCTUXOAr4g8mMn867OCy0uyvvaxFXdx5TnlF2AqLAv0Njqb5RAN61qom0B/E6mkr8 NYMlt+YweM6b0xO9+PSJBZc1mBcf0tT9s8p6i9Hyg06NyihFmB7NxJjkfqQxVu4RX3DO Ikm6WB+SiHyjmchNgL82nMPEa+UWGgIoDlpCNilTYZ5+I9jU0BlljvrnEBoxHJ1muQ1q bAGw== X-Gm-Message-State: AGi0PubK/yZvTSi+m4wGHymrtNhvDnGmPOOQyBiblKcXmeyhIApe6gf0 HMnOqtf65D8NqwySoGsbBQ4t1w== X-Received: by 2002:a17:90a:c304:: with SMTP id g4mr3029358pjt.157.1586910334896; Tue, 14 Apr 2020 17:25:34 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id z7sm2878341pff.47.2020.04.14.17.25.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 17:25:34 -0700 (PDT) From: Scott Branden To: Luis Chamberlain , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann Cc: "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross , Scott Branden Subject: [PATCH] test_firmware: remove unnecessary test_fw_mutex in test_dev_config_show_xxx Date: Tue, 14 Apr 2020 17:25:17 -0700 Message-Id: <20200415002517.4328-1-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary use of test_fw_mutex in test_dev_config_show_xxx functions that show simple bool, int, and u8. Signed-off-by: Scott Branden --- lib/test_firmware.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/lib/test_firmware.c b/lib/test_firmware.c index 0c7fbcf07ac5..9fee2b93a8d1 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -310,27 +310,13 @@ static int test_dev_config_update_bool(const char *buf, size_t size, return ret; } -static ssize_t -test_dev_config_show_bool(char *buf, - bool config) +static ssize_t test_dev_config_show_bool(char *buf, bool val) { - bool val; - - mutex_lock(&test_fw_mutex); - val = config; - mutex_unlock(&test_fw_mutex); - return snprintf(buf, PAGE_SIZE, "%d\n", val); } -static ssize_t test_dev_config_show_int(char *buf, int cfg) +static ssize_t test_dev_config_show_int(char *buf, int val) { - int val; - - mutex_lock(&test_fw_mutex); - val = cfg; - mutex_unlock(&test_fw_mutex); - return snprintf(buf, PAGE_SIZE, "%d\n", val); } @@ -354,14 +340,8 @@ static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg) return size; } -static ssize_t test_dev_config_show_u8(char *buf, u8 cfg) +static ssize_t test_dev_config_show_u8(char *buf, u8 val) { - u8 val; - - mutex_lock(&test_fw_mutex); - val = cfg; - mutex_unlock(&test_fw_mutex); - return snprintf(buf, PAGE_SIZE, "%u\n", val); } -- 2.17.1