Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp749486rwb; Thu, 11 Aug 2022 09:14:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5JsbGc/MaU600lfzu3nylmNpHIegHqIhBfRirF59TTfk5YP4C4I6yh3XowXjnDG++hNcpf X-Received: by 2002:a05:6402:240a:b0:437:d2b6:3dde with SMTP id t10-20020a056402240a00b00437d2b63ddemr31674662eda.62.1660234484843; Thu, 11 Aug 2022 09:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660234484; cv=none; d=google.com; s=arc-20160816; b=TaMiMtb9SHkFLs/QdWmy9qQJQTBfQqJsYtZeyH4E49D9oV0A2zOt3Gx4D81NMXMdEk +KR7J4zZ3ATVvf6mrctN51eeK2Ir+6nqw7bvhSUIMdDUWwIrRFLkLkPoqEviTBPb6hSp CR2LgiTrMcpKim/UJPWN2h9UJ2CPcRxdNZruHRPRGSEZs4RD3AlTXbbwG/wAl4HamJaY BGjpvHti3bWxwO50O9PD9ULPdhegzstFYAMIIaJtQ+oZ7pctbnKSv27rbdrjEB5idKcM AtuG6oLALzP/z9V7Pn15IMUrFrxmAbjUOI5MRKtr8xBOLPnbqbozFa9iAPAkCu518iPM 8dWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=IqdpAm+3ZI27zm3WrWt4kogz8HX3uySUVAkMSid/X6U=; b=mAbaK7o5UItXF7qn2hjvMQoRc6J4/6Z0UdYZsPMs5Y2nS0f0gATjWkewUj1mUuO70i Drq7Dq+iW0reDE5tfJ9PlO2bCX9W6rbJfnnCAi2cKFDVRpPkM7fPN/xXJHsCB61ZyajH M0+7im02ZwgWqZuKT/DAUX+AqXlwkgkPYBmrrOFvOt/6fS9Ri34mzCNR0RPPgxrDXJ/f jAJ6hn5Xh1roHupuoy2Yu1ytGK75tjiVnjvFJb5d9klKUCHxbJX2fCkoQrWgmgtSnzHo yjrjzGu+98T4eQ1Bc9QJUHJRmDfI31tVYn/hOgoJe5PHpaETYfXv2EpW/GbfUbPAc4RE lnDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=1G0z6VKe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a0564021f0400b0043e81c582d2si13123135edb.232.2022.08.11.09.14.18; Thu, 11 Aug 2022 09:14:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=1G0z6VKe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236940AbiHKPy3 (ORCPT + 99 others); Thu, 11 Aug 2022 11:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236686AbiHKPxt (ORCPT ); Thu, 11 Aug 2022 11:53:49 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F6545068 for ; Thu, 11 Aug 2022 08:45:20 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id 17so17230439plj.10 for ; Thu, 11 Aug 2022 08:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc; bh=IqdpAm+3ZI27zm3WrWt4kogz8HX3uySUVAkMSid/X6U=; b=1G0z6VKeHyOv+DmFlwNaDXpbESavfOAPdJ0y7qxpkZ8KGb1ELkE4Oi3sNw5j1vlVrv YsT/Jvnr4Qx4zxafupJ6e465wLqyqB94XpJdUo1RMy0UAaoWJ2m9rEns8gIXEddP+y/G 1Lcw6OCuCuxqK9qvhxVrW914AGArcswAUhTHLJZ7gA/zEismEh7/w4AKVuAwf0eAzk5j bAbiWFDAIE7pU3pwRWZqCGEl9PkgLvUfdi/HBFADY5zuJ8T8djjykzn2LsYLXKNoJKjt ZKfPAOFCPCMSlKygsEwhK8NAgqV+i6VGFHBBNq3eAyEi2+/p6PBbELjvq6J9dh4q4dxY IJnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc; bh=IqdpAm+3ZI27zm3WrWt4kogz8HX3uySUVAkMSid/X6U=; b=ViJ7AuNpv79WD9JBOOXYEF60VKW0w/WO3gG7LINDb+3esgB/FGuFFU5Pdj/73sDkBZ 7ns6d+m+L8qGin2oanJvDvI62PBLRl8YDkrZjy3WHkCKAhNpv7HZ0V3Ugjipwl+h2ylC 7G1xpenpxcnQIQCngsXnN4fXZZj0ruJAAj61Pq6kZEG9qwGOkZodA8xLtyaFs3u1zSMD 1VYJwdlLeeeS2ZhTx+qBq08ZAL7dkDTwHVwsgMoutLgiTzez8E/VG9a1XBpxd/1wjppm 5d9UlM3PuqzQhGZ6EnDTvcNtWrX18y/NRKkMFDAwuAf0uhZvPXafFpZ+tVCjy2BHqFqM 9etw== X-Gm-Message-State: ACgBeo34JIxDPxRzMLiR2g4hQ4jWmsuZG8/Cf9VwxleeAybtu5JjJUnD BmXy8BRYqaGV+P0BsLHYi/U8cQ== X-Received: by 2002:a17:903:31cb:b0:16f:3d1:f5b with SMTP id v11-20020a17090331cb00b0016f03d10f5bmr33577264ple.148.1660232719614; Thu, 11 Aug 2022 08:45:19 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id n129-20020a622787000000b0052dcbd87ae8sm4216988pfn.25.2022.08.11.08.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 08:45:19 -0700 (PDT) Date: Thu, 11 Aug 2022 08:45:19 -0700 (PDT) X-Google-Original-Date: Thu, 11 Aug 2022 08:39:47 PDT (-0700) Subject: Re: [PATCH] riscv: traps_misaligned: do not duplicate stringify In-Reply-To: <20220623112905.253157-1-krzysztof.kozlowski@linaro.org> CC: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, krzysztof.kozlowski@linaro.org From: Palmer Dabbelt To: krzysztof.kozlowski@linaro.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Jun 2022 04:29:05 PDT (-0700), krzysztof.kozlowski@linaro.org wrote: > Use existing stringify macro from the kernel headers. > > Signed-off-by: Krzysztof Kozlowski > --- > arch/riscv/kernel/traps_misaligned.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c > index 46c4dafe3ba0..378f5b151443 100644 > --- a/arch/riscv/kernel/traps_misaligned.c > +++ b/arch/riscv/kernel/traps_misaligned.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -150,9 +151,6 @@ > #define PRECISION_S 0 > #define PRECISION_D 1 > > -#define STR(x) XSTR(x) > -#define XSTR(x) #x > - > #define DECLARE_UNPRIVILEGED_LOAD_FUNCTION(type, insn) \ > static inline type load_##type(const type *addr) \ > { \ > @@ -207,9 +205,9 @@ static inline ulong get_insn(ulong mepc) > asm ("and %[tmp], %[addr], 2\n" > "bnez %[tmp], 1f\n" > #if defined(CONFIG_64BIT) > - STR(LWU) " %[insn], (%[addr])\n" > + __stringify(LWU) " %[insn], (%[addr])\n" > #else > - STR(LW) " %[insn], (%[addr])\n" > + __stringify(LW) " %[insn], (%[addr])\n" > #endif > "and %[tmp], %[insn], %[rvc_mask]\n" > "beq %[tmp], %[rvc_mask], 2f\n" Thanks, this is on for-next.