From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24B2BC28CBC for ; Wed, 6 May 2020 08:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06ABC20747 for ; Wed, 6 May 2020 08:44:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="sbKgQXQS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728786AbgEFIoA (ORCPT ); Wed, 6 May 2020 04:44:00 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:20797 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727956AbgEFIoA (ORCPT ); Wed, 6 May 2020 04:44:00 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1588754639; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=4zil7m4BIbiPEajht61/E+qHAdulL8Sl3UPj8uL2qSs=; b=sbKgQXQSc/5jEFhJDogAoan+lmcFHsWS9APFGh3kPu1bWxQvbOxQJ7GfoFB0ddzIgMeVmZ+q rca6LHDURWlgiKLWxRAgkeSSOuLhGxfF13PcrPJZe3igoeGwdENx+3ZiLgpNw9cpeEPPjbAS RE9R/R+0rGp8aihBxKoyDrVXA4o= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5eb278be.7feb23bf6fb8-smtp-out-n02; Wed, 06 May 2020 08:43:42 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3E297C43636; Wed, 6 May 2020 08:43:42 +0000 (UTC) Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 877CFC433BA; Wed, 6 May 2020 08:43:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 877CFC433BA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 03/15] mwifiex: avoid -Wstringop-overflow warning From: Kalle Valo In-Reply-To: <20200430213101.135134-4-arnd@arndb.de> References: <20200430213101.135134-4-arnd@arndb.de> To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , "David S. Miller" , Bing Zhao , Marc Yang , Ramesh Radhakrishnan , Kiran Divekar , Arnd Bergmann , Nishant Sarmukadam , Amitkumar Karwar , Yogesh Ashok Powar , Frank Huang , "John W. Linville" , Cathy Luo , James Cao , linux-wireless@vger.kernel.org, netdev@vger.kernel.org User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.5.2 Message-Id: <20200506084342.3E297C43636@smtp.codeaurora.org> Date: Wed, 6 May 2020 08:43:42 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Arnd Bergmann wrote: > gcc-10 reports a warning for mwifiex_cmd_802_11_key_material_v1: > > drivers/net/wireless/marvell/mwifiex/sta_cmd.c: In function 'mwifiex_cmd_802_11_key_material_v1': > cc1: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=] > In file included from drivers/net/wireless/marvell/mwifiex/sta_cmd.c:23: > drivers/net/wireless/marvell/mwifiex/fw.h:993:9: note: at offset 0 to object 'action' with size 2 declared here > 993 | __le16 action; > | ^~~~~~ > > As the warning makes no sense, I reported it as a bug for gcc. In the > meantime using a temporary pointer for the key data makes the code easier > to read and stops the warning. > > Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94881 > Signed-off-by: Arnd Bergmann Patch applied to wireless-drivers-next.git, thanks. 08afb432c996 mwifiex: avoid -Wstringop-overflow warning -- https://patchwork.kernel.org/patch/11521661/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches