From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B045C433E6 for ; Wed, 20 Jan 2021 10:25:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA28D23331 for ; Wed, 20 Jan 2021 10:25:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731128AbhATKOh (ORCPT ); Wed, 20 Jan 2021 05:14:37 -0500 Received: from smtprelay0197.hostedemail.com ([216.40.44.197]:51660 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731194AbhATJV6 (ORCPT ); Wed, 20 Jan 2021 04:21:58 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id EEF9C8384364; Wed, 20 Jan 2021 09:21:05 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: flesh62_610477627559 X-Filterd-Recvd-Size: 1671 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Wed, 20 Jan 2021 09:21:04 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files From: Joe Perches To: Aditya Srivastava , linux-kernel@vger.kernel.org Cc: lukas.bulwahn@gmail.com, dwaipayanray1@gmail.com, broonie@kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, clang-built-linux@googlegroups.com Date: Wed, 20 Jan 2021 01:21:03 -0800 In-Reply-To: <20210120072547.10221-1-yashsri421@gmail.com> References: <20210120072547.10221-1-yashsri421@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-01-20 at 12:55 +0530, Aditya Srivastava wrote: > Local symbols prefixed with '.L' do not emit symbol table entries, as > they have special meaning for the assembler. > > '.L' prefixed symbols can be used within a code region, but should be > avoided for denoting a range of code via 'SYM_*_START/END' annotations. > > Add a new check to emit a warning on finding the usage of '.L' symbols > in '.S' files, if it lies within SYM_*_START/END annotation pair. I believe this needs a test for $file as it won't work well on patches as the SYM_*_START/END may not be in the patch context. Also, is this supposed to work for local labels like '.L:'? I don't think a warning should be generated for those.