Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7357610rwr; Tue, 2 May 2023 13:28:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/16Iy6Q1gxBt6tUmS+Zkmi0Fz30aBA4eJoBt5SPu1+HwdLsaE294GuxdqF9nAPOZHadsL X-Received: by 2002:a05:6a00:23d1:b0:63b:8ddc:2e0c with SMTP id g17-20020a056a0023d100b0063b8ddc2e0cmr25544599pfc.32.1683059293764; Tue, 02 May 2023 13:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683059293; cv=none; d=google.com; s=arc-20160816; b=WfWJudb09tSjzfYByCWa0XQC77ABSWyuclHiRp6BwrBW2oDuckqMbtzT1TbWhoDTyg cSlO1JLdpbCnmmNbyC+lWMTzxOVZPpPsKFq0KtX66N5LndrIXpiMk3KxokiR34syPn4q TCSKf2HL0BfVi15VwUK9IHlwJsTW2DRzpNYbb0yjQMmeszHFtYkrTLvtLhMb00pJR0Hx rvRXf7M+28HBCLQTnnoxoPcloO3MpsXIC3t3FHvNHqww5QYocl95TowByDHtZ5PD6VHd kJZbE/eh7ZgRd4SNpVCLS4T1all6yDOdRoNtXmWJTOt4hC1NJ+YYzZUiic+w9oEEGDLG q/pw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Vfnq1F7sa+Omz1PxdZ4GtiidNe15h03FO7bcBu19cNg=; b=jZpBOvNlIKgNbC16bNo0L3r+eNvemNQSPOYAVZb/6vk58RlxoKi4oSxWrElfzkrKNi H1eE1u8+ZcGHyXR0+pxhZRX6YAXcyEJfr3ezR9oYByXo4FnuweKonX0zycjugsGtgga8 7eSFdnZE9yi3/GZlm8B0pH7dODjGze+rHbZfkI8WN0NsoQ9k82tFzhUwampBN668EQeq T0YuBC2HxfUnHts6T8IiOmsnowWq6nhFvHJT59vDBPBl2XQkHSzxQT8zJCEp5EuGDePe eX3pUn5v8yeQKj0+vm6l1vhj6E8bx5T2Z3gHRWcXxUg3si5y14VX4VbDzliN6nJb6fI9 5MRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=GpjrevYq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020aa7972c000000b0063b8f0a6f51si31037835pfg.117.2023.05.02.13.27.57; Tue, 02 May 2023 13:28:13 -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=@gmail.com header.s=20221208 header.b=GpjrevYq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbjEBUV1 (ORCPT + 99 others); Tue, 2 May 2023 16:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjEBUV0 (ORCPT ); Tue, 2 May 2023 16:21:26 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0332F10FF; Tue, 2 May 2023 13:21:25 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1aaec6f189cso22995915ad.3; Tue, 02 May 2023 13:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683058884; x=1685650884; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Vfnq1F7sa+Omz1PxdZ4GtiidNe15h03FO7bcBu19cNg=; b=GpjrevYqgaVUEmCBXMZgIcajkOQzpx9SkAu6OEoYrXyjmXjfZIG3fayiqAMbCkwaVF JDUr386Rqcg/bOujsqELeczM0TeevY3rguDfH0p0f0mzpxWbeLI9w7LqRfNfmyge7pIO QjhMbOoCXJIZiUtZLfscfCeDEo5eCZATckPz1IsHFGYGdobGX77CNnz186vJ6FnFGpBb zlqJFqSFkeKvfuseYAgMv6k+oxG1bPCopWtPO8ufPnx1S5l76Pke+c/JiW0ro4OBS48K SIgyqYwg6A6IRxrYc99CHcsDTABgmgGVvtF7+0uyDWtmCrcsKKvhlVv6WYr7RL9uE4DE OwFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683058884; x=1685650884; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Vfnq1F7sa+Omz1PxdZ4GtiidNe15h03FO7bcBu19cNg=; b=Az/A0nB3apiZHBJgcmgxeuUqBeMBCau48Mw7/E6ALxIo9OkIfk/SCfLcw7+QHEzmDE oC3qNLvx7yjy2eDnrCdhDhO7kLpdnBgp3i88KKqmO6X7vKw17mpts8DUBDjwAiguQxWt 5zqaOEK4DNOo+S0ngvZ2YxKHjYKk5wGL4PiXvJrEgGTqiNJNSJ24QnAAFnWE4RxSMcOt /AKE6fHN2Q+UKNYHVAkeFSCNcQxzoLeej/PGimtVrBtqPxWJ6nR0I7O8Sodx697Z4zJb aUdqlpbO038LcHgG+CsioKy2ARBxGDssYIFFJK6YsPvnoFyT4NZV0mzvZbaEJaWSSqE8 oCoA== X-Gm-Message-State: AC+VfDxpjQ4HUSigghQ7AKGtwZ60xVax/G60855MvN2qsPIYBgKWqrDV vTUqXB7edWNRrrPrFsTiWPZ6cPhL3c4= X-Received: by 2002:a17:902:9347:b0:1a6:e564:6046 with SMTP id g7-20020a170902934700b001a6e5646046mr19044825plp.46.1683058884107; Tue, 02 May 2023 13:21:24 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:6edf:1ae0:55be:72db]) by smtp.gmail.com with ESMTPSA id g12-20020a170902740c00b001aaf6353736sm4160034pll.80.2023.05.02.13.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 13:21:23 -0700 (PDT) Date: Tue, 2 May 2023 13:21:20 -0700 From: Dmitry Torokhov To: Peter Hutterer Cc: linux-input@vger.kernel.org, Teng Qi , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: avoid calling input_set_abs_val() in the event handling core Message-ID: References: <20230502060531.GA857155@quokka> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230502060531.GA857155@quokka> X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 Tue, May 02, 2023 at 04:05:31PM +1000, Peter Hutterer wrote: > On Mon, May 01, 2023 at 06:01:19PM -0700, Dmitry Torokhov wrote: > > input_abs_set_val() can nominally call input_alloc_absinfo() which may > > allocate memory with GFP_KERNEL flag. This does not happen when > > input_abs_set_val() is called by the input core to set current MT slot when > > handling a new input event, but it trips certain static analyzers. > > > > Rearrange the code to access the relevant structures directly. > > > > Reported-by: Teng Qi > > Signed-off-by: Dmitry Torokhov > > Reviewed-by: Peter Hutterer Thanks for the review. > > If git grep is to be believed, this is the only use of > input_abs_set_val. Maybe removing that function is an option? We generate input_abs_[get|set]_() accessors and setters, and there is a couple of users of input_abs_get_val() in the code, so dropping just input_abs_set_val() is kind of hard. It might be useful elsewhere although I have no idea if anyone is actually using it anywhere... Thanks. -- Dmitry