From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 1174C262D0B for ; Mon, 19 Jan 2026 08:25:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768811117; cv=none; b=eiLIweOFEZd00ZNi584B77D8ACpH39OP7ujup386Kj85hfg99D0dmsq/poto4VZch2oV3+D7cbqyixcAqsQpbTzo9D0+onvw5RD0WRnAZ5mI37sN5XFxLW6Zlfz/V6wWEBF0r/85HWLVgfTiW+g/1jkkNj3DOt0EI4dq8TpNiSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768811117; c=relaxed/simple; bh=7m8P2wh/P9RY7ZoVYLQR1DZib4nrIObZwm4pNZaAk9U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e3Ggmd2ihsIisDFLbKeMtohv3Fb6OHDhkRddmpDa2X1F3Jofrg3KjjIxE+bsLgSIATGMPQrValm2SJxQv4Dqk5T9obnIzI4z4O3NGepiO6vRrweRlZzj4f74HA2O716GSTDHwKZEvnS59nansDPEjGyJ+U1eDnsdcjLuIP3sE9o= 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=n1c9n7UU; arc=none smtp.client-ip=209.85.221.47 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="n1c9n7UU" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-42fb03c3cf2so2662467f8f.1 for ; Mon, 19 Jan 2026 00:25:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768811113; x=1769415913; 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=xYlZMJRmsbfaAH3MOcEttTmTmpnZhQSQBkmuE4OWNuI=; b=n1c9n7UUauYprYllb3e7eaeWaXThr7++/3yAaXoQVUPJ3mbKl7zwIwRjoxr2932G7n 3XxbNewrnBZtsVfqu142KP+KFM2ZjDhE+kIlcw5Bvt/GAmvTVuve8tNa/KB0UKD0AsOE zStFc7lV6CiF4ufewXT4itvljfEYL7V4AC9hBRMlb7fEMVJqGxH4VyS0OaZQbc8ZCTJB I+rb55l3wJf+sMJYV0C1YxtLnFF/7g2zFRvx4y0J5lnoKvD3gk893cnd0EHPQ9CJ1Thi f4PBcvvryvez7Tmi0OPaIRLcYYCb/ptZxkVE6oFeYTt69Mc7lE5cDdgbzn3lYDw4jXzT e6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768811113; x=1769415913; 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=xYlZMJRmsbfaAH3MOcEttTmTmpnZhQSQBkmuE4OWNuI=; b=QDg1GK2z0GUrxsdw2zVTdaEe1jkEWkCH/E2o3ICnMWFukMB6N5VFygwW3PLg2XgwdQ WI4we8sz4LBNuQfXqY+74uLCzLetFnTh3puDPEojJsivqNGdiH0HPxfCH9Uyl2fpjo+Z m9Be1W4eOmUiKDLeiIPngCaX/MTqSg2QxR+mheZ36xwNCaEP9NMY0HXTPdLdfNRIDdkF lc/lVCAWzRxDqLeXNC6UBxqC6bNdCDhn09IyA4Zbm4qI0obNZYonv+yCXcIhyUz9fbFY EJnn0yZenmigH063vLAWNmG4szwx/4eJ9IdCRELl/M/bjHmymixNID461iyPNWllHpEu WB3g== X-Forwarded-Encrypted: i=1; AJvYcCXbUWcOJq7GCuhKSlR8fXqE3A7HqD6uhIZfU2ogFElaprQMkyRmObxct2Qwrt7c0O+fyzZdq+sVQhHyKrw=@vger.kernel.org X-Gm-Message-State: AOJu0YwDZmfewfwqtBhrFZWkEXlNgZUhUI/YVLFD5D+ea1rZkTK6o1ro RUBHRexEZwdxyDlCKykCrR37sSjrYl+tDUACn+JX2t1m+oIX9PFNWBhRV8PM2yrTO8c= X-Gm-Gg: AZuq6aJsm5zFJOa+7QOwVOk7qIuRdwWsPqUZfhoam+hBQlKxMRcNbHiTjimOr4cF8Lo Nau1DYO2OL7r8TGLcG5oVjr9i6PWbV6eYTvI8zOTUXsv5o/XP0tXjvqrsPXa+NNcFx5NPysFS+o e9TR+aCVAPSMDDj7VITMI/GvgECQ7Wl01iPuQBEyQLrywp6QX+zmgwq74Lb+nQ6rUTfshKAHs9S 34Th1K65vhtis2XFVfyI0EgLFtTX3ZouI2UHBGEabisaic+4gBCCccTyF+V8gcLLvW9ZEaPEUGu yWCBhZcocdJp7YYRWdeXVJ66tj0ZkHm3+adJ2W+ONzeBKmzleOFWARnkUN840d+Ry3POUjBz8k4 ORZ7nua/NALiQnV0WqVpzsucMw9td/BcE+XT3NQHEItKeqSj4P4y3DViSMVaRp10u0+2cs9a4v8 OdQIGmBtve0kNYTddG X-Received: by 2002:a05:6000:3101:b0:432:4c01:db00 with SMTP id ffacd0b85a97d-4356a031f1cmr15606655f8f.27.1768811113313; Mon, 19 Jan 2026 00:25:13 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435699982aasm22573839f8f.42.2026.01.19.00.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 00:25:12 -0800 (PST) Date: Mon, 19 Jan 2026 11:25:09 +0300 From: Dan Carpenter To: 2023060904@ycu.edu.cn Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, guagua210311@qq.com Subject: Re: [PATCH] [rtl8723bs] Remove unnecessary atomic operations for continual_io_error Message-ID: References: <30BAC49CD5860042+20260119080606.189297-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=us-ascii Content-Disposition: inline In-Reply-To: <30BAC49CD5860042+20260119080606.189297-1-2023060904@ycu.edu.cn> On Mon, Jan 19, 2026 at 04:06:06PM +0800, 2023060904@ycu.edu.cn wrote: > From: Changjun Zheng > > continual_io_error is only accessed in SDIO IO single execution flow, > no multi-thread race condition exists, so atomic operations are redundant. > Change atomic_t to s32 and replace atomic_inc_return/atomic_set with normal ops. 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. What's the motivation for this change? > > Signed-off-by: Changjun Zheng > --- > drivers/staging/rtl8723bs/core/rtw_io.c | 16 ++++++++++++---- > drivers/staging/rtl8723bs/include/drv_types.h | 2 +- > 2 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c > index fe9f94001eed..95d42025807e 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_io.c > +++ b/drivers/staging/rtl8723bs/core/rtw_io.c > @@ -135,11 +135,15 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt > /* > * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR > * @return true: > - * @return false: > + * @return false: > + > + * Note: Original implementation used atomic_inc_return for atomic increment. > + * Reason for change: continual_io_error is only accessed in SDIO IO single execution flow, > + * no race condition, so normal increment is safe (remove redundant atomic operation). The history goes in the commit message not the comments. regards, dan carpenter