Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp963645pxb; Thu, 12 Nov 2020 23:57:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgKFQ51T/tDzYJAJvc9w7C2AGoODf72lTnprQyzyK5ePz2lvd+sMgyBqduZmDwXHEGNcxt X-Received: by 2002:aa7:ce8d:: with SMTP id y13mr1351446edv.65.1605254274508; Thu, 12 Nov 2020 23:57:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605254274; cv=none; d=google.com; s=arc-20160816; b=XorWddJmgRABttodD020Ua0U/F0dl+bSrm4fqshh3jAok3cNVFvwsD65oM3HXLMQ3o KuDcpaSHAYr+Jos8A088ta5aAEn+rnhjjxW1JQRLe21j1cDpxGtG4WUBt0zvVsRNQVt2 +OwEGw6PI6/IZMYgr9SR+n5PijQGj87/4X7L9lEYe+4UH9q69BPIfpTWyvO+MV4Pe1o7 R/FuLtZ9+4QqcxdwubVOUcMtMSEV9YshKCBVQa44P3IEbtvN/rb++q7QEbvfq4Ju/eov 89L4XG5OXUiDQIuKKjyU+Q1XI/3FKVTuV0DaNV1xxk0xAA86yXpdFyth9GWMG6df7o2G N4Cg== 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=Q1l/HymtP+vc378Y/Np+GkoFHr0gL46JSMprjW5gcHg=; b=qfYB1ZPmZloA4el+kC65puM7jAYVMp7x8Dr15ZJ/Q+OUoJT3laFRCeu7knJZq4vptm orMzlBomi0F77riplt7rO9cajAt7qkrqqvooD1rpuFsCC4nuK0N3PVLYevmO1TWCam34 LI7W5lWAOMwFqJbi4gnEcLfzIah77hzAtsW/wglucOF+pMJDpO4NFumqv86MZJqEuQBb QOtj1VnLcGIn+08TC4nJ8YQ7Sx7fx4wMPSWw3cEFB5tiScHOcMB9zXANZdT9mQkngttG TVgqJkBI8U9pc53oQEBAou9eJxVh+rZkvGE610FsRJbteTtVwJY5Cgbw6kufVgJDmxLe MvOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W6OTiDd6; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j90si5926792edc.189.2020.11.12.23.57.30; Thu, 12 Nov 2020 23:57:54 -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=@linaro.org header.s=google header.b=W6OTiDd6; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbgKMHz3 (ORCPT + 99 others); Fri, 13 Nov 2020 02:55:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgKMHz3 (ORCPT ); Fri, 13 Nov 2020 02:55:29 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D541CC0613D1 for ; Thu, 12 Nov 2020 23:55:28 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id k2so8699134wrx.2 for ; Thu, 12 Nov 2020 23:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Q1l/HymtP+vc378Y/Np+GkoFHr0gL46JSMprjW5gcHg=; b=W6OTiDd6PQVAEvsSyoGRQ8WivxpBsXNlhqoESGt9S5UbeeZozWqO7Qas+JXd92QCV/ 7GktRH+eZUUpsqDkPtT6uSG6pwen3Ms7wRwxSIG4wPoqwAjdb7wF099Jo2GJlros1J7k drlgUDYHbhlilYG2/zQfYKz+RwKHoXCAgrsx/PlWQoDwNt0WnjWokS5CTT69n6C9SEwN DPOp+3YvXUaZi3ENNXQ3cJatpXno5s3HBwcnrPBsGow23gFY+BVLvzjSQ0MMPo6O0+yx c4JOgvAnx1rzlvd20YFQu9FHOhg8ATiOmi+3H4jvSZPEgjcfE8rn9GVPU9IrmBMt5wAy nhBw== 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=Q1l/HymtP+vc378Y/Np+GkoFHr0gL46JSMprjW5gcHg=; b=Qb9aJ+zD/FHJeTbBayHDLkStk1JWsW8okui9ismBRE1qS8wVCvwjdvR3l4Yu8KT+n5 6TiyVSFkwqWYYLCHhLHg2TEy6Se/gkpnmUcn3heIHZCoGLclFAEFni7BV3vbVscrqWvL V3yJs6R7MFAkXewD6cnSwuuA2AITTn5CCrnCewiMPBxXKYFDvrPDLRPAibdzzUMAMfVO upMt79hRHxxbTPX9/jPtl6Dhrw1XkW1/tf72N22VkH8q7iHPoviMwnFTsCSDI0j8i9Xj uamn4dS7iLxlHP2cgk5bLFWgOqd0fbiBHp+D73qF6hfVVlyrPGlc4xJBn6CP0AfXbdpJ gUUA== X-Gm-Message-State: AOAM531GhcZ6xvN14KcI8sD3kp9J6rXHNNnXxvCaRssSLuzhHQJEpdTj dF5aLDfnmxFiZVbVkvzQApUcUg== X-Received: by 2002:a5d:4409:: with SMTP id z9mr1668333wrq.309.1605254127639; Thu, 12 Nov 2020 23:55:27 -0800 (PST) Received: from dell ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id x63sm9825095wmb.48.2020.11.12.23.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 23:55:26 -0800 (PST) Date: Fri, 13 Nov 2020 07:55:25 +0000 From: Lee Jones To: Dmitry Torokhov 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: <20201113075525.GH2787115@dell> References: <20201112110204.2083435-1-lee.jones@linaro.org> <20201112110204.2083435-7-lee.jones@linaro.org> <20201113074202.GJ356503@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201113074202.GJ356503@dtor-ws> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Nov 2020, Dmitry Torokhov wrote: > 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? Yes. We can either convert the information to comments, or mark the variables as __always_unused. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog