* [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code
@ 2026-04-02 15:33 Bart Van Assche
2026-04-03 1:18 ` Martin K. Petersen
2026-04-09 2:42 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2026-04-02 15:33 UTC (permalink / raw)
To: Martin K . Petersen
Cc: linux-scsi, Bart Van Assche, Hannes Reinecke,
James E.J. Bottomley
Fix the following compiler warnings:
aicasm_gram.y:1107:24: warning: comparison of different enumeration types
('scope_type' and 'enum yytokentype') [-Wenum-compare]
1107 | || last_scope->type == T_ELSE) {
| ~~~~~~~~~~~~~~~~ ^ ~~~~~~
aicasm_scan.l:392:14: warning: using the result of an assignment as a condition
without parentheses [-Wparentheses]
392 | while (c = *yptr++) {
| ~~^~~~~~~~~
aicasm_macro_scan.l:153:1: warning: non-void function does not return a value
[-Wreturn-type]
153 | }
| ^
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/aic7xxx/aicasm/aicasm.h | 2 +-
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 2 +-
drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.h b/drivers/scsi/aic7xxx/aicasm/aicasm.h
index 716a2aefc925..f290b50c6475 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm.h
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm.h
@@ -82,7 +82,7 @@ extern int src_mode;
extern int dst_mode;
struct symbol;
-void stop(const char *errstring, int err_code);
+void __attribute__((noreturn)) stop(const char *errstring, int err_code);
void include_file(char *file_name, include_type type);
void expand_macro(struct symbol *macro_symbol);
struct instruction *seq_alloc(void);
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index b1c9ce477cbd..f6dbb9855daa 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -1104,7 +1104,7 @@ conditional:
last_scope = TAILQ_LAST(&scope_context->inner_scope,
scope_tailq);
if (last_scope == NULL
- || last_scope->type == T_ELSE) {
+ || last_scope->type == (int)T_ELSE) {
stop("'else if' without leading 'if'", EX_DATAERR);
/* NOTREACHED */
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
index fc7e6c58148d..c0d92cf5f9b5 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
@@ -389,7 +389,7 @@ nop { return T_NOP; }
char c;
yptr = yytext;
- while (c = *yptr++) {
+ while ((c = *yptr++)) {
/*
* Strip carriage returns.
*/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code
2026-04-02 15:33 [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code Bart Van Assche
@ 2026-04-03 1:18 ` Martin K. Petersen
2026-04-09 2:42 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2026-04-03 1:18 UTC (permalink / raw)
To: Bart Van Assche
Cc: Martin K . Petersen, linux-scsi, Hannes Reinecke,
James E.J. Bottomley
Bart,
> Fix the following compiler warnings:
Applied to 7.1/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code
2026-04-02 15:33 [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code Bart Van Assche
2026-04-03 1:18 ` Martin K. Petersen
@ 2026-04-09 2:42 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2026-04-09 2:42 UTC (permalink / raw)
To: Bart Van Assche
Cc: Martin K . Petersen, linux-scsi, Hannes Reinecke,
James E.J. Bottomley
On Thu, 02 Apr 2026 08:33:33 -0700, Bart Van Assche wrote:
> Fix the following compiler warnings:
>
> aicasm_gram.y:1107:24: warning: comparison of different enumeration types
> ('scope_type' and 'enum yytokentype') [-Wenum-compare]
> 1107 | || last_scope->type == T_ELSE) {
> | ~~~~~~~~~~~~~~~~ ^ ~~~~~~
> aicasm_scan.l:392:14: warning: using the result of an assignment as a condition
> without parentheses [-Wparentheses]
> 392 | while (c = *yptr++) {
> | ~~^~~~~~~~~
> aicasm_macro_scan.l:153:1: warning: non-void function does not return a value
> [-Wreturn-type]
> 153 | }
> | ^
>
> [...]
Applied to 7.1/scsi-queue, thanks!
[1/1] scsi: aic7xxx: Fix compiler warnings triggered by user space code
https://git.kernel.org/mkp/scsi/c/1821f77fdaec
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-09 2:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 15:33 [PATCH] scsi: aic7xxx: Fix compiler warnings triggered by user space code Bart Van Assche
2026-04-03 1:18 ` Martin K. Petersen
2026-04-09 2:42 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox