Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1228007pxb; Sun, 11 Apr 2021 11:52:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaatvY/T4C5I1ANVxDR0hRDbBw2pg7opcE2q7JCkU5sysPQdjXYrHnABYYdWeysdtlXcO7 X-Received: by 2002:a17:906:80d6:: with SMTP id a22mr2683260ejx.277.1618167162478; Sun, 11 Apr 2021 11:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618167162; cv=none; d=google.com; s=arc-20160816; b=f6UrXiS9iopybsoeESCubK6IihLr+U25g68y0xL0DEq4dnKe4NVgT9lucDquAXFdzE LyQwSwkx9h/x9tHhO9RTng28KD0S7Ey2Nvjx4U8JAgLtH0zbQ2FlljXVm4lBrK0bcX14 JJXsv8XidT998t+By8QZGigeziwyytA8DK1eVJtfln61m1vx8Yq8zftLb7v42WpR1jmv O5Tp/MPIcAh1gYeQVXeFJHSYPdnoGsgBAEk5kEp0VcbhS+ybt8eo9Bhi5KvkRZbF8deT Ap9xSUKYgJ25ROw+8Ok89x3lDFQcg/pm7GyrkBPUfJKx5SeKbNuYsHuU8OIY/8SSIdOW PWjw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=AwkgNUfMLAvFKXiohPKYL+pmIQ3o1g1Ehj1Ob4Si9Dk=; b=kdHvPluYXsNxWrrO6ttVAAROzkr2MgVvOEzP+a/RLs2oLYb+jJqCD+CQ7c+yk6zQ3X k+mwdczY4WnQPnbqKwU929MBbpzxinYIk/8sP3hN6xiz47lESpvuzg5sicnAWoWPcZKg Msdefs4dPdt6ZFBbyzk4MfRXG4Z97Cfk7a3RgBYhwXldn14r23ZFd08P9J9MWkKtwjKL QmNh1mgLdL4vgvFqF0W4NpowZblbxHfgPxUcXcs0RpvKc0ncD/VsOAnXSKLa0eZfWtch U7OBM2DzOVOvZjalpWkwOGcOuZpu1z4xnciFY/IWcaJBjAbnE40bm/CAtTOteqCuzrTP 3hbQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si1624555ejf.662.2021.04.11.11.51.50; Sun, 11 Apr 2021 11:52:42 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235584AbhDKN4i convert rfc822-to-8bit (ORCPT + 99 others); Sun, 11 Apr 2021 09:56:38 -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; > > >