From: Xiang W Date: Mon, 11 Dec 2023 15:28:15 +0800 Subject: [PATCH 3/3] lib: sbi_ipi: Drop unnecessary ipi_process check In-Reply-To: <20231208212301.3649930-4-samuel.holland@sifive.com> References: <20231208212301.3649930-1-samuel.holland@sifive.com> <20231208212301.3649930-4-samuel.holland@sifive.com> Message-ID: List-Id: To: opensbi@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ? 2023-12-08???? 13:22 -0800?Samuel Holland??? > sbi_ipi_event_create() disallows registering an IPI event with a NULL > .process callback, so the function pointer will never be NULL here. > > Signed-off-by: Samuel Holland LGTM Reviewed-by: Xiang W > --- > > ?lib/sbi/sbi_ipi.c | 2 +- > ?1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c > index ac31cd94..1115912b 100644 > --- a/lib/sbi/sbi_ipi.c > +++ b/lib/sbi/sbi_ipi.c > @@ -241,7 +241,7 @@ void sbi_ipi_process(void) > ? while (ipi_type) { > ? if (ipi_type & 1UL) { > ? ipi_ops = ipi_ops_array[ipi_event]; > - if (ipi_ops && ipi_ops->process) > + if (ipi_ops) > ? ipi_ops->process(scratch); > ? } > ? ipi_type = ipi_type >> 1; > -- > 2.42.0 > >