Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp426625lqb; Tue, 16 Apr 2024 23:36:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrVkpQ4LtBgR+liZW604EmTiwoH0u0ty/y7hgz6bVGuL+UTwS+1Em1Fuh8vjZeUIIgOkZXwoapbRGlbXxZhDGDGA926yRobqCVa59yog== X-Google-Smtp-Source: AGHT+IGBoCXl5HL4eavOhrEVLVgbxwhE3bXO4g8hmxAO9ArdtjfpYGEKTWZ/f7nVF/G046un7435 X-Received: by 2002:a50:f617:0:b0:570:1ddc:5e4f with SMTP id c23-20020a50f617000000b005701ddc5e4fmr6275610edn.8.1713335792306; Tue, 16 Apr 2024 23:36:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713335792; cv=pass; d=google.com; s=arc-20160816; b=d8kkw9IFZlcemAS0nK43r19EnkwLazfMD/fdlEvPpNuERZb3mWki9A3vAg2HTJyzPE 2XajB1h66vcPf8xS0YihqpFo8r4yWssaV0/XdTqKULTfRMMm9hFDUz8vPlESY6ma+mxP s+4KLWqwN6snQG38KD50yMPsR+Q31Y+sqhDgtjWx3S5HJlXNb/+4GlczxX04fW+ISAU7 CRm5wbxLFIhsOLdNwAQEKn+ixQ4YfAQIhr3IR1RS03VFDYOpGoNVItZ/XhMyi/1MdOcC sJkMrU5I7bCAWkmwXXZcZDsAG54aiQUsuTbFWlKHzHWc5pJXoDBVIBDxpH7HoYvBNIYF oi7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:reply-to:from:date:dkim-signature; bh=e+8yz+cH0odraTNrpZVGJcJZ6vJWpbykhuVVTXpnOt0=; fh=iJqLjV8K4SywLwsgFacSXQmFieyaB4Hy2S9jU/typcg=; b=WboRwea02fPNvutKIWm4dkali9owVkZZWQsKzcRTFjMo/3iNSHehewVY+ejdjQl/nP 1rtWj6UXmaafvpjSQt6dScKsDSJk4O024WFzayKZAziWsY3bcXqeTo70qYEEeRePv1fY G1wkiO5we6YoZNTxfyZrhexqzVyoptlcgmA6wHgXw4wMyw01v/9o7esQKlVtVp0QDyzb JcfkagdSr7K3ySeNc4j8Pe1GlUq9Rw47G/gvmoArPWuHOaUKExata3XBlIh3zyc89FH5 aLiCA3vL87enCuIXWu5jPmrk1CaJmJvDE8Vbllo/pwEyZFMtau7xZt8ry7sFHZ9Z1yUM KTyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=g07ltgwt; arc=pass (i=1 dkim=pass dkdomain=yahoo.com); spf=pass (google.com: domain of linux-kernel+bounces-147997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z9-20020a056402274900b0056bdc146261si6450628edd.148.2024.04.16.23.36.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 23:36:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=g07ltgwt; arc=pass (i=1 dkim=pass dkdomain=yahoo.com); spf=pass (google.com: domain of linux-kernel+bounces-147997-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E06A71F23DB2 for ; Wed, 17 Apr 2024 06:36:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADBBE65BA8; Wed, 17 Apr 2024 06:36:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="g07ltgwt" Received: from sonic310-19.consmr.mail.sg3.yahoo.com (sonic310-19.consmr.mail.sg3.yahoo.com [106.10.244.139]) (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 F08204206F for ; Wed, 17 Apr 2024 06:36:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=106.10.244.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713335781; cv=none; b=pu9tiul/TquJtbAo1IpB0mgyFznex4w6rMrjrHO+aBV47bufBMdA2kbVzGlFF0f71WgQQoVjbQUKt/ClFLV52Ew3WrhlVj5Hxe0jXjPGu1O4PDObo7BF8MGcqEjebgJrkK69Ci1QtAIlb0JYVF8tUBJdBBq0uja+MWGFxfzu62I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713335781; c=relaxed/simple; bh=e+8yz+cH0odraTNrpZVGJcJZ6vJWpbykhuVVTXpnOt0=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=MOZCpm/xmBSEgzAC2B/LrE2DGGsnD2O/dLhmoET05q9jmoD6OOrPwZw1jxDw/KPFHSvcSlLPgumSghSvlR0uNpuKn/1uSaNe4weIowcHS1PDlgCRu6UlwTuF/vSO5rkuRzSoOyZ9cRKO06sNVaDTpiyedSQ3FHo5jJwYaOJ4Kvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=fedoraproject.org; spf=fail smtp.mailfrom=fedoraproject.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=g07ltgwt; arc=none smtp.client-ip=106.10.244.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=fedoraproject.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=fedoraproject.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713335776; bh=e+8yz+cH0odraTNrpZVGJcJZ6vJWpbykhuVVTXpnOt0=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=g07ltgwtwZg44OE+g9bXdenFYFmB5DUc0y3tFNu7u+1qgKp7VtsFIHrfxmZQX0m7V5x+GpdIooMcNsntTQj9Qxwh76tSh6MlMYqJ93CvY/is7Z+LoA+IAIAx+QjB+qt6iSLBCJbJVmXwChAo26Tycg/LuGQALksNV0Z/SnGuFgWCVkIz4LrRlFIasdFKkf5hYkOBiM2kphh0s92MZ3wDTM3T1RnVKn8kj+J3J5RAatcJHk/q1drXjx1feBnuN3zw5UkpZ3HcVahYlt0RnxdZMbP7s9qk6WXFzLpOOQJA0EbcpdXSZMWX+TogY/1N6WNrXrAmWsOIVv2c1D+JkcTMdg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713335776; bh=Pol6CELU5q7pB7yfGI9+2kTDT/r3Y+FoPPEvmVL9s6r=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=arjKP9R3cYoiy6AsG392M9ghM5qf8mVNZX0sadASz0HPeCgbX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DkN7vMBFXfQp8jidWu97t3dcR.M4IA4zgdCyNzbiOin6MU fFZz2zlnNscXBonZupfgDj_WHNdHuPIkOKNrXvKFAYlfhPiN77m.vT15xIvq.OUn5CR0CyouXIHF bSM2f9Z0Hhq6I7Ot1In.C0K2ztOAj0n9tWlEs.JMYBE_1.bdJ149.q4PcS17SzZJr71RIiyuNssB 3IPoYXBJ_04R8_7N4G6YghndQUEJraLRr0X0FXPb8p_5BRhWv2ksBsYVo0gEAxi5_P.5VhhBILqk eepE65P0YqXKLoEvOJUrcoJE2C894UeExF2EUIg9FEjBc6QVqhBqA1TkGQwk7wuM1gDIl6Bf3Lfq pG11fZjoBPo5dAsq8tgwifIftw1yDILgEBbe.kqWr1O8VL3rgCRr6CZqib_cBAIXXJSPywSOjpVn BAy2356W4iuZx.7TdIe2D9EgCSAbAlJcjBL8Y57XJKNoKcwoQjrGq_NplYPQCgCWNmFhaew-- X-Sonic-MF: X-Sonic-ID: 27321455-38ec-41a8-be97-de9b176a6a4c Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.sg3.yahoo.com with HTTP; Wed, 17 Apr 2024 06:36:16 +0000 Date: Wed, 17 Apr 2024 06:36:10 +0000 (UTC) From: Prasad Pandit Reply-To: Prasad Pandit To: Joe Perches Cc: "linux-kernel@vger.kernel.org" , Dwaipayan Ray , Lukas Bulwahn , Andy Whitcroft , Greg Kroah-Hartman , Dan Carpenter Message-ID: <776311640.119588.1713335770163@mail.yahoo.com> In-Reply-To: References: <20240330033858.3272184-1-ppandit@redhat.com> <1568855168.5949322.1713251087824@mail.yahoo.com> <2024041627-overgrown-ripping-2348@gregkh> Subject: Re: [PATCH] checkpatch: error if file terminates without a new-line 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-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.22256 YMailNorrin On Tuesday, 16 April, 2024 at 03:25:18 pm IST, Joe Perches wrote:=C2=A0 >There's an existing check for this. Fix that instead. > ># check for adding lines without a newline. > =C2=A0 =C2=A0 =C2=A0 =C2=A0if ($line =3D~ /^\+/ && defined $lines[$linenr= ] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& $lines[$linenr] =3D~ /^\\ No = newline >at end of file/) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (WARN("MISSING_EOF_NEWLINE", > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"add= ing a line without newline at end of file\n" . $herecurr) && > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$fix) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fix_delete_line($f= ixlinenr+1, "No newline at end of file"); Okay, will check; Thank you. --- =C2=A0 -Prasad