From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02F42C433ED for ; Sun, 11 Apr 2021 13:56:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6C54610CB for ; Sun, 11 Apr 2021 13:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235782AbhDKN4j convert rfc822-to-8bit (ORCPT ); Sun, 11 Apr 2021 09:56:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:38394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235338AbhDKN4c (ORCPT ); Sun, 11 Apr 2021 09:56:32 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6ED73611AD; Sun, 11 Apr 2021 13:56:13 +0000 (UTC) Date: Sun, 11 Apr 2021 14:56:35 +0100 From: Jonathan Cameron To: Srinivas Pandruvada Cc: Jiapeng Chong , jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: hid-sensor-custom: remove useless variable Message-ID: <20210411145635.3c6b48d1@jic23-huawei> In-Reply-To: <4079bb49a9c0022603abeffcdaec32208f449e51.camel@linux.intel.com> References: <1617952508-47150-1-git-send-email-jiapeng.chong@linux.alibaba.com> <4079bb49a9c0022603abeffcdaec32208f449e51.camel@linux.intel.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 On Fri, 09 Apr 2021 11:19:12 -0700 Srinivas Pandruvada wrote: > On Fri, 2021-04-09 at 15:15 +0800, Jiapeng Chong wrote: > > 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 > Acked-by: Srinivas Pandruvada > > --- > > 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; > > >