From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 1B39F43637E for ; Tue, 20 Jan 2026 14:18:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768918710; cv=none; b=qKUfQgyQ/jyhKJH4jcOu2z6avrDKJp9W23jLV+wj7tN80u9j2+HnVSVxK+IPNXHTPVUlL5rD+D539BnNVr+cA5o0ApBwhU6vPlO+Oqm5tHjhwXxkFnJV8tX1G3DTsnK4fbfH+l5k2ybiKvlUAkO2MMbku+E3uLGfkv0a+V/Yck0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768918710; c=relaxed/simple; bh=FAEvE+KY3Bozf0GMzPzVME5634rbvsrm4k5+A0qDzb0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RQjm6ryJAlA60ha1PZFtIxYnFIPA68bSYdHyXgyS8Sou9nu6sOkyFRduwpTEe7ndjOkydSl2IQksL74qqS9IxL2TbBpv2+2gt6LyekhfjbttdRN2MKEYgeR5TyEtFF5Jh5IGErjoYCrY3oODlbxV6ouZ8Yss2QZZkcwmuQSGG1U= 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=PZOCytPY; arc=none smtp.client-ip=209.85.221.54 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="PZOCytPY" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-42fbc305882so3073990f8f.0 for ; Tue, 20 Jan 2026 06:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768918706; x=1769523506; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=AqsKmSOstHprq9CwwYJsoJis5vwZf6zzd2V48Y6mEVY=; b=PZOCytPY/JIcRdWLjRBSUQD6MYDxS8/RmIa6dD2MNZt1/Eqx1Hgmq/IkHoiJdpyJh0 wTYg73o1E0Jt3dwNRRg63hLxlOJ9dbqi7Yf+5DGs5+c70qMED8kQAUEoYJ1hIiAiyWW/ Hnrs/ogwrweRgAZeqgtSgYOku0a7kEZ9DZuoedmHleF+uHyP3rKpMjS6U5hN4ntuNc3y pUxUWTlmSeODQD+WnJHMr/iq32FNB0XvR0H4lH2x2+sF6lEMOXOroOtXwWd9Oemkj6k+ Grc+0JT7UuDu5paI1negZPPhhkFSbnutHf8Hmf9O6mRgKIkUwKerQTGrdLF9QervduWs xNaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768918706; x=1769523506; h=in-reply-to:content-transfer-encoding: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=AqsKmSOstHprq9CwwYJsoJis5vwZf6zzd2V48Y6mEVY=; b=WbeVyUD5gwMtaeTXV/k/92aInLzmlKSvTPoT1Q1Z9eato0WTsqqDB8JrQ1LapYHSta nmgeHtGnPo+A3yd+LIlzOwDbucpO0V+lnxWD6xoUufKeE59KzgpjhL4dSynDpJW/uwcK 3nUzcnQ80vECreuHTeWkeBwPtOb5QX5aBw/oUQ/FK9VTUsP1/xgQi5F+EG1dFmpz4MfA voLQkuq5NiNqV6rxcJFVwAreUco8OnvSOSVFlyYiHa4E0i8LvEQnj6GUHjGqIDz/cxFD L2+5R9PuQLsWsi9Am7BByJjle5EoLKUk0bWOZSkJnMuWrZNOFoSTZ9F8S2qteW1rEWZH vXrg== X-Forwarded-Encrypted: i=1; AJvYcCXHn3zgydWCRLK2ot+1NYvdsPa4qmRueGpCujJsUjkKcUnMRu9d3/2sw0SiLtKgJfF/IdP7zywnoIOK6lw=@vger.kernel.org X-Gm-Message-State: AOJu0YycVB7kH9RmN96EUHn+1F2yyV9Hio3SBPwj/1zv+OCz5yJAiZYm Q1IoSMatYRf4wF7wCDX4SbDf3UQ7sb2ULZnIeG03aR2y9e71R+1e1nLbwrzKf/+gYVg= X-Gm-Gg: AZuq6aKIBWpYlZLx3MKfWKwxOIg2/wR8NNQtsBA9UQPn3qdHIFlqGWg3kD6Sxt0U34D ylA37rswTJmgtbFaeW8OIGxh2NNJNHdO8Fz6pWvawbtr+yHQxyP7U5vK47C2Sjj28JxKdX1W73w MO4voFVu6wihUMG2h0+98peOfTuChp4X/ymbmAVy4+wBTUgQEQm2amNJSqxACNyxuljLwPkKCud Q/kf1/BFeT4WeXE3m9dDWKTVaLboRI2Fz4VUS6DN3ZZ2iIr1wsu6QSDnC5ZEQSus9V4OemEXHHc oeqgT7q2Rsh6W3u8y+fRZVBrcOUeBr0SbxVVwRQPP2mSBVjCvdv92D/BifgsXqLXvYV9I/yZpKM 1eh+eUNouSE2mYg6yBr+J4x1+Y3/14xv0FAwjio3y9eoFLUb8lY5zW8JhTpD7/auIHlEZnACQMG l/OYVQZexGVZb39lW5 X-Received: by 2002:a5d:5d12:0:b0:431:a38:c306 with SMTP id ffacd0b85a97d-43569bc70f4mr17867458f8f.43.1768918706056; Tue, 20 Jan 2026 06:18:26 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43595e0a705sm1472796f8f.14.2026.01.20.06.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 06:18:25 -0800 (PST) Date: Tue, 20 Jan 2026 17:18:22 +0300 From: Dan Carpenter To: 2023060904@ycu.edu.cn Cc: gregkh@linuxfoundation.org, guagua210311@qq.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH] [rtl8723bs] Remove unnecessary atomic operations for continual_io_error Message-ID: References: <641DA44821579DC7+20260120133939.7347-1-2023060904@ycu.edu.cn> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <641DA44821579DC7+20260120133939.7347-1-2023060904@ycu.edu.cn> On Tue, Jan 20, 2026 at 09:39:37PM +0800, 2023060904@ycu.edu.cn wrote: > Hi Dan, > > Thank you for the detailed feedback! I'll address each point below: > > > > So you're saying that sd_read32() can only be called by one thread at a > > time. What sort of locking enforces this? I don't see any at first > > glance, but I also don't want to invest a lot of time into looking for > > it. Please explain it clearly in the commit message so reviewers can > > easily check. > > The single-thread guarantee for SDIO IO functions (sd_read32/sd_write8) comes from two key aspects: > 1. **Linux kernel driver isolation mechanism**: In the Linux kernel, each SDIO device (e.g., the rtl8723bs wireless card) corresponds to an independent driver instance, and the kernel's device model inherently isolates IO requests for different devices. For a single SDIO device, the kernel serializes all IO requests to it — meaning only one IO operation can be processed for the rtl8723bs card at any time, no concurrent requests exist. The AI is saying obvious stuff here. Reviewers are supposed to be familiar with kernel basics. It's a waste of time to show reviewers this paragraph. > 2. **Driver code logic**: Within the rtl8723bs driver, the sd_read32()/sd_write8() functions are only invoked by the driver's dedicated "IO processing thread". The entire IO execution flow is linear: the driver receives an IO request → processes it via sd_read32()/sd_write8() → completes the request before handling the next one. There is no multi-threaded branching that could call these functions concurrently, so race conditions are impossible. > The AI is spouting nonsense. Which function is the "driver's dedicated IO processing thread"? regards, dan carpenter