From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB14731326B for ; Fri, 17 Jul 2026 14:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784297053; cv=none; b=gOCm/gRj72nX1ONnl9Hnp5O0x0DXq6VfKsahZYSloFeuDO80iPCs8zeIcAKBb7FWIvVqHQ9rpTpwn4UG1M+v92g4Eqt1xf3+evdh4qIqceK/Bs14OG9sVwYRO1KKypN4Q/bxYKjJdWv2KR/LSxEPfp7AQbTXBevI8hBfW3A/pOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784297053; c=relaxed/simple; bh=LmIrGU7xoBY4Xe9j2p1DxTU4lvaFDuDx1SAW1xu+kW8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nRxN2up3kP5txUhLTtOn9Su41ZmZGZsG2Un4lAJjdJUpvcsLd4WFXjx+LVxba9GYU6pyBBKfihkCCAON74MBBvflY0MjUCccFUl0oRSIWCR9zkrLwXaVmQYVCOoHmlIKwfOXTb/LdaKYbjtduoH8tYdaFO8DxijKN9PQDC4tNBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OrzenArn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OrzenArn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFDBA1F00A3A; Fri, 17 Jul 2026 14:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784297052; bh=oNt5u9YqTqcCQf8LdvYkbEPlXWcE00sxroPPYjn91w0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OrzenArnlJwjrqR5rdP2Fw3l8fQ1R4i6LKC8KMsYcXgilp5b403xnvU88BRoIPeJY RqbWn/YlNdMxlRzrNl52DPVkQz+5NFwc+O80+VkKkzcZnnvXiwpF3cNHQLoF2vLeVY mH1JVH6iLq/i8i15pRnAHFiAGoxaEdpqBZPkOUiE= Date: Fri, 17 Jul 2026 16:04:04 +0200 From: Greg KH To: Eli Billauer Cc: arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] char: xillybus: Harden driver and improve code quality Message-ID: <2026071734-undertake-train-f9f6@gregkh> References: <20260630092330.43534-1-eli.billauer@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: <20260630092330.43534-1-eli.billauer@gmail.com> On Tue, Jun 30, 2026 at 11:23:23AM +0200, Eli Billauer wrote: > This patch set consists of several boundary and sanity checks, gaining > better control of execution flow and fixing minor coding issues. No > difference is expected in the driver's behavior under normal conditions, > except for one change that might improve bandwidth performance > marginally. > > Why all of the sudden? These patches are the result of a comprehensive > AI-assisted code review, using Deepseek, Kimi Thinking K2.6, ChatGPT, > and Claude Sonnet 4.6 as plain prompt tools. > > I've spent three weeks in what I call a "reverse rubber duck" session, > asking these LLMs to find bugs in the code and following up on different > leads, the vast majority of which turned out to be no more than quack. > Occasionally the points made by AI were valid, and in others, the mere > effort to explain why the remark is wrong to the rubber duck led to > finding real issues. > > Almost none of the fixes suggested by AI were even near the actual > corrections in this patch set. I get the following build warning/break when applying these: drivers/char/xillybus/xillybus_class.c:74:7: error: variable 'rc' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 74 | if (i > 99) { | ^~~~~~ drivers/char/xillybus/xillybus_class.c:179:9: note: uninitialized use occurs here 179 | return rc; | ^~ drivers/char/xillybus/xillybus_class.c:74:3: note: remove the 'if' if its condition is always false 74 | if (i > 99) { | ^~~~~~~~~~~~~ 75 | dev_err(dev, "Failed to obtain unique unit name\n"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 | goto fail_obtain; | ~~~~~~~~~~~~~~~~~ 77 | } | ~ drivers/char/xillybus/xillybus_class.c:51:8: note: initialize the variable 'rc' to silence this warning 51 | int rc; | ^ | = 0 1 error generated. Can you fix that up? thanks, greg k-h