From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A316389DE3 for ; Mon, 2 Mar 2026 09:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772443581; cv=none; b=GUStCDd3L7AdsAwwWPLjsW387i2XDoLN+gENBEnoarHC3miupHLRHntEbG2P8fnlvus77HKf8PxEDAk83TWVJrNKWaDstIKudQLQw7l15Jdwpfmv8rWEm46pcNH+Zps/czt8WVqOhxXPN55lkbA10KszS9n1OFo+IicIyzxM/CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772443581; c=relaxed/simple; bh=NvlfqQkFSjiKefhGJg1nl4VUtTSqxowA+e2w6Haf9IU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eOL1uaAZOqrx99fBDUwcIh1QE0OiMjZJUu2mksZqg4oRP4ZRL1YvZboIkvjktb0wucPl5eXkjmTDj3mlTE9PPgVHXXOE22Q+FaYF9DQIZnEApKO2P7sAFNQPDgrFSukWzOl9/s3l+zckpUOyF3od4XH2osmja7/BvtFJj+L8S6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=X6xbHYjB; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X6xbHYjB" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-483703e4b08so36616695e9.1 for ; Mon, 02 Mar 2026 01:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772443578; x=1773048378; darn=vger.kernel.org; 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=8OftFQTV8naufyqWqKOJ13Y+eOJO1ch+XainGBjNPzc=; b=X6xbHYjBBMbIc1HYXMx9KPgwRFm5AuJV8rkuFMkIqLoDh2Gw1Cgy00KJWZcr+B+SVc KVsWvl/mN2wFCh3V9TRcB7pgc8IT0zq0H5Gn03bZKV0/O3U8pOv3532OqwUURkqXsnCv 8Dr0oa6I/dJ4aAuXF5CS/88HWjEdpfGE+jsEsyPjIq/9C4//dqwCW9emdCVovMA+IcTq FEChXHnRZc+qD2U3JAI5zbrnSWmO57dbnfcLcHplbueQEdw8peR9NpDWz1KBO03NGLt5 La/op+yLkPrapNusYiSwrQoScLgda1zw7MkvO0V81SBD4mvbDyTwZH9P4g1jotQXHF6u NOPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772443578; x=1773048378; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8OftFQTV8naufyqWqKOJ13Y+eOJO1ch+XainGBjNPzc=; b=r3mrCGxClbshSwL3M7eZ67O7mihtITmP1RmcyVkkITKzso7NJDm/oWk0lIMk7oBuj9 t0bFkD5KVQDH+eQBXcYf+YAYB76SImRE8jMgNDJHevaAxKn6LQ3fbpUCyzkT9/Lpeuw+ pCjdJIyHaZSFudH2oDZia5xAZ+eDbzFACbI1ipta7Fum69HnEzLz9pXnTaHPApgCq6bd CS9csfqvjPWVGFvFcA7aKp0RviVDGteeXt+2/oRDx2jVDPVgNYDU4MKkpm/fHJU07d1G ltRiapa4Ju9aLtdRTj3gCwygWvYewqgDv0zj7uSNJhSmgyN4trxgXuCJMMsz4O2eFhL7 lXvg== X-Forwarded-Encrypted: i=1; AJvYcCVbHlXsHJQuqL+g/bvItfpahvv5p4Iht5sBTVem6EYlinq/GS4vsiuMI62uw8/ii3gcHHZePasPOphF2CE=@vger.kernel.org X-Gm-Message-State: AOJu0YymG2RH8PRzJ9stiP7wTL01s1FnJEaq6UeN3J+0SGjN8yMak3JV 7DbLVj2ICjR+4XatCOnmqAyktPO3vP1ujG8tGwIASTDBhts9kpeVx3duoQEZYa1L8U4= X-Gm-Gg: ATEYQzzrtu+DbqyrgAdwxFZySdvo0fEfqwXMdLQTLR/FDwN9si6s3+58NQ9k6EH4iiO JEWoC8cEu3vwjx54nsWJuETAGOBfE9I11Zb7DbpMV1m5aCPirDZJ0Bz7NmS4f6OvjdkZmh5PcNe jZaRkQWkgh4ZRBIg9GAnRN1gtoUKcZvaHY5zuHR8qItLHmTkcxNRvGbFHwT/GRwBTpNLr1FDWly tKQlYiBQ91l7eQMap5RmC/9i47xftgtb01PRm0pKLl0nXqfOwte3g9NMtd26o4AdTHfA6ZKi1Dy l05c+hA+cBQ8D6uAMDh56azpB9Mqr/+0CPb9cMteXeSgEDmBloH0m+v1U8dCvnjpbl7+jmKui18 VISZeodvsSOVKIqNpXcO1Ud6EYQ2Nur2LuUSeRaF4mIg1wqgjg3/A+BijJzK1MfBVF3sBtFAWqS DansfIogmd1XrGQCMdYmNaR193dt+q/Pa8E6lZjwU= X-Received: by 2002:a05:600c:c8c:b0:479:1348:c63e with SMTP id 5b1f17b1804b1-483c992e3a4mr187337525e9.9.1772443577584; Mon, 02 Mar 2026 01:26:17 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439b0549600sm11507548f8f.35.2026.03.02.01.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 01:26:17 -0800 (PST) Date: Mon, 2 Mar 2026 12:26:13 +0300 From: Dan Carpenter To: Soham Kute Cc: marvin24@gmx.de, gregkh@linuxfoundation.org, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: nvec: kbd: use -EINVAL instead of -1 Message-ID: References: <20260228202008.40063-1-officialsohamkute@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260228202008.40063-1-officialsohamkute@gmail.com> On Sun, Mar 01, 2026 at 01:50:08AM +0530, Soham Kute wrote: > Return proper error code -EINVAL instead of -1 when > the event type or code is not supported. > > Signed-off-by: Soham Kute > --- Could you do some analysis to see if this affects runtime? You'll need to review the callers to see what they do with error codes. In this case they ignore them. One thing which could help would be to build the Smatch cross function DB. But it takes a long time so do it overnight. https://github.com/error27/smatch https://github.com/error27/smatch/blob/master/Documentation/smatch.rst cd ~/path/to/kernel_dir ~/path/to/smatch_dir/smatch_scripts/build_kernel_data.sh $ ~/progs/smatch/devel/smatch_data/db/smdb.py nvec_kbd_event | grep INTER drivers/input/input.c | input_event_dispose | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) drivers/hid/hid-holtek-kbd.c | holtek_kbd_input_event | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int) $ regards, dan carpenter