From patchwork Mon Mar 22 16:46:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406174 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3724498jai; Mon, 22 Mar 2021 09:47:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM7zORF8oRpHirXbIDZw+cHwZ7T4NOct7y4FctGADUmj9xTIxHrHRKjvAJaDifxLVV1CKw X-Received: by 2002:aa7:cf17:: with SMTP id a23mr575855edy.30.1616431678651; Mon, 22 Mar 2021 09:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616431678; cv=none; d=google.com; s=arc-20160816; b=Da9VC7TwWDsR7c45IVngA8hwdyvWbz1l/niee4/rkREoivKh8PLLYOY+9ITQivlB8v 3kAb+cno/cVeSbEi0hfuGeUbLX4Q8uT3Omj1Czmf/yqYJdeUdg7OjtcuPwLUodyO9lix JyW2D+Ou2G4CEZ+eeiTx3VEAl/3D+TZlLX9jpS+vxhVDcWSa8X8cAxUDdi6SblLavnHl 3mBjWtMsGShG5rvsAEg2ZHRbFRDmj2zmMUOKNxlHUn2ZV/FOlz4/Bq+wv1jAE+83mINz uT78Fu/aNwVOt5KFvubaym7vuh+l0TmHAJ9cp/9TezrQ/6HMNorUpFF6gjayZr3XGQLj v4uw== 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:dkim-signature; bh=iXrNupMrsAMr4MPId0w6iLQ+F+uJCWec+s/avnNNlmU=; b=U4nLM9yK45Fj7lmZq0OokuosV21jJvj4xyVVxTJCmjr7Gbo9siwbpPqRDliaiBXdza /+SmlrKoeZKgIiCNm+HXe6w0lDRmrDsHPE/vPIJ4uEbwwLuuOQWJGS3Rf++rATTpK5IE 89JF6ucYMxm3DDXX4TRwUThQESNL4W0J/pFXMeevR0kX68/1VcvI09felwdPTJ/REQSS cNFQ+gUFYlvYJ2i0g69Vh1hSpd+gzm3ZYQaLL31Ujo6sfAjQfsFnbzjhVddBVqp83S9h GqXv7PsqUnLLKFy93koLpuezBk33AER2s7H9gWRI8JC4zZZCj4Bhx79AtOfN765Cq24W 6S6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G8gq65Af; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si11030041edr.51.2021.03.22.09.47.58 for ; Mon, 22 Mar 2021 09:47:58 -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=@kernel.org header.s=k20201202 header.b=G8gq65Af; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231374AbhCVQrY (ORCPT ); Mon, 22 Mar 2021 12:47:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:36152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhCVQrH (ORCPT ); Mon, 22 Mar 2021 12:47:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3093560249; Mon, 22 Mar 2021 16:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616431626; bh=7jkwwQTMKRF9ZixAWWyF6DidhPZvbea3WyoahROBIyw=; h=From:To:Cc:Subject:Date:From; b=G8gq65AfreIBay9epyWXjQoS6rNig65gO8hvNqXH5F/0d3XGyxdKqaAcinh12c5cI TshE9ie+EEOgjybdaKWMBV/mSQ+G4AiUtfN9ySg5OY8qITWuD71GZ2QVlCi2tDKczt ihGwHVpod9PEWv51NVFg5eNrVo+KCH9h+i2OyOwjTKFEgwRFNd5laj7A8r3SP5b75m jTZ9Q6eDSB5bh8DwdlfVu2FCj9FMGkj/8pEGIajWSNcdIY3QW9dQLEpKuaWMntywJ+ AO2mE2Ee4uFqt7be4EZiKpe5JBvn3i7Gu1y95B/E8z35NsJxBjwJPTR6zcGv6QiAZ3 9WzYB8LZXL9xg== From: Arnd Bergmann To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Robert Love , James Bottomley , Vasu Dev Cc: Arnd Bergmann , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: fcoe: fix mismatched fcoe_wwn_from_mac declaration Date: Mon, 22 Mar 2021 17:46:59 +0100 Message-Id: <20210322164702.957810-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arnd Bergmann An old cleanup changed the array size from MAX_ADDR_LEN to unspecified in the declaration, but now gcc-11 warns about this: drivers/scsi/fcoe/fcoe_ctlr.c:1972:37: error: argument 1 of type ‘unsigned char[32]’ with mismatched bound [-Werror=array-parameter=] 1972 | u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /git/arm-soc/drivers/scsi/fcoe/fcoe_ctlr.c:33: include/scsi/libfcoe.h:252:37: note: previously declared as ‘unsigned char[]’ 252 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); | ~~~~~~~~~~~~~~^~~~~ Change the type back to what the function definition uses. Fixes: fdd78027fd47 ("[SCSI] fcoe: cleans up libfcoe.h and adds fcoe.h for fcoe module") Signed-off-by: Arnd Bergmann --- include/scsi/libfcoe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 2568cb0627ec..fac8e89aed81 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -249,7 +249,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *, struct fc_lport *, struct fc_frame *); /* libfcoe funcs */ -u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); +u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], unsigned int, unsigned int); int fcoe_libfc_config(struct fc_lport *, struct fcoe_ctlr *, const struct libfc_function_template *, int init_fcp); u32 fcoe_fc_crc(struct fc_frame *fp);