Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp957869pxb; Thu, 12 Nov 2020 23:44:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwg94BpY6oh8aeZdui8Hh9pDcbniAp2CTVXG0H0PvOmMn70YJCv1g5/U02l7VFXVmzMr3NL X-Received: by 2002:a05:6402:b68:: with SMTP id cb8mr1244305edb.198.1605253446594; Thu, 12 Nov 2020 23:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605253446; cv=none; d=google.com; s=arc-20160816; b=dSI8eW0mc8Ay2re3CVMaSlJS39R3ECF+z+8ZmtS1lE2NKG8WCH9j1KfA7xhYbwkBOH saBkA4QV6Sr+LOM+jPj3d5eN8FqQemSXJXNtoPXkVUVW2RQfztwrfeSQNh0FKoZvkrNq aNf3j3xji1HJvQOK0ciSO1QoOTRd8RPQsWWtNfFjkhCtMbdA3EBpIkwmY9UvUzg6rrYF R6b4LHV/0n7jf4WKgRc7CODlQ/3dg4rdng/aOcFagtVqO6fk1jYYUml5Eist2JpcnE7F dY7p79HWqILfI6yOv1uVvG2rEMLRCHVXfHLey2arnWZJmIc3AyNvCyQ/6LJQ32fUFiw3 dRJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fHsx/NcMBm2j9y031ocQ8/B+5AiiNR8Z5txEsFchJ80=; b=b1osuUcV6oqsQ1X/cr2iNtQJ/dKmB9QKvwTOCXsEwLfYLbG9j6A+BteX/CbDR4XnRr WOfia2ukiWaqfsjmD5Ytnz5WBoy0iZKm2GY2icibMnq/rRErrA5RjEv1alvMXIOu7Bih VBqcekV2iusYITaSyklL/y0b9wCx9lwSOzrm2fWJNmXyxryVSQyTydVwFPCrdv1zBwYw NgEiwmzq/nOcjtW8U6otxVNuxIzTMKrjmWa5T5j8IiqLP1Bq0lO5Gl2bmn9VR07t+Xf8 cW5ZeDaSETivI19+z7++EchqGuswUBY3pMjWfPYxlpQhk5zPViXN4rscpaqz1dY7mb2O g2gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=t0pgferC; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si4550722ejf.66.2020.11.12.23.43.43; Thu, 12 Nov 2020 23:44:06 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=t0pgferC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726181AbgKMHmH (ORCPT + 99 others); Fri, 13 Nov 2020 02:42:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgKMHmG (ORCPT ); Fri, 13 Nov 2020 02:42:06 -0500 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A51C0613D1; Thu, 12 Nov 2020 23:42:06 -0800 (PST) Received: by mail-pl1-x641.google.com with SMTP id z1so4158284plo.12; Thu, 12 Nov 2020 23:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=fHsx/NcMBm2j9y031ocQ8/B+5AiiNR8Z5txEsFchJ80=; b=t0pgferCyaNF1Mvbe80gXAC9Lm1sRrFEWfXbDPiNfBp2lUEDBRLsWhZaWgFpz2unpP xBy15gJjsJ1lbaygn5v0EVAywUk39D0rTYdU26Tqx/XzKm7vCTfOW91l28NGFTx5gajW BcWv17nhbADyJ2qVTU2JltOP4l6O6YYVxvfCBei6MjKFtUIRzv/1ytmGRHXNas7G9Vmf 65bGmAjBCKL6Vua0XSJut+3YadLqFnmfGctakAlor3lDehhMRp4sPuNEjgLySusjhcbs j8NkD1gjTBjF/9ig/3zS/13+JSSYXT+l+nAEOrUI29/sWhEaaUdmJYR1qV1Betp31oUm YskA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=fHsx/NcMBm2j9y031ocQ8/B+5AiiNR8Z5txEsFchJ80=; b=ZHmFmV3OT/B5yoUNxFd444+s0M6556f41p7Q8rY8tEU+0tX6AdTrWrcTySJxYz/SeF ZPdnG6574p8qK0FQzq0jhZ776tiHvxMBa1gtMNhasPwSkXKNBi6zM2KQnTOl1ayY/DLS b4J1aRsmnCsWRTlvddYFJeLiuKmrihvVFDuE9a5JPB4znbpOV5Jy2Jtyli4TV4WJQlbY O3t0CJtXIYMQOOVkgBPYvX8I/OTR62JvUEWBbg2oP6Ak2Nzswkf+gZtFJG9mm956Z6oW BP9x507zqZS+1tLIRtmL4iZn4g08WsSGOhKGoqvtC7IK2PAtIu3AEJVxRYbT4i+4FMH+ q4hQ== X-Gm-Message-State: AOAM533ehldoYFB3Wm+T3k/IYfOYI/7s5BrKo6yObMQ//cReYwrD0P0P umVQMV8FRVHMeMeh0e141Bs= X-Received: by 2002:a17:902:a70c:b029:d7:eba5:7874 with SMTP id w12-20020a170902a70cb02900d7eba57874mr1212216plq.9.1605253325705; Thu, 12 Nov 2020 23:42:05 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id w196sm8535175pfd.177.2020.11.12.23.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 23:42:05 -0800 (PST) Date: Thu, 12 Nov 2020 23:42:02 -0800 From: Dmitry Torokhov To: Lee Jones Cc: linux-kernel@vger.kernel.org, Sangwon Jee , Henrik Rydberg , linux-input@vger.kernel.org Subject: Re: [PATCH 06/15] input: touchscreen: melfas_mip4: Remove a bunch of unused variables Message-ID: <20201113074202.GJ356503@dtor-ws> References: <20201112110204.2083435-1-lee.jones@linaro.org> <20201112110204.2083435-7-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201112110204.2083435-7-lee.jones@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 12, 2020 at 11:01:55AM +0000, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/input/touchscreen/melfas_mip4.c: In function ‘mip4_report_touch’: > drivers/input/touchscreen/melfas_mip4.c:474:5: warning: variable ‘size’ set but not used [-Wunused-but-set-variable] > drivers/input/touchscreen/melfas_mip4.c:472:5: warning: variable ‘pressure_stage’ set but not used [-Wunused-but-set-variable] > drivers/input/touchscreen/melfas_mip4.c:469:7: warning: variable ‘palm’ set but not used [-Wunused-but-set-variable] > drivers/input/touchscreen/melfas_mip4.c:468:7: warning: variable ‘hover’ set but not used [-Wunused-but-set-variable] > > Cc: Sangwon Jee > Cc: Dmitry Torokhov > Cc: Henrik Rydberg > Cc: linux-input@vger.kernel.org > Signed-off-by: Lee Jones > --- > drivers/input/touchscreen/melfas_mip4.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c > index f67efdd040b24..9c98759098c7a 100644 > --- a/drivers/input/touchscreen/melfas_mip4.c > +++ b/drivers/input/touchscreen/melfas_mip4.c > @@ -465,13 +465,9 @@ static void mip4_report_keys(struct mip4_ts *ts, u8 *packet) > static void mip4_report_touch(struct mip4_ts *ts, u8 *packet) > { > int id; > - bool hover; > - bool palm; > bool state; > u16 x, y; > - u8 pressure_stage = 0; > u8 pressure; > - u8 size; > u8 touch_major; > u8 touch_minor; > > @@ -480,14 +476,11 @@ static void mip4_report_touch(struct mip4_ts *ts, u8 *packet) > case 1: > /* Touch only */ > state = packet[0] & BIT(7); > - hover = packet[0] & BIT(5); > - palm = packet[0] & BIT(4); No really happy that we'd be losing information about protocol. Is there a better way to suppress the warning while keeping this info? > id = (packet[0] & 0x0F) - 1; > x = ((packet[1] & 0x0F) << 8) | packet[2]; > y = (((packet[1] >> 4) & 0x0F) << 8) | > packet[3]; > pressure = packet[4]; > - size = packet[5]; > if (ts->event_format == 0) { > touch_major = packet[5]; > touch_minor = packet[5]; > @@ -501,14 +494,10 @@ static void mip4_report_touch(struct mip4_ts *ts, u8 *packet) > default: > /* Touch + Force(Pressure) */ > id = (packet[0] & 0x0F) - 1; > - hover = packet[1] & BIT(2); > - palm = packet[1] & BIT(1); > state = packet[1] & BIT(0); > x = ((packet[2] & 0x0F) << 8) | packet[3]; > y = (((packet[2] >> 4) & 0x0F) << 8) | > packet[4]; > - size = packet[6]; > - pressure_stage = (packet[7] & 0xF0) >> 4; > pressure = ((packet[7] & 0x0F) << 8) | > packet[8]; > touch_major = packet[9]; > -- > 2.25.1 > Thanks. -- Dmitry