From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 15A1B399357 for ; Tue, 30 Jun 2026 09:24:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782811448; cv=none; b=GkdqFS7C48WIcIphi9GL7AdLoNDuqVkuvnGTi+kauYOa29H/f1gXT/NiXDgypPvdmFtKrQ9Xkr2casWQM9tqWsK04nCq93E2RGGB7CB1wkcS2YpMPH+Vf9iooivjcQxcBak52alyzYY9hYB6b8uj+UHgPXhsoHPikbbTp4dRrQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782811448; c=relaxed/simple; bh=vQmlncBgpZXgJ2+rtSDAE3uDN4wo7uvxKUh8NSjfBEQ=; h=From:To:Cc:Subject:Date:Message-Id; b=ikQo9KiES4IwD46UWY/kk7+9qt8s3q9jte/haiCdhAwN7AJCznwfsmYBvw3kl9nFiRrkKd7snrpaKp9R6jsh+rD7TY17zwuWFkmLQmRg18upAWKJUiFFC/cDzzFzX4fRsuLPcvlJOF2NFwSyu8k+f3LfVnlacktZU9ca1AmtnI8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IsRA3evO; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IsRA3evO" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-39adb9a103aso32305711fa.3 for ; Tue, 30 Jun 2026 02:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782811444; x=1783416244; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+ngYGg1FEecUGzgi3MiQAu/RxjANLiVMvP33dsrgU98=; b=IsRA3evOpH/iduz7W/WCUxP6vMvmqLCjWqCu6frAMshykkY2aXlBT5ufNSYRcHAYwy pxti9oRB1m7IQi8UqyuUsGIvn2rbB3S+Bm0ayIl/5xmzkzRU1adnGdxg7wlh5wh7tOUR jyuo5c5T1BayV4gYb99V6C4BAJBC97BD94W4p6x2o9POsNwRCSsgg7laDU30bYmBphgm vl3eJ5oeiiDbdrFso5rTVJpOIURNoD3rax0lTFxmQ3qYWi5TIpTtPvr7i4WU+i3gyH7z 2ZoIKC04rW/EfWBuViRG57vkUmFn1G/kYeY7FfFuY0Z7/m49KezZmj4W/5zlIq6DoU6J 7XuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782811444; x=1783416244; h=message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+ngYGg1FEecUGzgi3MiQAu/RxjANLiVMvP33dsrgU98=; b=lmitS3wv/EOQjUksqWilRKMNzCmxPy6ectiXWTyBqVlQCr4fObWhNIIBToM4nzCPc1 kIb8BIlvr2Z+Ekkszi+nJ5vq/BjSLtspog13eWmH4uIvZ9tgJwifbmHAatBxk4r+LE1J cHwJTMSxyQGxYZGqZP3DeyeN82aTWXz3OfhemDMXz+aw+8ULtGn4zYA7KJ1fHpWEahdn maXMN7syYocPA8rZaNe8GubHHVolUGYqfQkKQF0hK8npKoS5fY1MDM+/K2oMWlHX/UcQ iG4BbmPEWqVi2WatTqF6I3gdCmmim7NsLstbebvogimvtnxfGOaZJW2S8tQMLdoIFAaT jH1Q== X-Forwarded-Encrypted: i=1; AHgh+RqXTHA3g5A6jFm7JSq8vVXoHZedT70zf4/6jiZlp/xs9XAp+e7tgVeXXmDF5B0Qs6Yf6RqHhbsixtyMGyY=@vger.kernel.org X-Gm-Message-State: AOJu0YztrGAwnGNA3foNOsTohN7QI1kQnG4StKlMMpjbW9/ejxA2pmyL 7o8ImZ4Q7vSBrrSz3sUXJqYzRiAYCdMnUpL6msk0j5HQcAUggJCuxYqIrsqDDv98 X-Gm-Gg: AfdE7ckuJxMgJJGi/ZgYPcS9krn5fSnXzpS0yz1p/S1ipxbHjfyJerVWuayiTQLoYaR 0nWuvwfGkY/ociI2j7ZY58SnL4iV7Pxzz7WOum7bq3U911L2TDGvZK8mTDXaETajOEOGCE0HcnS FEkwtxigFAPEjCcWECdRoPB2ue4m8DsexvchZzm7+eWYv7nXyhvUU+WQE7JZGpkmQ0kxVvHAdnJ beEdkctGPZh1fpxlhBJ7Y+qlKexaE6ThaN7cOg401w2ZGbQ710IVxNqw8cz2aeax4kIfw3NZCj3 DzwWfjORRhUgkOq4cY7XriCKH2su5b8xePtj84f57KtW3Sc5fzCA2DIZsqrxGQwg72IW3fOj0hq srtN5vRu+EJsPFvMOdrU1vLzJ4iCONuOOzTDYK0hWeR1F3qipxLRYAl+/jxeF2iEchh5c+gTpri 6ndZx0wmv2Gus8CZoH/pS5VJDSilxjumC495V5EHIX X-Received: by 2002:a05:6512:8353:b0:5ae:b7bc:27a7 with SMTP id 2adb3069b0e04-5aebdb61a5amr371846e87.6.1782811443940; Tue, 30 Jun 2026 02:24:03 -0700 (PDT) Received: from localhost (c-85-228-45-68.bbcust.telenor.se. [85.228.45.68]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-39b1d81db24sm4177221fa.6.2026.06.30.02.24.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jun 2026 02:24:03 -0700 (PDT) From: Eli Billauer To: gregkh@linuxfoundation.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, Eli Billauer Subject: [PATCH 0/7] char: xillybus: Harden driver and improve code quality Date: Tue, 30 Jun 2026 11:23:23 +0200 Message-Id: <20260630092330.43534-1-eli.billauer@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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. Thanks & regards, Eli Eli Billauer (7): char: xillybus: Improve control of execution flow with mutexes char: xillybus: Remove duplicate error path code char: xillybus: Avoid possible bandwidth inefficiency char: xillybus: Use unsigned arithmetic for jiffies differences char: xillybus: Integer arithmetic improvements char: xillybus: Add defensive sanity checks char: xillybus: Ignore and report unsolicited interrupts drivers/char/xillybus/xillybus.h | 3 + drivers/char/xillybus/xillybus_class.c | 11 +++ drivers/char/xillybus/xillybus_class.h | 4 + drivers/char/xillybus/xillybus_core.c | 100 ++++++++++++++++++++++--- drivers/char/xillybus/xillybus_of.c | 6 ++ drivers/char/xillybus/xillyusb.c | 62 +++++++++++---- 6 files changed, 160 insertions(+), 26 deletions(-) -- 2.34.1