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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4D6CC433EF for ; Fri, 11 Feb 2022 12:52:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350325AbiBKMwl (ORCPT ); Fri, 11 Feb 2022 07:52:41 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236724AbiBKMwc (ORCPT ); Fri, 11 Feb 2022 07:52:32 -0500 Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com [209.85.221.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41F07B49; Fri, 11 Feb 2022 04:52:31 -0800 (PST) Received: by mail-vk1-f181.google.com with SMTP id l14so4866419vko.12; Fri, 11 Feb 2022 04:52:31 -0800 (PST) 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=k3yMDJ4AXnEfuVrUfk2PsPl0dHnN7EmeDB26b3zVqHM=; b=vybAruLz4Wi3DoQ9eK8XZGFfIdApwZMDa7tD+/ELOXpN1NhwSBEwBd4J/ez6uWiD3x NefjvmJjpc7vvcekmtQtQGLyfpQNZ0CzYJfz3cqj1j8MoUfmPm5dca81ZsGCLiIObjzS 1DFn/mFCB0SKADFeQAn7aEl/i/BWiIsEHz+gFgSfqUiobeJdSVGsMh67t6O4rR+7eAvz gMAAM8ZZYPwI47o0oj3RtgNx49GQeAgtCnUhbWoY69HSuo0jwJUX3Ponc/N25ATHEca+ Yn5chKlA2M5pPugz1Of+99F/JhMuLs0F1OABngKHhhY3k0zQCaQ+CMj5reInLnSMSrrX rNng== X-Gm-Message-State: AOAM531Q+tbZ4M/u1pH5grSfrS9OSDK9+4EJ9jDf9LivSPyw6eLTcJz7 2zokc5SIDJhg7x+0vEcxUooYCLykT20/Jg== X-Google-Smtp-Source: ABdhPJxtPek9Ni2xvdqaahx4TS6LnNI/5fz0HZFAX4wP3sZdzjDGvfhrxydhzfazV4Gf59hGjMwuGA== X-Received: by 2002:a1f:2681:: with SMTP id m123mr396142vkm.19.1644583950258; Fri, 11 Feb 2022 04:52:30 -0800 (PST) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com. [209.85.217.47]) by smtp.gmail.com with ESMTPSA id b190sm1643697vsc.5.2022.02.11.04.52.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Feb 2022 04:52:29 -0800 (PST) Received: by mail-vs1-f47.google.com with SMTP id u134so5308786vsu.8; Fri, 11 Feb 2022 04:52:29 -0800 (PST) X-Received: by 2002:a05:6102:34d9:: with SMTP id a25mr415124vst.68.1644583948840; Fri, 11 Feb 2022 04:52:28 -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: <877da2xu32.fsf@igel.home> From: Geert Uytterhoeven Date: Fri, 11 Feb 2022 13:52:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/6] RISC-V: Do no continue isa string parsing without correct XLEN To: Andreas Schwab Cc: Atish Patra , Linux Kernel Mailing List , Albert Ou , Atish Patra , 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 *". 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