From patchwork Tue Jul 16 08:54:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Wenan X-Patchwork-Id: 11045565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5396F746 for ; Tue, 16 Jul 2019 08:48:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4240128517 for ; Tue, 16 Jul 2019 08:48:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3626C285A5; Tue, 16 Jul 2019 08:48:48 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 7FD5428517 for ; Tue, 16 Jul 2019 08:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728015AbfGPIsr (ORCPT ); Tue, 16 Jul 2019 04:48:47 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:49040 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726465AbfGPIsr (ORCPT ); Tue, 16 Jul 2019 04:48:47 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 99B11168B1921582D608; Tue, 16 Jul 2019 16:48:44 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Tue, 16 Jul 2019 16:48:38 +0800 From: Mao Wenan To: CC: , , , Mao Wenan Subject: [PATCH -next] keyboard: remove set but not used variables 'sts' Date: Tue, 16 Jul 2019 16:54:23 +0800 Message-ID: <20190716085423.19443-1-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/keyboard/applespi.c: In function applespi_set_bl_level: drivers/input/keyboard/applespi.c:902:6: warning: variable sts set but not used [-Wunused-but-set-variable] Fixes: b426ac0452093d ("Input: add Apple SPI keyboard and trackpad driver") Signed-off-by: Mao Wenan --- drivers/input/keyboard/applespi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index c1a6843..548737e 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard/applespi.c @@ -899,7 +899,6 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev, struct applespi_data *applespi = container_of(led_cdev, struct applespi_data, backlight_info); unsigned long flags; - int sts; spin_lock_irqsave(&applespi->cmd_msg_lock, flags); @@ -916,7 +915,7 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev, KBD_BL_LEVEL_MIN); } - sts = applespi_send_cmd_msg(applespi); + applespi_send_cmd_msg(applespi); spin_unlock_irqrestore(&applespi->cmd_msg_lock, flags); }