Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1559419pxf; Fri, 9 Apr 2021 11:20:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhLgNE4HHn5rTAPytCk4OZhNrAKBFWwFYQIUi/EmCg2VgkPge6U7JoUj3AW5MKD7G+nMhf X-Received: by 2002:aa7:d84b:: with SMTP id f11mr18627450eds.149.1617992431976; Fri, 09 Apr 2021 11:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617992431; cv=none; d=google.com; s=arc-20160816; b=XtDhYD6DcuBQOGlwgrby/6uOIQ1Qn3qNhnqlg/oJ9MEZG3hkXU2rcLnw4fppr7NZhZ B7ehtZqasqcGwZ7jsC6ejnOfZeVTtRyX0Qsg+x3dpe2KT32ZsKECiqfg3GwFKHzPzKhk GoDYy/JQ23HzeKtYUuNK203RJHSkAk5DQzBSJHIuaos6y+KQUglq6mGiSQj8YUmgWzbi x5nf7MyVa23tYGeL6jRcVWk/EM/D6KHn8KPJlvWgWK96Wt/jdf+10dj7UpOo6ybURoNZ n28wyYgM7TFN9b2R3S3j/lRCfma+2TMDOEYadbVQGZd4QAW0ej6X0vvLYYkagP1TnusK nNGQ== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=myZIMiSAI1Mnr2j4cMSt9fkssAvTq+oWXX6MQVA2vl8=; b=JnvIDJSMWjWRcbph24hecU8oklcFei/oVBBvuskkz5Plnb/2LHi0aJyvqRhXLKx0o8 7h+tVaQ+1CmxeodDur+51wKrphb78rjIIva9ZnAEKpqtr6BcF3ZJ5bhJWtoC8ELAV06d IapE33uXUxBUBLJyIOgnJzEgEpNgubUXDAN4J8GPGcQqnUuJoHFBTd/QASSSkzvdzDwA TR3pzLrg6VLpAklq+VTVpk3nXQA+FG01AlM/m85XUzLXQZ84EfIoh30uJbpewVNEFlx5 AY0Ss0V/Ff/UXOKg6MKyXFpkbwFjB8yUlxE2qP9M+KWeQQYA0fMjpNrLhzh2fQXg4suc RP4g== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si2732012edz.154.2021.04.09.11.20.08; Fri, 09 Apr 2021 11:20:31 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234416AbhDIST2 (ORCPT + 99 others); Fri, 9 Apr 2021 14:19:28 -0400 Received: from mga07.intel.com ([134.134.136.100]:52189 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233332AbhDIST1 (ORCPT ); Fri, 9 Apr 2021 14:19:27 -0400 IronPort-SDR: uccLVigrcXuCYjf1I0geCDTAp1/Pgd3GwyhEW1RfsN6DO5AYAEOn3JcRDrcp/I3/j/Q6YF3PMv 43G4EP1Id26A== X-IronPort-AV: E=McAfee;i="6000,8403,9949"; a="257799132" X-IronPort-AV: E=Sophos;i="5.82,210,1613462400"; d="scan'208";a="257799132" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 11:19:13 -0700 IronPort-SDR: /I9COsxklnbf4TuqSKo0lJiwczd1QgJu1XMilTIe5g9PxIJEOOJz8R2W2dXE/XZO3zTymbGNXP v93v85mHJ7vA== X-IronPort-AV: E=Sophos;i="5.82,210,1613462400"; d="scan'208";a="520362034" Received: from umangdes-mobl.amr.corp.intel.com ([10.212.128.208]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 11:19:12 -0700 Message-ID: <4079bb49a9c0022603abeffcdaec32208f449e51.camel@linux.intel.com> Subject: Re: [PATCH] HID: hid-sensor-custom: remove useless variable From: Srinivas Pandruvada To: Jiapeng Chong , jikos@kernel.org Cc: jic23@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 09 Apr 2021 11:19:12 -0700 In-Reply-To: <1617952508-47150-1-git-send-email-jiapeng.chong@linux.alibaba.com> References: <1617952508-47150-1-git-send-email-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; >