From patchwork Tue Jul 7 14:00:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235004 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp942222ilg; Tue, 7 Jul 2020 07:01:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLQ1sL6wp1DbU26zFagtIGxxJW5q7XItXg6BHXK0Y1Eww83vUH6zbRw4oUT/LoKfljEF2I X-Received: by 2002:a17:907:376:: with SMTP id rs22mr22973925ejb.47.1594130475451; Tue, 07 Jul 2020 07:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594130475; cv=none; d=google.com; s=arc-20160816; b=gJZ1nCBmoRMA0p0FkMD2PAICIyoRGm73Njg4Jw5+FS1I1fBv7PAKpy0oA5uHT6/WMe o8P9PDxpdHK0xpII3iwTWaIUrW/WP8fiezs/cDNP9qsMhcOBTr4Bp30Ls7pWJK0jbA6B EQ3eoUSi7S9sBJVqFruhhK/uNb07gdg/Ons+iFxuN9wpaR9EU/oXSIf5/rG1/mlB1Zei erMFACP7Toj1BqzI8cAW8NZCmNlO9KdF+wsrlTQjenMMlpiSMvQPtIynRsmcg/n4h5Of myeAD349qGAuKIjRLXF8cD/Y3Ln9z41lXd9rjwCe2SZDist0XlCljHUz+nD27r2EZPyy CucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Otr0IW/lc2aubOhQuGn1p9ls5bh+wk/N6Wv8oEf4Osw=; b=d5k649ap+GN0AL2lI3yrwiZOA0QX5IALbpMMegrGpeXtMzQVtXzxLrPDAV1XfwlhAf PdM0nTxovONQNWRXIiXLPCJHD0Dnmkc0yDaxgzcgKv6ha6B+AE15pXjoG3Hk1TvND5OS Djwik3cX7/DN2jJIZOZkXAy7YRE/x1QJcuDPVwOv0mjLWNNefJAjFofykNrqx3/BnUhE Y2VDfQtmuWgnYA+B+tPMP9eMPs6iv5+TtBNBRo5xTjT6gnY2aMFC/0ICInbiQo8ClGR6 W5AnjQbjsyaIHbZnp2SJQJVRC47jeCTXFE0CAsuG6IYnj7LN6cZcjnlPgB6VlpYMmYBR mPQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBvBoIuz; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si15170651edq.465.2020.07.07.07.01.15 for ; Tue, 07 Jul 2020 07:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBvBoIuz; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728280AbgGGOBO (ORCPT ); Tue, 7 Jul 2020 10:01:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728264AbgGGOBN (ORCPT ); Tue, 7 Jul 2020 10:01:13 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F655C08C5E1 for ; Tue, 7 Jul 2020 07:01:13 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f7so42241391wrw.1 for ; Tue, 07 Jul 2020 07:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Otr0IW/lc2aubOhQuGn1p9ls5bh+wk/N6Wv8oEf4Osw=; b=HBvBoIuzw1P53PX21z9xl0S2Ei5cCmdfti89y/X22YhzPD8leJdxCyYAe5MqjAAObx t1E1P2P9Mt2oi9isgC0/LHnqeHNKZYWtJaO+qhuy07fzjZUTGXrc+CimfVho9ZGf/ZWU FDKy8A+01W+GzzbMSh0NL/QIw5GrC1SzMU8Ku91XKRykA1P90kFf0lvjwOf9VATuJ2AA 9517Y+eDIrAIT5wZd8ZZtjlif5PsJkDCzQ/IYlFfSzlxY79jehb6IrMwyQxTx7/P8qGZ eTJ9g4UC2LIojpNdHyExhVDGr4hCe53uRJOxLjIosZU7CLcCCZeB1c2aAfcu+QhcE4go aC+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Otr0IW/lc2aubOhQuGn1p9ls5bh+wk/N6Wv8oEf4Osw=; b=TPM6kgCBZ3vZCzFcyNoUxr4c9on2tlrN6axoelFDrMHBxvSuD76j6XzBfNzuZp8W+n pXeglBd4JmoC3O0Jpu4YGkPrctDZy9vbT3ZtR5zaQn/3H0xUaRmqvG/FhBSxGEqLVGb6 FX+CLKmxgLPld3myMbYnWVC/4PBsVawo5EWk2OJo/sORc6vHrDjWyZJf0P/YPVWFftRZ NJC2YZw5BNWmtW7r3pymi+DLMAVSLUXzjAU3LfOF1kiatCuJv5cgfxZiYRGiGwCvAyw1 LS16xRsZ9+bmAHlosilYsUClGY9IlRSpVREO2HpSvnjAMggoGnUxNs/V3Ic2XnjzhA8M AJ4Q== X-Gm-Message-State: AOAM5311LFbOW8Vkjuhx7ErEp5GUjrzbX8of+gb3Go0mXZQg3wGHmP3z e+w2fcjIOo5BTvsFjpNOaRMJRw== X-Received: by 2002:adf:e647:: with SMTP id b7mr57813003wrn.170.1594130471901; Tue, 07 Jul 2020 07:01:11 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.206]) by smtp.gmail.com with ESMTPSA id z25sm1102823wmk.28.2020.07.07.07.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 07:01:11 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Lee Jones , Kashyap Desai , Sumit Saxena , Shivasharan S , megaraidlinux.pdl@broadcom.com Subject: [PATCH 10/10] scsi: megaraid: megaraid_sas: Convert forward-declarations to prototypes Date: Tue, 7 Jul 2020 15:00:55 +0100 Message-Id: <20200707140055.2956235-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200707140055.2956235-1-lee.jones@linaro.org> References: <20200707140055.2956235-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/scsi/megaraid/megaraid_sas_base.c:240:5: warning: no previous prototype for ‘megasas_readl’ [-Wmissing-prototypes] 240 | u32 megasas_readl(struct megasas_instance *instance, | ^~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:301:21: warning: no previous prototype for ‘megasas_get_cmd’ [-Wmissing-prototypes] 301 | struct megasas_cmd *megasas_get_cmd(struct megasas_instance | ^~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:327:1: warning: no previous prototype for ‘megasas_return_cmd’ [-Wmissing-prototypes] 327 | megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd) | ^~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:1088:1: warning: no previous prototype for ‘megasas_issue_polled’ [-Wmissing-prototypes] 1088 | megasas_issue_polled(struct megasas_instance *instance, struct megasas_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:2149:6: warning: no previous prototype for ‘megaraid_sas_kill_hba’ [-Wmissing-prototypes] 2149 | void megaraid_sas_kill_hba(struct megasas_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:2186:1: warning: no previous prototype for ‘megasas_check_and_restore_queue_depth’ [-Wmissing-prototypes] 2186 | megasas_check_and_restore_queue_depth(struct megasas_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:2263:6: warning: no previous prototype for ‘megasas_start_timer’ [-Wmissing-prototypes] 2263 | void megasas_start_timer(struct megasas_instance *instance) | ^~~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:2579:5: warning: no previous prototype for ‘megasas_sriov_start_heartbeat’ [-Wmissing-prototypes] 2579 | int megasas_sriov_start_heartbeat(struct megasas_instance *instance, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:4292:6: warning: no previous prototype for ‘megasas_free_cmds’ [-Wmissing-prototypes] 4292 | void megasas_free_cmds(struct megasas_instance *instance) | ^~~~~~~~~~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:4329:5: warning: no previous prototype for ‘megasas_alloc_cmds’ [-Wmissing-prototypes] 4329 | int megasas_alloc_cmds(struct megasas_instance *instance) | ^~~~~~~~~~~~~~~~~~ Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: megaraidlinux.pdl@broadcom.com Signed-off-by: Lee Jones --- drivers/scsi/megaraid/megaraid_sas.h | 25 +++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 29 --------------------- 2 files changed, 24 insertions(+), 30 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index af2c7a2a95657..5c8037fca5fc6 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -2683,8 +2683,31 @@ void megasas_return_cmd_fusion(struct megasas_instance *instance, struct megasas_cmd_fusion *cmd); int megasas_issue_blocked_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, int timeout); -void __megasas_return_cmd(struct megasas_instance *instance, +void megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); +u32 megasas_readl(struct megasas_instance *instance, + const volatile void __iomem *addr); +void megasas_free_cmds(struct megasas_instance *instance); +struct megasas_cmd *megasas_get_cmd(struct megasas_instance *instance); +void megaraid_sas_kill_hba(struct megasas_instance *instance); +void megasas_complete_cmd(struct megasas_instance *instance, + struct megasas_cmd *cmd, u8 alt_status); +int wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, + int seconds); + +int megasas_alloc_cmds(struct megasas_instance *instance); +int megasas_clear_intr_fusion(struct megasas_instance *instance); +int megasas_issue_polled(struct megasas_instance *instance, + struct megasas_cmd *cmd); +void megasas_check_and_restore_queue_depth(struct megasas_instance *instance); + +int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); +void megaraid_sas_kill_hba(struct megasas_instance *instance); + +extern u32 megasas_dbg_lvl; +int megasas_sriov_start_heartbeat(struct megasas_instance *instance, + int initial); +void megasas_start_timer(struct megasas_instance *instance); void megasas_return_mfi_mpt_pthr(struct megasas_instance *instance, struct megasas_cmd *cmd_mfi, struct megasas_cmd_fusion *cmd_fusion); diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index a0cf55776361c..fd0f40bc1795d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -48,34 +48,7 @@ #include "megaraid_sas.h" -extern void megasas_free_cmds(struct megasas_instance *instance); -extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance - *instance); -extern void -megasas_complete_cmd(struct megasas_instance *instance, - struct megasas_cmd *cmd, u8 alt_status); -int -wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, - int seconds); - -void -megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); -int megasas_alloc_cmds(struct megasas_instance *instance); -int -megasas_clear_intr_fusion(struct megasas_instance *instance); -int -megasas_issue_polled(struct megasas_instance *instance, - struct megasas_cmd *cmd); -void -megasas_check_and_restore_queue_depth(struct megasas_instance *instance); - -int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); -void megaraid_sas_kill_hba(struct megasas_instance *instance); -extern u32 megasas_dbg_lvl; -int megasas_sriov_start_heartbeat(struct megasas_instance *instance, - int initial); -void megasas_start_timer(struct megasas_instance *instance); extern struct megasas_mgmt_info megasas_mgmt_info; extern unsigned int resetwaittime; extern unsigned int dual_qdepth_disable; @@ -84,8 +57,6 @@ static void megasas_free_reply_fusion(struct megasas_instance *instance); static inline void megasas_configure_queue_sizes(struct megasas_instance *instance); static void megasas_fusion_crash_dump(struct megasas_instance *instance); -extern u32 megasas_readl(struct megasas_instance *instance, - const volatile void __iomem *addr); /** * megasas_adp_reset_wait_for_ready - initiate chip reset and wait for