Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5837516iog; Thu, 23 Jun 2022 06:24:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpoGa7ui7tettYi56VGkRYPwMqKM9O0lL8D7OsNn40mx5R8w8skhkGKgwG4xgAtE0393ft X-Received: by 2002:a05:6a00:1a09:b0:525:a0d:d1d3 with SMTP id g9-20020a056a001a0900b005250a0dd1d3mr28253466pfv.27.1655990640335; Thu, 23 Jun 2022 06:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655990640; cv=none; d=google.com; s=arc-20160816; b=HjjmO+/jezpq/sS7nhZEdQi/hH+jKBLv2bvXhsesTahrXPcJaKhBxs/ZcpUr6iImeL BK8b3XxfjF8aGhHfy30a0fFhBHB/LFdYREXJHNyLwLLvzxH/WRw6HnPnD4rBtwSBDP43 N2RFJWj6VoNrQuyKClhVVrMWmAb1n5YlyZQyf1CBuc4eTQDqz8a0zEObRkgutdTMH9j0 joftQg+wbsj2cMJ4iK0IKjSff1xR88XpVErRRWyNPcU8kfJG/NKm9Xtl8wi8g/ez1k++ KLI+6MXbk+einuAdO1fD0aaIC6JKU+GQwPtsHRvirVn1HzowQlwMIz4WxPcL1u6meaOD 0gDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JF3KFGuU5d1nPOiqYMvyN5E84aUzwajF94ekFp44h3w=; b=piRKndBwRXybhuckH5CvoRCQVZpRGfNkMG9XbEtlq7SGxd3HpAlUXGWt6n5jCkgLPc YPOik2phB9Q0E/hJNmb7ecOOneUQm71Ua8WftJk9e1ASzhzorc6vu/1SyezU+ziHIdRS UgY9za2vm8laRABop2vE/lIW7yWcUSWEUqtotC7dzHbehHaoHmiKuKnXb6N5vpXGWt/g Eev0/eAwUJfE17HFD5wL/x4VaeUKigBOGqWebvIR8wO5flzgEzK1QvWGq710JDvZUBvS VuxVq6DWHuk36oUcijHrg+b4kmDppl0Y5FGJBQq8z+9+yMJEsenNmJUnTzvnupaVtP/s XqZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=LBM2kqEt; 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 d28-20020a634f1c000000b003fd63c615cdsi26098838pgb.368.2022.06.23.06.23.44; Thu, 23 Jun 2022 06:24:00 -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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=LBM2kqEt; 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 S231218AbiFWNLe (ORCPT + 99 others); Thu, 23 Jun 2022 09:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231625AbiFWNLd (ORCPT ); Thu, 23 Jun 2022 09:11:33 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 503FE30554 for ; Thu, 23 Jun 2022 06:11:29 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id e5so11020223wma.0 for ; Thu, 23 Jun 2022 06:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JF3KFGuU5d1nPOiqYMvyN5E84aUzwajF94ekFp44h3w=; b=LBM2kqEtnMXJotGt8/OvyPuEtGx1Lesxgls/2wFhLs9qSftGQ766tmIXd3WtwmiAmJ bQrPEbNbQZlDk8k5THkJ5JiD9r+CUc/co1hveaXpvT3hW/fP8g+dZfjW8FdtvzE0cCvW 05IVbMQGu7Y5AvjL3f5J6255yMHT5RNJ6uym2VtetnFXj+Uk1k5QidCWSDIDaU6bgHip c4wN1OLm7R9uBf4TL+T3pOkDJA/e1GKHRnUdG25r/1DuGPdE9PR1VmlVsiS8e+dJDPsH VFw1wZYF+EAvKWjfhE9/8H7Q8GyRWbUxpCPp0YLXcgGrs/epk+o7o95YiFYR7b9H2czt P3nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JF3KFGuU5d1nPOiqYMvyN5E84aUzwajF94ekFp44h3w=; b=gwGDEhVVTcMM+9OWqAff457WN2DKl+ejZny1FdSCXHrI4MxORyQd7yNFJ6SQdZ1WTJ rys7VY9sJH2HAlygIelbh94jF9WVWui4ioA6EZineuaVTOfTI4HsGYPqCa7HDzlQx/jM EgByVeo2GImZmQ+W5QozSEovT6z8jVAUEDucYXmVziK2jsDQHyPiOfPHG68mzKubNj3a YvIljSZ3cDTWKDmngzA6YMrkww/sYzNLAsbKkDq2QQKrISkh5zyxuScfxEnVBPPX4M52 d4NxewUtHDau8edFSJrDmrBrA2IXzoabJGo1UXNKO0RuhAwXFXoqUFj1UgFMK/ESrG7q dr3g== X-Gm-Message-State: AJIora9dEKkq4YI8Su1kR5gYUSgAIWAsygzGatwgsAJ4SXdz+WiW7CRQ X+mJcasO2k2mwcQUV6MGznGTJBXOeRugj6COJ3dxjg== X-Received: by 2002:a05:600c:4fd4:b0:3a0:334e:241e with SMTP id o20-20020a05600c4fd400b003a0334e241emr2072446wmq.73.1655989887621; Thu, 23 Jun 2022 06:11:27 -0700 (PDT) MIME-Version: 1.0 References: <20220623112905.253157-1-krzysztof.kozlowski@linaro.org> In-Reply-To: <20220623112905.253157-1-krzysztof.kozlowski@linaro.org> From: Anup Patel Date: Thu, 23 Jun 2022 18:41:15 +0530 Message-ID: Subject: Re: [PATCH] riscv: traps_misaligned: do not duplicate stringify To: Krzysztof Kozlowski Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" 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_NONE, 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, Jun 23, 2022 at 4:59 PM Krzysztof Kozlowski wrote: > > Use existing stringify macro from the kernel headers. > > Signed-off-by: Krzysztof Kozlowski Looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > 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" > -- > 2.34.1 >