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 B66B9C433E0 for ; Fri, 22 Jan 2021 19:12:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E82023AC6 for ; Fri, 22 Jan 2021 19:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728779AbhAVTMZ (ORCPT ); Fri, 22 Jan 2021 14:12:25 -0500 Received: from smtprelay0010.hostedemail.com ([216.40.44.10]:55932 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728962AbhAVTLG (ORCPT ); Fri, 22 Jan 2021 14:11:06 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 62056100E7B40; Fri, 22 Jan 2021 19:10:13 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: slip91_5f17ab72756e X-Filterd-Recvd-Size: 2290 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Fri, 22 Jan 2021 19:10:11 +0000 (UTC) Message-ID: <27366417ad75e0300d4647f776ca61bb1b132507.camel@perches.com> Subject: Re: [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files From: Joe Perches To: Aditya , 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: Fri, 22 Jan 2021 11:10:10 -0800 In-Reply-To: <98d40817-1f80-c772-eb9e-a6c3c04625b3@gmail.com> References: <20210120072547.10221-1-yashsri421@gmail.com> <14707ab9-1872-4f8c-3ed8-e77b663c3adb@gmail.com> <98d40817-1f80-c772-eb9e-a6c3c04625b3@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 Fri, 2021-01-22 at 18:48 +0530, Aditya wrote: > On 21/1/21 12:13 am, Joe Perches wrote: > > I believe the test should be: > > > > if ($realfile =~ /\.S$/ && > > $line =~ /^\+\s*SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) { > > Joe, with this regex, we won't be able to match > "jmp .L_restore > SYM_FUNC_END(\name)" I think that's not an issue. > which was replaced in this patch in the discussion: > https://groups.google.com/g/clang-built-linux/c/-drkmLgu-cU/m/phKe-Tb6CgAJ > > Here, "jmp .L_restore" was also replaced to fix the error. Notice that this line was also replaced in the same patch: #ifdef CONFIG_PREEMPTION -SYM_CODE_START_LOCAL_NOALIGN(.L_restore) +SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) > However, if this > regex(/^\+\s*SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) is > correct, maybe we don't need to check for $file as we are now checking > for just one line. > > What do you think? The test I wrote was complete, did not use $file and emits a warning on the use of CODE_SYM_START_LOCAL_NOALIGN(.L_restore) I think it's sufficient.