Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6030399pxb; Mon, 14 Feb 2022 13:32:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYKtQIG22nCn7rgQns9+l/++NGVM3UUY9qAqWcmTvAt3FtFSkNUUsImdiEgdCnd6qDVxEo X-Received: by 2002:a17:902:ec83:: with SMTP id x3mr857099plg.170.1644874336060; Mon, 14 Feb 2022 13:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644874336; cv=none; d=google.com; s=arc-20160816; b=nc7UDRpLqsJ99VDEs5KLI2lNIhCvAa+SU+MdHKk7G0gMiZERQutCbcamW8R4xOs4Je sSnwQuEU8qhRBACGEzT18LnYFFOvMHRQ6ChYR+I69iVDGKptlceLGpwBo38xiyXcbhyr v997ITCFHf2uUYcHbcqiBxwDJo6HxpC4Nfj8hSQUVQzIb3HobWgwzs68dRIVyOLcEWUa aNiTMOgq0w5VrJyXXlskKD2gpOU0QRKwRsezof/Vqdhl0nQN5Vs39Tr97qIievKFXrqD dU4e6zHk/beXzD8ftgW3KVnezXUdoJivg0r0sTf0Vq3iCYYYGYXCmaNI/yQn59byHMgt 8i/g== 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=Fc6F8UmVPobantRNaLLTN28a7rasUnDLwQKG9SVLzq0=; b=xPBubAVUtfxIf9Hd2gVnbnrp+QHB/M76eu+wbs4lWJpYzn4G/7DaBaeEaQS0e96201 KAa5jQ0bSje7BsGHO74VhF24neCxGvQTV9dwsnNGrIKd+4GJynF/eIspVc8cu3FSKBQx n5WI6BP8A/zY3qMCUOtRTP6QKD+8Y3NKHlJE1irPxCteDv9zwFzlwAdZU82aszrU76Gn wvVVypSyq3BR3KaBcwG87jbzLQSdenHmk7SspTQp3rbuebgqWyYpQkfVKiQ1C0daOGR4 q0D9Lxq98G2yx5AjioPZ1FIRXUKutm0taWsaSUsdjVYN4IaW3jKwDFqPCtGdqvk7Bp5Z /rLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=aH+paiSV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k25si905378pgl.181.2022.02.14.13.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:32:16 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=aH+paiSV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 83C0C13F46; Mon, 14 Feb 2022 12:52:55 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbiBNUvs (ORCPT + 99 others); Mon, 14 Feb 2022 15:51:48 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:46450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbiBNUvq (ORCPT ); Mon, 14 Feb 2022 15:51:46 -0500 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C38DF4A0 for ; Mon, 14 Feb 2022 12:51:24 -0800 (PST) Received: by mail-yb1-xb36.google.com with SMTP id j2so50064360ybu.0 for ; Mon, 14 Feb 2022 12:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fc6F8UmVPobantRNaLLTN28a7rasUnDLwQKG9SVLzq0=; b=aH+paiSV3sgIYtrkaCwxKQbsjv6znZtteAiqoHHOb6AC3qgvXrFUWQj0XcZoTZMINW XGUKwFueUMXH5XAOnIH7ou9f4U9hG/LV426XR5UXme06/t0rUorIkOZtPQyonJWN4BwT 5Ifzqabl/THZ4Om0V+h+tNsYSgSPCC7lN2+5I= 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=Fc6F8UmVPobantRNaLLTN28a7rasUnDLwQKG9SVLzq0=; b=DsGrK1guDqNdHGO7Ybfxg+PoaUC3foU1h1OFaEglR5+ynSSmtJ/hMgGgPvZ2WpuaAF aBVEX59ScwTeNE35KOQUp7Txub7gQmEZaqBpZ5xsZbSy4t36bb2le1z81e6zk9O+Ydy7 LJp3X+6o1rL2qok5fY2fM3NR2GLGNo6SOdIsVFPR3b2t9e9u7T+HS5wtgQEPd/7GGJKC WfmFsyCtWPxpWP8NQ+ZfrdjnACHTS+TozNpsjGoy4+5I7Nk7v7Y+2W7voGuQhZKhQYzD 2fw9BcW7LiO4RbWfjZMDqFP3Ty1tveRxQBTOCVJ3dMzAST37zqO9bDSWFiNJnmsONMNO 8OLg== X-Gm-Message-State: AOAM532dNjcNYWdN/XXEaKs0op1Vn2dFdWl4kVN6AvJtdfj7hoRR58x5 sqdzgTsVnhezS3DtKpg9VqTQm6UjkApcPVcf3Xki7x7RNg== X-Received: by 2002:a25:73d5:: with SMTP id o204mr818084ybc.472.1644869729891; Mon, 14 Feb 2022 12:15:29 -0800 (PST) MIME-Version: 1.0 References: <20220210214018.55739-1-atishp@rivosinc.com> <20220210214018.55739-6-atishp@rivosinc.com> <877da2xu32.fsf@igel.home> In-Reply-To: From: Atish Patra Date: Mon, 14 Feb 2022 12:15:19 -0800 Message-ID: Subject: Re: [PATCH v2 5/6] RISC-V: Do no continue isa string parsing without correct XLEN To: Geert Uytterhoeven Cc: Andreas Schwab , Atish Patra , Linux Kernel Mailing List , Albert Ou , Anup Patel , Damien Le Moal , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Jisheng Zhang , Krzysztof Kozlowski , linux-riscv , Palmer Dabbelt , Paul Walmsley , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, Feb 11, 2022 at 4:52 AM Geert Uytterhoeven wrote: > > Hi Andreas, > > On Thu, Feb 10, 2022 at 11:00 PM Andreas Schwab wrote: > > On Feb 10 2022, Atish Patra wrote: > > > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c > > > index 469b9739faf7..cca579bae8a0 100644 > > > --- a/arch/riscv/kernel/cpufeature.c > > > +++ b/arch/riscv/kernel/cpufeature.c > > > @@ -84,6 +84,7 @@ void __init riscv_fill_hwcap(void) > > > for_each_of_cpu_node(node) { > > > unsigned long this_hwcap = 0; > > > uint64_t this_isa = 0; > > > + char *temp; > > > > > > if (riscv_of_processor_hartid(node) < 0) > > > continue; > > > @@ -93,6 +94,7 @@ void __init riscv_fill_hwcap(void) > > > continue; > > > } > > > > > > + temp = (char *)isa; > > > > There should be no need for this cast. > > Indeed, but only if "temp" is changed to "const char *". > Yes. Fixed it in v3. Thanks. > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Regards, Atish