From patchwork Tue Oct 10 01:59:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lu Yao X-Patchwork-Id: 150440 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2227550vqo; Mon, 9 Oct 2023 19:01:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwNc3nTV/9ALCqq6DE0W57yNPHplVV4zXnBysciNnwQXHQBH6M59KHscFqlNfTb0GIZ+7c X-Received: by 2002:a9d:6f99:0:b0:6c4:fc6d:88fb with SMTP id h25-20020a9d6f99000000b006c4fc6d88fbmr17033294otq.33.1696903293613; Mon, 09 Oct 2023 19:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696903293; cv=none; d=google.com; s=arc-20160816; b=o6DlQgFFrBq7Bk2uNRtslgTLnwywk/lfCuUoYWhX8HpjPzttia0h9vlxw5g/c3WugN KAQcMn5ZqnNYZ5pMiQrPWHGcUvWp2nDTk3f9gDV6LZjtdp3d2Fzc6lgyxNyKhLbbgKxV xH6jpTryg8Nfmnpad53iKAZ8AoKBzZQ82UrfrQRKXpJw2fh1vnCV8nGtnAHi60oUgXJh qMxX+f55jGeaqnUg6z3SFgJZu2GPVNiJEa6C1poMx5pShebduv0//wAn/rdwaq6n83p8 nwy4+ifUBZrQicPwkb6tYz0+JC1y9ZxRW52i1nK0oSKyIKwG+pWvwO/kreeu5TVp7Vow Z6yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9COiPdwCgZvZWXQCV/C4jXq+cU1CjLfqwUz64OPVzfA=; fh=OClo3n8Gj1pZGqoHJvzmTeteC3m+7Jav6WAeHOYbtvg=; b=hvljdDLKxAsH/g3HFbWNJ/xhYAZS2+vY3MJv1H7r59UyfDhjPK8ejn2dQEcafYFWoA 8MolOhEgkCTy5HrTPVoqdTxFwZJMhVNkK1+iEJQTKk21nkTrPAGFmLH/vE2wpG/xezlv 3IYq41nvHmw5m5lkjyxy4PUscWP2ja7buT2lMCdlMCaRgnIG4QJjAT0fAI+OuF2qtp9w XacVGHnSh4xko/4iLbJg2VaA9qjw+FTYjip7UBR/oezEmgUZEEWo6SXRTuAcOe+H1a9z 9hDK2k1GbH73HKQAna0iyUEfoNRjsHV2svISbpXn/xXKb1xn6wXaMK5YiesScVH8Wo1v 4y/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bt8-20020a632908000000b005774bb908d0si10108417pgb.132.2023.10.09.19.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 19:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DE4F380B7C13; Mon, 9 Oct 2023 19:01:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441801AbjJJCAC (ORCPT + 20 others); Mon, 9 Oct 2023 22:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378945AbjJJCAB (ORCPT ); Mon, 9 Oct 2023 22:00:01 -0400 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EAA28F; Mon, 9 Oct 2023 18:59:50 -0700 (PDT) X-UUID: 5f6a0846977943199b4452c4cbcdd13c-20231010 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:3bee9790-88c2-4661-aca1-cf7c02a62ad7,IP:15, URL:0,TC:0,Content:-25,EDM:0,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:-15 X-CID-INFO: VERSION:1.1.32,REQID:3bee9790-88c2-4661-aca1-cf7c02a62ad7,IP:15,UR L:0,TC:0,Content:-25,EDM:0,RT:0,SF:-5,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-15 X-CID-META: VersionHash:5f78ec9,CLOUDID:773d9cf0-9a6e-4c39-b73e-f2bc08ca3dc5,B ulkID:231010093340A5656J4H,BulkQuantity:1,Recheck:0,SF:24|17|19|44|102,TC: nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:40,QS:nil,BEC:nil,COL:0,OSI :0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS X-UUID: 5f6a0846977943199b4452c4cbcdd13c-20231010 X-User: yaolu@kylinos.cn Received: from localhost.localdomain [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 399756980; Tue, 10 Oct 2023 09:59:38 +0800 From: Lu Yao To: hare@suse.com Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Yao Subject: [PATCH] scsi: aic7xxx: Fix build 'aicasm' warning Date: Tue, 10 Oct 2023 09:59:35 +0800 Message-Id: <20231010015935.478006-1-yaolu@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 19:01:26 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779332067940669039 X-GMAIL-MSGID: 1779332067940669039 When building with CONFIG_AIC7XXX_BUILD_FIRMWARE=y or CONFIG_AIC79XX_BUILD_FIRMWARE=y, the warning message is as follow: aicasm_gram.tab.c:1722:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration] aicasm_macro_gram.c:68:25: warning: implicit declaration of function ‘mmlex’ [-Wimplicit-function-declaration] aicasm_scan.l:417:6: warning: implicit declaration of function ‘mm_switch_to_buffer’ aicasm_scan.l:418:6: warning: implicit declaration of function ‘mmparse’ aicasm_scan.l:421:6: warning: implicit declaration of function ‘mm_delete_buffer’ The solution is to add the corresponding function declaration to the corresponding file. Signed-off-by: Lu Yao --- drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 1 + drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | 1 + drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 3 +++ 3 files changed, 5 insertions(+) diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index 65182ad9cdf8..b1c9ce477cbd 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -102,6 +102,7 @@ static void add_conditional(symbol_t *symbol); static void add_version(const char *verstring); static int is_download_const(expression_t *immed); static int is_location_address(symbol_t *symbol); +int yylex(); void yyerror(const char *string); #define SRAM_SYMNAME "SRAM_BASE" diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y index 8c0479865f04..5c7350eb5b5c 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y @@ -61,6 +61,7 @@ static symbol_t *macro_symbol; static void add_macro_arg(const char *argtext, int position); +int mmlex(); void mmerror(const char *string); %} diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l index c78d4f68eea5..fc7e6c58148d 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l @@ -64,6 +64,9 @@ static char *string_buf_ptr; static int parren_count; static int quote_count; static char buf[255]; +void mm_switch_to_buffer(YY_BUFFER_STATE); +void mmparse(); +void mm_delete_buffer(YY_BUFFER_STATE); %} PATH ([/]*[-A-Za-z0-9_.])+