From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 B0A5434DCFD for ; Mon, 16 Mar 2026 07:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773646935; cv=none; b=il61s5o8298KZELYtxMP27r+vKTlkL7cHSZhoapSvAfJWJGBesNT61B1gpoZlVGVtwTkh2diebn2KEONsfoV8H9eU+d0uoa1+gUzEMrSsu/Is0c36JeDPek9CYEklvauhRbe0D3EdRxeFMZGn16b5A2irEUsy3v7OKPJVPavhWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773646935; c=relaxed/simple; bh=FaAc+B1nYPdrCyBNRnJEU7eDYxSk4ST+r0OhJnpbQyc=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=YW0tQ0Y6hrOSODUE9nQNfi1O8SHMO7jhugMDEzfwq77bYvcli3cpG/T3rxQmsNcTNo50bmfOJxtOng6DWLd3fgpdZSgN8uhdJkDxMEhpihaocWqDFc/u+Qr1xwFSHYTFiYnT9MEVhNgCqFvFf5oVM/0nFGbJ27wCOWvAqBUH5ns= 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=MURoxvI6; arc=none smtp.client-ip=209.85.128.51 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="MURoxvI6" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48374014a77so41777265e9.3 for ; Mon, 16 Mar 2026 00:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773646932; x=1774251732; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=KfdA3fJWYtAoxokNTDaNIvgn8hvi0R/oaJDnwwTowl4=; b=MURoxvI6DeUQVFScIr5NQMyGQAueneKB2rkrWxlqiiHgwCGEd60492AB5pryo+a38g tVXSoovIfyTjGedMgcfnPw/xtrTr0gAAZB3jGAv5ZvGwoKk6Xs4ZfWWRARFf8CPPDfsM +bAFA0eN7JJsZna2VbnaUhvVga9tbFk1X4STVo11acv8lr1Qugf1uAeJN50pHfbE99oo 3AzDXurHZxIf8uKQ4u4AfYoGiVlWC5qLzqfWuDw7Wtv+6j4SZrjrd5fN10of9QD9UtE4 fZVGcsR5Ch73L4rq46/kzoIaKvtLh7z6+EF91NRHP/pmBAlqGoVwDZ2+YCwirjrLz2nT NF6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773646932; x=1774251732; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KfdA3fJWYtAoxokNTDaNIvgn8hvi0R/oaJDnwwTowl4=; b=XqWnoHDgXrV19LdwRmczPjOrAksnXHEZNLqchg2R2gMNi2SLvoCzKVEOlTZSbjW4XJ E3tQA8N8/cWoCoEnyH+y8ScsIThsN2x09SnGGSpjKllA1QT7MDvMyTs2lkW2/+4dH35s GWAD96GmTSrqTxQeJdGeWkpc6TJo02KWGks8eDxNxP6zoamKWHKVV4WtFtwYHeZJ0tHY 8oWM/KlxpkB58PAuAwfeho89L9DzuKcySlP50puVdLmURWrTkQKJybw+xoD1pI2zuIfC 7XccDPGcfuuF9M+UGrW6Wh68Fy147XXp4UocrNhyWLyASCqCrQGY3uZSySZ9CgeHW2eJ 5YpQ== X-Forwarded-Encrypted: i=1; AJvYcCUC6KmwGn2hmArK2/rzY1sc33j0sDBdL2Yia2iEp7Fy/lNcWRV0ReOeoP+qoNymK7vh3pEdA6/MRGNZSoo=@vger.kernel.org X-Gm-Message-State: AOJu0YxPjA/lGMU6qkuxoBt9TekrL4u9nHhCfV7Z60XvDRtyMM8HkSGi VtXfMzGSQtWdJ+7yjLQ8bROjPNMOozI5EyBgFriJj3qjJd0yxdQt2tlK X-Gm-Gg: ATEYQzw9UflJ2WuV0EMGKeRFYJCSOM9rJ5gDN6FODvZ6FsCio4hkufDbXy9X3ITCPpo l+NagX/sftG/bDz/HDplek3CZBSA6jLMU6H8tG3IRqo3I10KgYU95H5R85jx9oYR1N88/KRXKVz i2+LqmxqRlDzcr8E9detu7PnznIXO93tNbU1OgX4OgXORVYUnjb780IDBrSzpSq8KNmtfSbbUcZ DQMSsWRzQFkgQtLfa3aBCWcXiZr/WJam+FGtMaU8WOqKZmTlIy5u4+Pqg+KO2ehWCJasFl3FPS1 cvlfUQZL+rZqtH45/Cn7pY4sUYgbJzQI+Oi6rRlm5q1U97LxzbHC6PpxvlZKgUm/vGmbxfybhGV 8uX2azjl3G/jIjxcpXCBpsdIrE8lLHb7Grs/gV0W5+gNWkNTpd4botS0cC+NtyMSNtoi3l7vMcr Je+MOyHByaQipH8sE9qKiPheXDBxUX X-Received: by 2002:a05:600c:3106:b0:485:3ae3:b394 with SMTP id 5b1f17b1804b1-48556711ec9mr223828535e9.31.1773646931869; Mon, 16 Mar 2026 00:42:11 -0700 (PDT) Received: from [172.18.0.1] ([95.179.249.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541ad1e4esm500719945e9.8.2026.03.16.00.42.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2026 00:42:10 -0700 (PDT) From: OaroraEtimis X-Google-Original-From: OaroraEtimis Message-ID: <495a2eb6-619e-4ad8-b550-678f7334819e@gmail.com> Date: Mon, 16 Mar 2026 15:42:04 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Linux) Subject: Re: [PATCH v2 1/2] staging: sm750fb: Replace busy-wait loop with udelay() Content-Language: en-US To: gregkh@linuxfoundation.org Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20260315232042.231620-1-OaroraEtimis@gmail.com> <2026031626-semisoft-attic-8b37@gregkh> In-Reply-To: <2026031626-semisoft-attic-8b37@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Greg, Thanks for the review. Sorry for dropping the historical comment in v2. My only goal was to fix the -Wunused-but-set-variable warning and prevent the loop from being optimized away by the compiler. I will definitely restore the comment. On Mon, Mar 16, 2026 at 14:11, Greg KH wrote: > How is "2" the same as this busy loop? It was a rough estimation. A 600-iteration empty loop on older CPUs (~500MHz) took about 2 to 3 microseconds. > And why not fix this properly, as the comment states? The comment suggests writing to VGA ports (0x3ce/0x3cf) to force a delay. I didn't implement this because I don't have the specific hardware or datasheets to test it. I was afraid that introducing direct VGA I/O just to fix a compiler warning might cause unexpected hardware regressions *or compatibility issues across different platforms.* Given that I can't test hardware I/O, how would you prefer I handle this in v3? 1. Keep the original loop but add cpu_relax() inside to prevent compiler optimization. (Safest for the hardware) 2. Use udelay(2) (or ndelay) and restore the historical comment. 3. Migrate the driver to the standard i2c-algo-bit framework (a much heavier refactoring). I'd appreciate your guidance on the best path forward for this staging driver. Thanks, Oarora