From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796192472; b=lKpBrFaXSr5xLzYIcw+pO+/nUhdpLmDiO7LwPc3bMi3oawTLUL9A52hYvkfxWDG93xpB 7QYH92ri40CZZleaC3/fAFSHNlvr5Q1w3hWUDe8VF2UXobQP8ySpWaR5LYQ8s3aRLMDp6 xB5J7GgpKKnoyqVhifb+Flgw5GB2hA732Z9jRjg2BC8//SKYCjqJgBJGgvr5qvO21eYgL l4yVsDLyMAGeoINSWphgui9z67stcitWD7hTsrWpsVuo5brIk7VE8JUDCGc3viq70Z121 AfeU5IUD8VfxHYxwBwT4oFwNwYpLIOXOuOeWQXPpXxr3VkHO3UELPEq5qkJNfCuz2cg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796192472; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=XtEva68IEmuobQxqvBhZDPFL5G+IMShWYlRkl57IhDg=; b=vztXAeouzrstOuytd54vNaEnHGHspwVyfMQxKOSCSXu9B1GiNicN2CKgbW6HZIWzMJEy C+EF+CO2PFG8n3AryYSQruK78ZtiiKWonAltrrnVAx3vowAH1Hk1/4oDPgaqUhmr+c62w qIKGWDO5DuyLi2MgaQH0C0EN7oYfo5MuQRqlsikbshoKd9u1upfsJZrMl1YnQdspydElY zHK3B4THqRZTvAE9s6suacFn70Oy9Tpz9GGytPMfjQE8KCZvS8XQHZO/0BmA4yp9HOziA erPwMaAIgRc3km1j78aI7bJDJcUzKqq7nI2d4fzEwU8JVTEzyGZ+1sa5EX2LQX+hw0Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VA9hJSHk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5DC8606A31A; Wed, 2 Dec 2026 06:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VA9hJSHk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5275E1F00893; Wed, 2 Dec 2026 06:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796192472; bh=XtEva68IEmuobQxqvBhZDPFL5G+IMShWYlRkl57IhDg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=VA9hJSHk1g95xMRn9Q6eTY9atN7qM3c2BKXDkdGkZhclrVqfYXbAzXzwngkuVS54K aKsTBa3ko5xKfZGHSNAyKZBENGC/B1SPtRZpOkHgbG83ZW5Brp70Ap3m+CZj3vIdMT hF2JqOKFHMvTMoM2BTY7Tgf4tavEBIh7lKejN4UfuQDZErf2IrpQHPwLLO7SBNj907 BwD8uj8TK5rmGsCh/qiJz8MEvJYpkYvGs0faiXAu8cVjITo8iBLJu1sz98e4zBhKTZ +TWk8Lq0l7DJrMFkt4iPO4Fct4XR9YNIcktgurxQSf/2vEReTTQaGtgBUUM/TAArMX WJ9cIh3nGqy7w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 7/7] Input: novatek-nvt-ts - add no-flash firmware download Reply-To: sashiko-reviews@lists.linux.dev To: "Qianhui Xu" Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com In-Reply-To: <20261202061414.548247-7-xiaqinghuan@mail.ustc.edu.cn> References: <20261202061414.548247-1-xiaqinghuan@mail.ustc.edu.cn> <20261202061414.548247-7-xiaqinghuan@mail.ustc.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 06:21:11 +0000 X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] Input: novatek-nvt-ts - define and init __free() xfer in nvt_ts_fw_upload() -- commit 37d2804e1f12997c5e5c4cc59ef2a593b658cd11 Author: Qianhui Xu Input: novatek-nvt-ts - add no-flash firmware download This commit adds host-side SRAM firmware upload support for Novatek touchscreen controllers without on-board flash. > diff --git a/drivers/input/touchscreen/novatek-nvt-ts-core.c b/drivers/in= put/touchscreen/novatek-nvt-ts-core.c > index 89e7f1eaf39c9..fb03ef3202622 100644 > --- a/drivers/input/touchscreen/novatek-nvt-ts-core.c > +++ b/drivers/input/touchscreen/novatek-nvt-ts-core.c [ ... ] > @@ -160,6 +168,505 @@ static irqreturn_t nvt_ts_irq(int irq, void *dev_id) [ ... ] > +static int nvt_ts_fw_upload(struct nvt_ts_data *data, > + const struct firmware *fw) > +{ > + u8 *xfer __free(kfree) =3D NULL; > + struct nvt_ts_fw_partition partitions[NVT_TS_FW_MAX_PARTITIONS] =3D {}; > + unsigned int num_partitions, i; > + u8 reset_done[7] =3D { NVT_TS_FW_EVENT_RESET_DONE | BIT(7) }; > + u8 host_cmd[] =3D { NVT_TS_FW_EVENT_HOST_CMD | BIT(7), 0xae, 0 }; > + bool cascade; > + int error; > + > + error =3D nvt_ts_fw_parse(fw, partitions, &num_partitions, &cascade); > + if (error) > + return error; > + > + xfer =3D kmalloc(NVT_TS_FW_XFER_LEN + 1, GFP_KERNEL); > + if (!xfer) > + return -ENOMEM; [Severity: Low] This isn't a bug, but cleanup.h conventions prefer defining and initializing __free() variables in a single statement at the allocation site rather than declaring xfer =3D NULL at the top of nvt_ts_fw_upload() and assigning it l= ater: u8 *xfer __free(kfree) =3D kmalloc(NVT_TS_FW_XFER_LEN + 1, GFP_KERNEL); --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202061414.5482= 47-1-xiaqinghuan@mail.ustc.edu.cn?part=3D7