From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (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 416F93921DC for ; Thu, 26 Mar 2026 14:53:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774536802; cv=none; b=SxMxHmPvZWa5Dd88fF0XPpZJ3ncTFg/wnlrnZHKXAUW8R0n0Lm/5H9yw/wMcoflfesFzA9dnsiVtvmpOM3h89vW8Nkfe+47R+hNLyQOje42o1h2FlzecYEaDXhgQ5P3aOzovG/ftFEZUeStfheSvtLTvHSphZ2dGO+m1qMp9Z1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774536802; c=relaxed/simple; bh=2388utc9394UFJS/UPxBTvHU8BTZ6fiNdrXOl7m7DM0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TQB0PjOFKCHJMNj9NdqJir0eAUx1efCnHRQnW6xW+r+Db7m9AklMrHp58K372/ZYmMZKo1IuKDtlBmH9DgLT1R7WI/WvNa6OKbeHTOs2xcd0xgEcMfMpHNC/tDZ9cnC4sCp6WOB56TEiQv/m6yXi6UwEA/ZvpKN28ZGCKkaYNuU= 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=hAuQoxam; arc=none smtp.client-ip=74.125.82.46 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="hAuQoxam" Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-128b9b7e3edso99095c88.0 for ; Thu, 26 Mar 2026 07:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774536800; x=1775141600; 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=73CDRh4oXvGZ73Mm/YRLMvHfAk4P55rJanZOEN5QMuU=; b=hAuQoxamFzwL3heHjqiZdcDHYXI7ggaUCenY6xjUEmHFeYnDOn8hplwr63FRVmMY35 EBE9loZJkqe7yqJV3oCFCqkSGCJuvvfZgmvpqW2FYI9nItxwQXeOhttqx0Ghz8hpxZrZ v1QM2RNXL3n1ShHHJYu153TR+rnbC+cOGA+JDsbX5VYgZGPaP7FUZ9wFUZoe58PVLGVL yiS9EoeI9oPqATnNjFZyrfAwyNVPr1vSjMGsLXZIrX4iXKIMLFkBLnLedIKXEQXqYFrM l+2DOlNT1GySAtEgwRm+GCW5NH3wgiJ47jIA58CaIvcIq8CBfxhTd8M0pi4ERW5zC1IG zyBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774536800; x=1775141600; 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=73CDRh4oXvGZ73Mm/YRLMvHfAk4P55rJanZOEN5QMuU=; b=fj9syIPlWN9A0nElPb1SxsYy0w+oj3IAhejYPoXRCwBZdsRp/84wsmQiJ86IXG81aT QdbYN0j7Ri49vhGHEjYW/7CZFwMyFmEKEK2F1lGfNjhUJXLAdFHTCuGZ4cl7siIBIL1q ovbnO2TW/jAqLVJ4qTVFLKw61k3wigakV7YcFIlkJh/CUi7/KaokWYRuC8H20fEAaiaF 8Su0EKLdTt+ft8V0tatrigbQ2oJNsBeIguTJ5MNdBQjJNYXFUQX2E62hob/o78EdZGxY YnSH6N13woAMTfEdOK5FPgPYc3wQjFi3GnMas7MgAk97hre9v3dI1kHNP9TCElTj+CI3 BDPw== X-Forwarded-Encrypted: i=1; AJvYcCWpK8XxJG4zotX2SYA+dvecFjjtJmyD2XYGofwqk43aYQS6VcGtI82tks0yKM8oWarY4RZ8pCCb1YkH46U=@vger.kernel.org X-Gm-Message-State: AOJu0Yybp0nCjXn7gy59QcjVD71ZuNX2tYxvokZ3fSdO5N16xThj9ALu qKunABNkFlRav3+psU+Dkp8boRt4OsyX/aCHkH5bVXbm5wuVF8pzAm/W X-Gm-Gg: ATEYQzwhqfbN9Y/DF4LiIxicYXw2AUUDgCTUTHAJTE3nhzsqEi3M90PsKVn1kWSyR2c hGDTmg+jqRVWEiwNPiiW1sfb5fTZFfMd85rSs4eS59ax1bhmrzrL6cCyCP9GoQtS3fLCXe8fMYy jeundVoJ0gmGzpCgc4iuGhWftHuuRUs9FfEdVK19/X46NuZ9WwWaoF6R4BVkbBlIXY+vCDo8XRq CxBIbvwTB3Oa7zX1bKa3GgAVyxEefkIrQJjgPvYoSdjp9QB3lvq8lphjZaZoBbDUmVkn+2Wg3iN gp02lMMhFEAvlcvOopkovfrwhldFoM420PTVIZF4vGA7yyk5tFzrSKlUTFjzKTHJJWH33AbGziy ry1nB/3kZGzvf1DH8qJXGdSOEaGl5sZbADFCQT2XeuvLnh2ezNkHtd9NDYAPf1Ky/C9YXhRLLcz h9MpYwzvRvaHAQ7pzLSM1z9dPyWF91IZl74TnjU4NJ6IWcwDsPBu62pvUfK4ZnuErh X-Received: by 2002:a05:7022:e17:b0:12a:7181:2f1c with SMTP id a92af1059eb24-12a96e6b019mr3622063c88.17.1774536800232; Thu, 26 Mar 2026 07:53:20 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:b7b4:352d:eb23:66e5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12aa7248731sm3357533c88.4.2026.03.26.07.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2026 07:53:19 -0700 (PDT) Date: Thu, 26 Mar 2026 07:53:16 -0700 From: Dmitry Torokhov To: Joe Perches Cc: Dwaipayan Ray , Lukas Bulwahn , Andy Whitcroft , Jonathan Corbet , Shuah Khan , workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch: allow correctly handle full files on stdin Message-ID: References: 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: On Thu, Mar 26, 2026 at 01:46:49AM -0700, Joe Perches wrote: > On Wed, 2026-03-25 at 23:20 -0700, Dmitry Torokhov wrote: > > checkpatch does not handle full files well when they are passed on > > stdin, because it does not know how to treat the text, and whether it is > > a C file, or a DTS file, or something else, and so it assumes that when > > it works with stdin it should be a unified diff. For full files it > > expects to have a file name as an argument and read the contents from > > disk. Unfortunately this does not well when trying to use checkpatch as > > an online linter and feed it contents of an editor buffer that have not > > made it to the disk yet. > > Why is this useful? > Why not save the buffer and then feed the file? Because when I am editing a file I am not saving it all that often. I want to have buffer diagnostic updated when I leave insert mode in vim. Thanks. -- Dmitry