Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1706320pxj; Wed, 19 May 2021 11:58:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Adn12aLqG00SSNDmnjUAxIR6JYd0XZGuDxRq+rEJ4axwk2VvgZcuOacMG7HrP1sfsGYd X-Received: by 2002:aa7:db90:: with SMTP id u16mr558300edt.106.1621450731832; Wed, 19 May 2021 11:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621450731; cv=none; d=google.com; s=arc-20160816; b=sNHEZBUMj+pygfbGfbmerqAfb0PVlZAsJIx/8gOUP7hGS3Usha+kc5QcOONiEmV05w ikOMppJZ6qJAVPSWCOaOj2a7E2oTl9mT2dKtorqJ3e1X/NsC+gQolFvVwAFwWuMS6Q24 kc6o5z+t/tDE2sK3JT/anWbfO5Z95RMSKq+Dl3F4zyyxBCJvBi1CPwDzicMtQacMCrq8 ANh3Y3B6yt6Us7i+ngTTCu2yOysZAbBKN6HF71JLN5nEY+UQRWdm3iHB9K6Btdz/Pcy3 vo4nK+Tyc5OiX38EF1A2LThwYVjolNz8lhUFtuj5e60m9femV+w6szk2qAoj7VUP3BRH HP2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DcSZvfOHqi6SAcoCYZ4Cvabmu7+auHGUP/wQyuB1CPc=; b=QSXQ3D3G29bB98lQoBXDTri2w+bYuqZwiYPld2CwJtK9kJnlByRrCnsD14fW3C+83t elL2mfOnXtZPS90yySVoz50z/0C3hncQbF3ENLh5GJp7lQZo1CT2Tswzdnbs7OWk2WyG 2fMB3rT1RUCapOwq6E+n05CIX0v0Xxzh8shIBT6p0jJ6+TyW6wz5OR1HN27+aNyt/5mQ bjQo3SULO1p/FKHKgVY9b6Q0k4Wy/uaX1z4g0DJ2be6WZIcai3NX9fvFwF7vzH32w9W5 99+/ysVL96BgOan3CTtV+6ehVrZnFH1UIoY+4a6QzGTu4JGHkVV0l8qAWqqCaPcVMX4/ 5wjg== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si87436edk.255.2021.05.19.11.58.27; Wed, 19 May 2021 11:58:51 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbhESBIm (ORCPT + 99 others); Tue, 18 May 2021 21:08:42 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4738 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbhESBIl (ORCPT ); Tue, 18 May 2021 21:08:41 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FlF4N1TlnzqVSS; Wed, 19 May 2021 09:03:48 +0800 (CST) Received: from dggpemm500004.china.huawei.com (7.185.36.219) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 09:07:17 +0800 Received: from [10.174.177.91] (10.174.177.91) by dggpemm500004.china.huawei.com (7.185.36.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 09:07:16 +0800 Subject: =?UTF-8?Q?Re=3a_=5bPATCH_-next_v2=5d_staging=3a_comedi=3a_Remove_un?= =?UTF-8?Q?used_variable_=e2=80=98min=5ffull=5fscale=e2=80=99_and_function_?= =?UTF-8?B?J2dldF9taW5fZnVsbF9zY2FsZXMn?= To: Ian Abbott , CC: , , References: <20210514085214.53941-1-cuibixuan@huawei.com> <517e8f75-3faa-b564-5252-d5a3812f15f9@mev.co.uk> From: Bixuan Cui Message-ID: Date: Wed, 19 May 2021 09:07:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <517e8f75-3faa-b564-5252-d5a3812f15f9@mev.co.uk> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.91] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500004.china.huawei.com (7.185.36.219) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/5/17 17:44, Ian Abbott wrote: > On 14/05/2021 09:52, Bixuan Cui wrote: >> The variable ‘min_full_scale’ and function 'get_min_full_scales' are >> not used, So delete them. >> >> Signed-off-by: Bixuan Cui >> --- >> Changes from v2: >> * Delete function 'get_min_full_scales' >> >>   drivers/comedi/drivers/jr3_pci.c | 15 --------------- >>   1 file changed, 15 deletions(-) >> >> diff --git a/drivers/comedi/drivers/jr3_pci.c b/drivers/comedi/drivers/jr3_pci.c >> index 7a02c4fa3cda..f963080dd61f 100644 >> --- a/drivers/comedi/drivers/jr3_pci.c >> +++ b/drivers/comedi/drivers/jr3_pci.c >> @@ -186,19 +186,6 @@ static void set_full_scales(struct jr3_sensor __iomem *sensor, >>       set_s16(&sensor->command_word0, 0x0a00); >>   } >>   -static struct six_axis_t get_min_full_scales(struct jr3_sensor __iomem *sensor) >> -{ >> -    struct six_axis_t result; >> - >> -    result.fx = get_s16(&sensor->min_full_scale.fx); >> -    result.fy = get_s16(&sensor->min_full_scale.fy); >> -    result.fz = get_s16(&sensor->min_full_scale.fz); >> -    result.mx = get_s16(&sensor->min_full_scale.mx); >> -    result.my = get_s16(&sensor->min_full_scale.my); >> -    result.mz = get_s16(&sensor->min_full_scale.mz); >> -    return result; >> -} >> - >>   static struct six_axis_t get_max_full_scales(struct jr3_sensor __iomem *sensor) >>   { >>       struct six_axis_t result; >> @@ -504,10 +491,8 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s) >>               result = poll_delay_min_max(20, 100); >>           } else { >>               /* Set full scale */ >> -            struct six_axis_t min_full_scale; >>               struct six_axis_t max_full_scale; >>   -            min_full_scale = get_min_full_scales(sensor); >>               max_full_scale = get_max_full_scales(sensor); >>               set_full_scales(sensor, max_full_scale); >>   > > I'm pretty sure this is OK.  The min_full_scale registers are just informational.  The driver used to print the values, but not since commit a1d16659538a ("staging: comedi: jr3_pci: remove noisy printk") so this code is now redundant. Thanks for your reply. Thanks Bixuan Cui > > Reviewed-by: Ian Abbott >