lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240531081337.536182-1-tanzheng@kylinos.cn>
Date: Fri, 31 May 2024 16:13:37 +0800
From: zheng tan <tanzheng@...inos.cn>
To: hare@...e.com,
	James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zheng tan <tanzheng@...inos.cn>,
	k2ci <kernel-bot@...inos.cn>
Subject: [PATCH] scsi: aic7xxx: Fix some build warning

From: Zheng tan <tanzheng@...inos.cn>

Fixed some warnings in compilation:

aicasm_gram.c:1562:16: warning: implicit declaration of function ‘yylex’
yychar = yylex ();

aicasm_scan.l:417:6: warning: implicit declaration of function ‘mm_switch_to_buffer’
      mm_switch_to_buffer(old_state);
      ^~~~~~~~~~~~~~~~~~~
      yy_switch_to_buffer
aicasm_scan.l:418:6: warning: implicit declaration of function ‘mmparse’
      mmparse();
      ^~~~~~~
      yyparse
aicasm_scan.l:421:6: warning: implicit declaration of function ‘mm_delete_buffer’
      mm_delete_buffer(temp_state);

Reported-by: k2ci <kernel-bot@...inos.cn>
Signed-off-by: Zheng tan <tanzheng@...inos.cn>
---
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y       | 2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | 2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_scan.l       | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index 65182ad9cdf8..ac96fb9152b6 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -103,7 +103,7 @@ static void add_version(const char *verstring);
 static int  is_download_const(expression_t *immed);
 static int  is_location_address(symbol_t *symbol);
 void yyerror(const char *string);
-
+int yylex(void);
 #define SRAM_SYMNAME "SRAM_BASE"
 #define SCB_SYMNAME "SCB_BASE"
 %}
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
index 8c0479865f04..d787b2f89007 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
@@ -62,7 +62,7 @@ static symbol_t *macro_symbol;
 
 static void add_macro_arg(const char *argtext, int position);
 void mmerror(const char *string);
-
+int mmlex(void);
 %}
 
 %union {
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
index c78d4f68eea5..8214d7eaef1d 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
@@ -56,6 +56,7 @@
 #include "aicasm.h"
 #include "aicasm_symbol.h"
 #include "aicasm_gram.h"
+#include "aicasm_macro_gram.h"
 
 /* This is used for macro body capture too, so err on the large size. */
 #define MAX_STR_CONST 4096
@@ -414,11 +415,11 @@ nop			{ return T_NOP; }
 					    yy_create_buffer(stdin,
 							     YY_BUF_SIZE);
 					yy_switch_to_buffer(temp_state);
-					mm_switch_to_buffer(old_state);
+					yy_switch_to_buffer(old_state);
 					mmparse();
-					mm_switch_to_buffer(temp_state);
+					yy_switch_to_buffer(temp_state);
 					yy_switch_to_buffer(old_state);
-					mm_delete_buffer(temp_state);
+					yy_delete_buffer(temp_state);
 					expand_macro(yylval.sym);
 				} else {
 					if (yylval.sym->type == UNINITIALIZED) {
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ