public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: linux-riscv@lists.infradead.org,
	'Jisheng Zhang ' <jszhang@kernel.org>,
	'Heiko Stuebner ' <heiko@sntech.de>,
	'Paul Walmsley ' <paul.walmsley@sifive.com>,
	'Palmer Dabbelt ' <palmer@dabbelt.com>,
	'Conor Dooley ' <conor.dooley@microchip.com>,
	'Albert Ou ' <aou@eecs.berkeley.edu>
Subject: Re: [PATCH 2/5] riscv: alternatives: Remove unnecessary define and unused struct
Date: Thu, 23 Feb 2023 23:14:26 +0000	[thread overview]
Message-ID: <Y/fzUt7gs6U+MANi@spud> (raw)
In-Reply-To: <20230221185603.570882-3-ajones@ventanamicro.com>


[-- Attachment #1.1: Type: text/plain, Size: 2289 bytes --]

On Tue, Feb 21, 2023 at 07:56:00PM +0100, Andrew Jones wrote:
> A define and a struct were introduced with commit 6f4eea90465a
> ("riscv: Introduce alternative mechanism to apply errata solution"),
> which introduced alternatives to RISC-V. The define is used for
> an arbitrary string length, specific to sifive errata, so just use
> the number directly there instead. The struct has never been used,
> so remove it.
> 
> Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> ---
>  arch/riscv/errata/sifive/errata.c    | 2 +-
>  arch/riscv/include/asm/alternative.h | 7 -------
>  2 files changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/arch/riscv/errata/sifive/errata.c b/arch/riscv/errata/sifive/errata.c
> index ef9a4eec0dba..9e7dffa800f2 100644
> --- a/arch/riscv/errata/sifive/errata.c
> +++ b/arch/riscv/errata/sifive/errata.c
> @@ -13,7 +13,7 @@
>  #include <asm/errata_list.h>
>  
>  struct errata_info_t {
> -	char name[ERRATA_STRING_LENGTH_MAX];
> +	char name[32];

If it were me, I'd probably have moved the define - but hardly matters,
it's a one time use, arbitrary number I suppose.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

>  	bool (*check_func)(unsigned long  arch_id, unsigned long impid);
>  };
>  
> diff --git a/arch/riscv/include/asm/alternative.h b/arch/riscv/include/asm/alternative.h
> index b8648d4f2ac1..3beef400a971 100644
> --- a/arch/riscv/include/asm/alternative.h
> +++ b/arch/riscv/include/asm/alternative.h
> @@ -6,8 +6,6 @@
>  #ifndef __ASM_ALTERNATIVE_H
>  #define __ASM_ALTERNATIVE_H
>  
> -#define ERRATA_STRING_LENGTH_MAX 32
> -
>  #include <asm/alternative-macros.h>
>  
>  #ifndef __ASSEMBLY__
> @@ -43,11 +41,6 @@ struct alt_entry {
>  	u32 errata_id;		/* The errata id */
>  };
>  
> -struct errata_checkfunc_id {
> -	unsigned long vendor_id;
> -	bool (*func)(struct alt_entry *alt);
> -};
> -
>  void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
>  			      unsigned long archid, unsigned long impid,
>  			      unsigned int stage);
> -- 
> 2.39.1
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-02-23 23:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 18:55 [PATCH 0/5] riscv: alternative/cpufeature related cleanups Andrew Jones
2023-02-21 18:55 ` [PATCH 1/5] riscv: Rename Kconfig.erratas to Kconfig.errata Andrew Jones
2023-02-23 23:11   ` Conor Dooley
2023-02-24 12:37   ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 2/5] riscv: alternatives: Remove unnecessary define and unused struct Andrew Jones
2023-02-23 23:14   ` Conor Dooley [this message]
2023-02-24 12:44   ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 3/5] riscv: alternatives: Rename errata_id to patch_id Andrew Jones
2023-02-23 23:24   ` Conor Dooley
2023-02-24  8:06     ` Andrew Jones
2023-02-24 12:46   ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 4/5] riscv: lib: Include hwcap.h directly Andrew Jones
2023-02-23 23:25   ` Conor Dooley
2023-02-24 12:46   ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 5/5] riscv: cpufeature: Drop unused includes Andrew Jones
2023-02-23 23:29   ` Conor Dooley
2023-02-24  8:06     ` Andrew Jones
2023-02-24 12:48   ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y/fzUt7gs6U+MANi@spud \
    --to=conor@kernel.org \
    --cc=ajones@ventanamicro.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor.dooley@microchip.com \
    --cc=heiko@sntech.de \
    --cc=jszhang@kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox