Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp601161rwi; Fri, 14 Oct 2022 06:25:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cCBhqL9wJUl1MYwXI9kqjfxZYmvsmUEO51FcGBJFJKT2qodJRc66iAseKTAep/WeuqrUz X-Received: by 2002:a17:902:ceca:b0:177:fa1f:4abc with SMTP id d10-20020a170902ceca00b00177fa1f4abcmr5340037plg.99.1665753948894; Fri, 14 Oct 2022 06:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665753948; cv=none; d=google.com; s=arc-20160816; b=IoM1IDLwhcW8PujhAk4pMztirNNKWGK8pADUzBlOGH5BhMTKqyVDAu/sbs0G9ljhKt SXslBUVDkWZNsVyA/ABPAvM/VUZzg2qevlRLiGMu8CvwWJODpOSMQIbXZAEaGRBULmmw wlXF57K3JQGD8/3hy3SwlF0r9fsoN5d4z9WdlQfdbkD2CYMpZilyvqa2r+UymVOkdTsT MLc7lYSgfq00o77i4wGIS3m78qrs/noCpwk0fnu5vBTtJFJ99vN3W85b9Ls2bLQl3MkF CYJTzZkAJcDRSRYXKe1kheWIDVolm+Rg5ihlhfk4nNM6I38FHAXq3i6YJsNKcBcJCmpH 0sMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=Ttfwpv3od4S8wuyU5OU4GrW6tNlN69ASPbVjG9BX2oE=; b=Gzs8i46hJI260MbEPIb614pLdGGhBqIHbk0psuWM0WnwCvaeYqK174ytSHISWp0925 UYxUc8SJtTWAeaqzD6eUlTDBuvtqaP5A0IUqKekm2busDlb3q0SCA5e38cRBHoKFOs8p xdt+j4ZPc8VyJRHoRJFHT3Q0kLKdTAZ+CwCb1tfNG6mZj1U3AxuBJdsMgKC0ZBtSzVTg RE8tG7YyjuOT/lDpovqQGZIQhKOg1VnxaAS20ovAHLc+mEc6Cn6DJpvhbGu0Q/hsVwK7 gKIR7dCTl3vCl1VEiCEo0qZa+HZQZch/xhejbmh8kqg4Iw506yJnD7M7zZRljmkEbO1r Pt0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=s9kOzNpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a654c06000000b00461f6f9b215si2881537pgq.704.2022.10.14.06.25.37; Fri, 14 Oct 2022 06:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=s9kOzNpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbiJNNOO (ORCPT + 99 others); Fri, 14 Oct 2022 09:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiJNNOL (ORCPT ); Fri, 14 Oct 2022 09:14:11 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80EF21CD694 for ; Fri, 14 Oct 2022 06:14:09 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id j7so7527342wrr.3 for ; Fri, 14 Oct 2022 06:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Ttfwpv3od4S8wuyU5OU4GrW6tNlN69ASPbVjG9BX2oE=; b=s9kOzNpa4pwS7IERtn9V6HweVHpclzhghK6AmcLrEl3aonb33oHwFFsOosrJFyS9wn gfdzCLeSmBiMzMz/2JXXCSG9ntYCI0HN+Nyvhg1k86DqweRrYLCFu2Z5hfoAiBaR3pMb F6x+JEtO3Rq3iuP9lk64eXss3GwmNqP24H5dRuK6wXANlzEBpru9GQXYD96RvBs6glm6 g89xDaJ+1AyzjZa0KLEDr3VeKLvVSTRVGE9pbZnpFlPaUULp3DEwJoAgosZE0UdHKBlE bD7tQ57JU1G5kfcJu+3mXS89BDA5V+yMcY62v6s/T6z0azhz/gpwtRMwtsDeUxRJhWrv wT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ttfwpv3od4S8wuyU5OU4GrW6tNlN69ASPbVjG9BX2oE=; b=zD3u4Qj73GEj48zUHrmCaafbjVk5mALZmhAyeisF3kZBI71dhS2dYrl43NNqSL01lY qcuXn41AIu6TSmImcC3cyesH8wUkMbO80eUk4GRCSqxwyFN488NTFU6sgMhUsDXwS1LC a74XnvB76agm5QXh1UzdRT2tANNzaD5qql/pl/uv7oFMuwZTzIYGvcAdqdoFp098Z15/ OeqNR55HapHQtClMmJmq8wBCpRM3NgC+wXc7ZACHWPymzt/Omu0xNYtnayLnJ68Nzi8I KLmenWQCYbQ2MjH+FLbgIYdlvsRONv35I+OREatAzyBc8f3cu9VArnlaKEWjitJmInQF PUKg== X-Gm-Message-State: ACrzQf3nMaPvzM7tjsDuze/PuZ1FnJJC1RyUKRTvesBSOR0Udd9pzdBn WNgCpDJFHnCxuE005OZWdS0KPg== X-Received: by 2002:adf:e549:0:b0:22d:b410:d0ed with SMTP id z9-20020adfe549000000b0022db410d0edmr3518701wrm.633.1665753247976; Fri, 14 Oct 2022 06:14:07 -0700 (PDT) Received: from localhost ([2a01:cb19:8ae2:e700:f916:30c4:a44d:8229]) by smtp.gmail.com with ESMTPSA id m18-20020a056000009200b0022e0580b7a9sm1915765wrx.17.2022.10.14.06.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 06:14:07 -0700 (PDT) From: Mattijs Korpershoek To: Eirin Nya , linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eirin Nya Subject: Re: [PATCH V2 2/3] Input: elantech - Remove redundant field elantech_data::width In-Reply-To: <20221014111533.908-3-nyanpasu256@gmail.com> References: <20221014111533.908-1-nyanpasu256@gmail.com> <20221014111533.908-3-nyanpasu256@gmail.com> Date: Fri, 14 Oct 2022 15:14:06 +0200 Message-ID: <87o7uezgwx.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 14, 2022 at 04:15, Eirin Nya wrote: > elantech_data::width is copied from elantech_device_info::width, and > neither is mutated after initialization. So remove the redundant > variable to prevent future bugs. > > Signed-off-by: Eirin Nya Same remark as for patch v2 1/3: I already reviewed v1. Reviewed-by: Mattijs Korpershoek > --- > drivers/input/mouse/elantech.c | 4 +--- > drivers/input/mouse/elantech.h | 1 - > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c > index 79e31611fc..263779c031 100644 > --- a/drivers/input/mouse/elantech.c > +++ b/drivers/input/mouse/elantech.c > @@ -691,7 +691,7 @@ static void process_packet_head_v4(struct psmouse *psmouse) > input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[id].x); > input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[id].y); > input_report_abs(dev, ABS_MT_PRESSURE, pres); > - input_report_abs(dev, ABS_MT_TOUCH_MAJOR, traces * etd->width); > + input_report_abs(dev, ABS_MT_TOUCH_MAJOR, traces * etd->info.width); > /* report this for backwards compatibility */ > input_report_abs(dev, ABS_TOOL_WIDTH, traces); > > @@ -1253,8 +1253,6 @@ static int elantech_set_input_params(struct psmouse *psmouse) > input_abs_set_res(dev, ABS_MT_POSITION_Y, info->y_res); > } > > - etd->width = width; > - > return 0; > } > > diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h > index 1ec004f72d..fb093134ea 100644 > --- a/drivers/input/mouse/elantech.h > +++ b/drivers/input/mouse/elantech.h > @@ -180,7 +180,6 @@ struct elantech_data { > unsigned char reg_25; > unsigned char reg_26; > unsigned int single_finger_reports; > - unsigned int width; > struct finger_pos mt[ETP_MAX_FINGERS]; > unsigned char parity[256]; > struct elantech_device_info info; > -- > 2.38.0