From nobody Sat Nov 23 17:45:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1729773423; cv=none; d=zohomail.com; s=zohoarc; b=JobuIeVr0I7pob37hFPPeAfRZDdv7smsn61DdmzXzOPjZS3T9qcp2/4M+uMgBJZmki0XX6Xm8Mb8XkUqecsiwpAqanC0eF1yirAeHGNuIWYaNIHXPwXrXug+zu2Oc9IBlabnlCW8ZTEkDjknVaBqbdoFvhIQLNGCcz33BoTCXTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729773423; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/SdhQ2IgYyQSnjIq2OIcLl2Zc0Mbl7oG8Hg7S7gy7r8=; b=QY16vZB5BGxhF6pYtwfcS6bqh6MIQ8BlSnsRB7w8xKAEK3oQgAi3uc2xGy4kyqwGqo/heBPzkau067DfoA2GTrq7/NWWN1tbNZ4e0XEZdwdVE5AbFMnShkhBAybHqGoVUbpfsNRAEdV6sXCzscRpmz6y/XVP2kOIi2+q0Jder+Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1729773423055927.2365945707058; Thu, 24 Oct 2024 05:37:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3x4b-0004Qt-Hv; Thu, 24 Oct 2024 08:36:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3x4Z-0004HJ-4E for qemu-devel@nongnu.org; Thu, 24 Oct 2024 08:36:15 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3x4W-0000KI-Rx for qemu-devel@nongnu.org; Thu, 24 Oct 2024 08:36:14 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9a2209bd7fso102713966b.2 for ; Thu, 24 Oct 2024 05:36:12 -0700 (PDT) Received: from localhost.localdomain (h082218084190.host.wavenet.at. [82.218.84.190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee592sm613369866b.79.2024.10.24.05.36.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 24 Oct 2024 05:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20230601.gappssmtp.com; s=20230601; t=1729773371; x=1730378171; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/SdhQ2IgYyQSnjIq2OIcLl2Zc0Mbl7oG8Hg7S7gy7r8=; b=lZDdxwnkK3UlWTEsZRlc6N1YIAq2Z4V9stSu00RoiQnfcImghLc444HuixAt3p2RR3 8tv3cMlI+b/E1H0KS3b7Kkg5rMfwLPD8B7z64gASkxSP1k/D7BPMiYE1AW14jona6rFB W0r4DWdeTpk+z76DVuTvKDzAQbggzdCfC6lWiNTLsmFwzJgZcZYKM/N7owGIbzKJPLpi P7DVFVqYYUDk4lgtTa0/LtnQc00UuSooWNbsGPKT7RVMdsttEu3SD57xHuOvOIVsYKtd goVN+5YelaW/FTjAlUmDIfTS2ORECD8mARG+jm/pRDtZasXWknszzaGQyW1MuAdhwfHi 9j8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729773371; x=1730378171; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/SdhQ2IgYyQSnjIq2OIcLl2Zc0Mbl7oG8Hg7S7gy7r8=; b=GXaH/6myhrkm4kF6GoyWCZWi7zUCUFoUp09c9bd5BPI4/EHC5Vp3iawZYERR8kZnwR 2LDH5ZPKUqLX/LCLKH67kec5t3pPJ1u6uS6g0ChRv7lWX6QMcALUWeEjBUN9sGQCdsek V4uqV1yeKIFgEXyak2WDszjDI9TgczG9a8GvXOY8DNPu9ZHWKRogP9+cLwGbjsw3jYLa C9JowG0RRYGMzYslk7SgWVxZwNxJTUSEBXov4S9mJD6rZ83RwakhjPKK3/ao47W3frnP IHXLPVz6PXVOXnjg0TEfD6RMgOGJrO2aUkOZkKDzJRmlp9NtyA/SWDmptWC6DVTGvXXD qyIg== X-Gm-Message-State: AOJu0YzirF8ngd0vgjHz5LyU3fyAn0RyLcd0q/rhJZRyPRNkUJs5bf5R xNGrd6Ip5kMZEnNcm8NTgebEzz03Z4NZFZQva8sOSnVLRrWmmyQZXs98L4rt+78O7gxlmFBzJgz 0Og== X-Google-Smtp-Source: AGHT+IENfC5wUh65o04QImvz5EN0791efO0q0lcvDE9mfpFXXpZuRqGvRJczo9BriSOUEopgFOiPSw== X-Received: by 2002:a17:907:7f14:b0:a9a:cee1:3cf3 with SMTP id a640c23a62f3a-a9ad285ee91mr180886066b.53.1729773370653; Thu, 24 Oct 2024 05:36:10 -0700 (PDT) From: Phil Dennis-Jordan To: qemu-devel@nongnu.org Cc: mjt@tls.msk.ru, philmd@linaro.org, thuth@redhat.com, pierrick.bouvier@linaro.org, berrange@redhat.com, Phil Dennis-Jordan Subject: [PATCH] scripts/checkpatch.pl: Ignore ObjC #import lines for operator spacing Date: Thu, 24 Oct 2024 14:35:55 +0200 Message-Id: <20241024123555.25861-1-phil@philjordan.eu> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: neutral client-ip=2a00:1450:4864:20::633; envelope-from=phil@philjordan.eu; helo=mail-ej1-x633.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @philjordan-eu.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1729773427770116600 Content-Type: text/plain; charset="utf-8" checkpatch.pl lints for spaces around operators including / (slash). Code lines starting with #include are ignored, as slashes in those represent path separators. In Objective-C code, #import is often used in preference to #include, as preprocessor-based multiple-#include defenses are considered non-idiomatic in that language. This change extends checkpatch.pl to treat #import lines in the same way as #include, avoiding false positives for "missing" spaces around path separators on those lines. Signed-off-by: Phil Dennis-Jordan --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1b21249c91e..06d07e6c225 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2246,7 +2246,7 @@ sub process { } } # Check operator spacing. - if (!($line=3D~/\#\s*include/)) { + if (!($line=3D~/\#\s*(include|import)/)) { my $ops =3D qr{ <<=3D|>>=3D|<=3D|>=3D|=3D=3D|!=3D| \+=3D|-=3D|\*=3D|\/=3D|%=3D|\^=3D|\|=3D|&=3D| --=20 2.39.3 (Apple Git-145)