From patchwork Mon Mar 22 16:44:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406171 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3722755jai; Mon, 22 Mar 2021 09:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9yS/MYH2M6qsAXjN5x9ofBjsI5ICyrgPF8dfsScGzygsegGthK0KkR1RSY6k7zQkzCVZD X-Received: by 2002:a17:906:b297:: with SMTP id q23mr678487ejz.315.1616431528933; Mon, 22 Mar 2021 09:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616431528; cv=none; d=google.com; s=arc-20160816; b=I1ZiAy9VTO66EAofCNtiv8XD9s+In4/wXC+UKz2Bm4I0vlu+XQuvzP9/JLgvLCJYjc ySmp0ov76lxoeewr/Mobw7gXu2HzbUTGkfKuyThRl1psjWdMVC0QjlK7q9oezA/YZ9Gr QJqNzM7pJ0w7NNOamKA5xgf1VGW3Nk/62v7t1k1BQ9uOKnqf0PrE9B80PmNMNKW2Ovo3 NunEexdQwIOZQ/fiy1xSTFRqQNgdXzMFdL8DtBM+oDSr/R3ez5W64Ds52ibpz8VQm8cL k0lMhowP6Fk/Z7AqEFFFQse5xy0tCZ5OJYEGrsBn3qu0nbW3Es0jno3J3U6QAG4TeZVR +TUg== 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=a6vGcYkEwXvTul0W2eBQGLYuiPI4UlKgE/l5+1FjA+8=; b=ivnesWp2yscU2n5bk657xZXx0oop2k27dJTxTTzDART6RE3BRU41hMB2Pa3pnGG3q1 VmUJCeJ0pdguffTuB3sdAGQejfjUbovl7VcySGT4Q8/MslXsM0E9PdFO8ypKsnbf+5gw 7B9VsQJHWqhnAoT1r3eQwhg5dtiAW3hLc4z2iBq9/T1KmAMxfPvJIDgzkh4AxjLyEY+R rJGjpuYKLhROo+q66Ki6YynqydB3zmgIr99G0uKvRH0LjKidsy+p6xw9mkwoEKIJR5Um DaC7KutatLYfipE9IC6Zu5/D5BEl5a7OVQhL5ALffPkFx78NYlYPkROm0hAQ9w7FZAm3 Jnmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sjqt6owP; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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.45.28; Mon, 22 Mar 2021 09:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=sjqt6owP; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S230087AbhCVQo7 (ORCPT + 8 others); Mon, 22 Mar 2021 12:44:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:35468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbhCVQox (ORCPT ); Mon, 22 Mar 2021 12:44:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B3866157F; Mon, 22 Mar 2021 16:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616431493; bh=cgxEyWWxWMLS8CQf76WqHFO4Irvj44kjG2TqRGl58zo=; h=From:To:Cc:Subject:Date:From; b=sjqt6owPFwii84L04miltanmCepnNwV8IugPcOZx+HGkD7PdVgB+Hw82QIC8Ua4Dr 4tP2fnl/yDW7bUgBvHkd3KRx+JcVGq01+t+5XChGJc70mDt/KG57lBjj4SFAJDSzEx PUeRh80/0l8/Qe5YCZB4SjX0AxmIMjUEZFugsQhl4Jpr17eo2xCu4CKumIEWng5hsT Igs01r432rd8lFRgo+GPHUjp2WaloOmD6zGUkId9B8X+cLyRanftTjXDGLd4LXTcOj d5uMS6NcVH2N0FXPQh8ru1hx+ydbuqWbr6K9h+uoCKnKvIuE+OUVT0jriN7KjI9aK/ hHF+DpCxHWHVQ== From: Arnd Bergmann To: Karsten Keil Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] isdn: capi: fix mismatched prototypes Date: Mon, 22 Mar 2021 17:44:29 +0100 Message-Id: <20210322164447.876440-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc-11 complains about a prototype declaration that is different from the function definition: drivers/isdn/capi/kcapi.c:724:44: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=] 724 | u16 capi20_get_manufacturer(u32 contr, u8 *buf) | ~~~~^~~ In file included from drivers/isdn/capi/kcapi.c:13: drivers/isdn/capi/kcapi.h:62:43: note: previously declared as an array ‘u8[64]’ {aka ‘unsigned char[64]’} 62 | u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/isdn/capi/kcapi.c:790:38: error: argument 2 of type ‘u8 *’ {aka ‘unsigned char *’} declared as a pointer [-Werror=array-parameter=] 790 | u16 capi20_get_serial(u32 contr, u8 *serial) | ~~~~^~~~~~ In file included from drivers/isdn/capi/kcapi.c:13: drivers/isdn/capi/kcapi.h:64:37: note: previously declared as an array ‘u8[8]’ {aka ‘unsigned char[8]’} 64 | u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~ Change the definition to make them match. Signed-off-by: Arnd Bergmann --- drivers/isdn/capi/kcapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.29.2 diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 7168778fbbe1..cb0afe897162 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -721,7 +721,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb) * Return value: CAPI result code */ -u16 capi20_get_manufacturer(u32 contr, u8 *buf) +u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]) { struct capi_ctr *ctr; u16 ret; @@ -787,7 +787,7 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp) * Return value: CAPI result code */ -u16 capi20_get_serial(u32 contr, u8 *serial) +u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]) { struct capi_ctr *ctr; u16 ret;