From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755543AbdBGUVD (ORCPT ); Tue, 7 Feb 2017 15:21:03 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:45594 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755530AbdBGUU7 (ORCPT ); Tue, 7 Feb 2017 15:20:59 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 00E2760716 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Subject: Re: [RFC/PATCH] arm64: Rename macro arguments to silence sparse To: Luc Van Oostenryck References: <20170207010143.22371-1-sboyd@codeaurora.org> <20170207015047.4ffc3xzrqsuuzo54@macpro.local> Cc: Will Deacon , Catalin Marinas , linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christopher Li From: Stephen Boyd Message-ID: <5f7a5bf1-1285-d9c3-b892-c8f9f8ee6d63@codeaurora.org> Date: Tue, 7 Feb 2017 12:11:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170207015047.4ffc3xzrqsuuzo54@macpro.local> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/2017 05:50 PM, Luc Van Oostenryck wrote: > On Mon, Feb 06, 2017 at 05:08:17PM -0800, Stephen Boyd wrote: >> On 02/06/2017 05:01 PM, Stephen Boyd wrote: >>> When I compile files with sparse, I get these sorts of warnings: >>> >>> arch/arm64/include/asm/lse.h:14:28: warning: Unknown escape 'l' >>> arch/arm64/include/asm/lse.h:14:37: warning: Unknown escape 'l' >>> arch/arm64/include/asm/alternative.h:172:28: warning: Unknown escape 'o' >>> >>> This is because sparse is trying to tokenize these files and sees >>> a line like this: >>> >>> alternative_insn "\llsc", "\lse", ARM64_HAS_LSE_ATOMICS >>> >>> It gets past alternative_insn part and then sees the start of a >>> string with the double quote character. So sparse starts to parse >>> the string (eat_string() in the sparse code) but the string has >>> an escape character '\' in it. Sparse sees the escape character, >>> so it checks to see if it's an escape sequence, but '\l' isn't. >>> This causes sparse to spit out this warning of an unknown escape >>> sequence 'l'. >>> >>> In reality, sparse isn't going to use these macros anyway because >>> this whole thing is inside an __ASSEMBLER__ ifdef. > Yes, annoying. Conversion of escaped characters is supposed to be > done just after preprocessing. It's definitively a bug. Ok. Thanks for the fixes to sparse. My hack patch can be safely ignored. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project