Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1131211pxf; Fri, 9 Apr 2021 00:18:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaByJj6IbN6Jt3+W66Xv1z7QBG3RVA0gvUCsNu7dOL+BvFNtEmZOP9T+0/n1KJl4Wxcqcj X-Received: by 2002:a17:906:1b45:: with SMTP id p5mr13370734ejg.215.1617952693550; Fri, 09 Apr 2021 00:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617952693; cv=none; d=google.com; s=arc-20160816; b=h0N9we+ZBWxFtj4JvxsoGCceRMVsePZvOTCrYJOgNIRXSD1OMw6gef/aEd9r08iKM3 y5APS66E2IGJf/cAXTaMxEHq81rRqE2kAsDUJFobXvZij8acnGcs6bT7yAFTB0XkcajL /vvf+8FjrKv88uAMYQz6XRRDeskZRWCDY/SIsi8zuLkwIxa39eqUwjzMGBGW0D5cowCt FTJ4zfvecuCyA//mOHGxZFORvZMD4fdNZwXMH29Re7yC3lqcnZBc13DsdTlM8BmkL22v V0tEihULJ+HDUJ20lilImPw6S1w4WFVXB2yZogZO60o9AEk50thJdrkWVDW9ilxM/apQ 25pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aLZ3bEq+2AhouGVPxLF4YYqicHorgh//TnTHZhbgUE4=; b=O7YKscYmTkVEYeOpmeUlqqP9J0YXlIIBjcoWuCGu3lIx0gM6ojHUV+rPJDi7yqlfPx fngi7II+FjQM7t+t637tFmN1Rj8jKXo1c0TWVhGmz3FI2wCaZIIGbXENrvPIYgj8zkKX 4PpeuS+cs2rKVU/Pq26/eIsbfZH2UnYN9hsWVRGFAWzgfuByktcGbSSaTyWSTJ86vZKm a9fHWotzI6krhCu4cucIP/ffrSZ2iEzBrby1YS6MZQK/0jbf2NP8/1hPrEc8oYO2bm8o CLI7VvrRLmENvHPtkbIVVlkmdrwawoEkm+EDF1oRpGZZ6Q0ylz4ZjUxyWsvVedn3YNoc EmfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si1285768ejc.601.2021.04.09.00.17.50; Fri, 09 Apr 2021 00:18:13 -0700 (PDT) Received-SPF: pass (google.com: 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; spf=pass (google.com: 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231621AbhDIHP2 (ORCPT + 99 others); Fri, 9 Apr 2021 03:15:28 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:51949 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbhDIHP2 (ORCPT ); Fri, 9 Apr 2021 03:15:28 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UUyaniy_1617952509; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UUyaniy_1617952509) by smtp.aliyun-inc.com(127.0.0.1); Fri, 09 Apr 2021 15:15:13 +0800 From: Jiapeng Chong To: jikos@kernel.org Cc: jic23@kernel.org, srinivas.pandruvada@linux.intel.com, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] HID: hid-sensor-custom: remove useless variable Date: Fri, 9 Apr 2021 15:15:08 +0800 Message-Id: <1617952508-47150-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following gcc warning: drivers/hid/hid-sensor-custom.c:400:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/hid/hid-sensor-custom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index 2628bc5..e430673 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -397,15 +397,14 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr, if (!strncmp(name, "value", strlen("value"))) { u32 report_id; - int ret; if (kstrtoint(buf, 0, &value) != 0) return -EINVAL; report_id = sensor_inst->fields[field_index].attribute. report_id; - ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, - index, sizeof(value), &value); + sensor_hub_set_feature(sensor_inst->hsdev, report_id, index, + sizeof(value), &value); } else return -EINVAL; -- 1.8.3.1