Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2295718pxb; Sun, 30 Jan 2022 11:05:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgUCjPZ1yXDOMf+FUx6CtIFZjpNg++6k/lpNoJw50TM2vCBBeMnO73s7Pm/9uRX6Ce5+6/ X-Received: by 2002:a05:6402:50c8:: with SMTP id h8mr18029015edb.144.1643569538327; Sun, 30 Jan 2022 11:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643569538; cv=none; d=google.com; s=arc-20160816; b=qIGR12TGz2+PJkPaWlB/nk1aTfz8UWSwAKprlZzXukCQOUw5VgzfkvXXz3DnADaDq5 I0yeqtM0Vg47cVHZmtY3o6B8sITgb/WBi/orMz2rraTiX4Xw2Vm/8/fwWYVDO01azIei pJRyuth8YtnBMToPrBZ5EDQdUXeLI4xjEgZtmfM0jOxR4kzMZEeh6OCLzI02r+bjukKz 3AiroAmxD5SUUTSrbkY53K/rtm9X6S0wQJqGgK8rjms1yf7KyMMLzdS2GqDgfS0WziM6 jNeE9/vSMtY9ti1nSDa3osel2oeN7+xNcQIOpL5uuQldREsb/gBWgzIZp7CWfa+R9M8D MUAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=EGB5pcd+qGyTvGQvYOl4WSsOqumhupl3FTbt0BS3leI=; b=bBXNXTaZh+gHTBsAVQw5CokDkY30yrPhP7OdkuMlVrPlij44ipyTZg5RF8+9BNoTP3 GgXTdIdn0mwdGCC8GebODhGmj4rDTcOo+5i5wZvGV2jeS5o1Hy9ry0uT1thfdeZew//z T1mzMaRJg9xEqWpI6XvBkMFjKsin++48IhBquRMqk59msAJUFRYudvqwHipn8JHAUIFy CWZ7mmIs4BZsHQWfDFTGCuWNQSbdbIqXbtVS2g9tpq9rwjhwleqxi4ciZZ48kFH5SD/2 hZoHkJTgkimanKYrUAxNWrWatfKY6MGDYP68QfF79sE2rsVrEpGA+XFdAI/nfP2SveTG ywFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a7PvePT6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 r4si6602107edy.369.2022.01.30.11.05.10; Sun, 30 Jan 2022 11:05:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=a7PvePT6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S234607AbiA1JCD (ORCPT + 72 others); Fri, 28 Jan 2022 04:02:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbiA1JCC (ORCPT ); Fri, 28 Jan 2022 04:02:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3D7C061714; Fri, 28 Jan 2022 01:02:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2CFA461DBD; Fri, 28 Jan 2022 09:02:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B82AC340E0; Fri, 28 Jan 2022 09:01:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643360521; bh=31fx5tHLJzU+vPN38r10In2ER25EqDfino7bwR2/XmQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=a7PvePT63NftL8k5FWO7EKdFJ8RTHHZCTaOZAUX4PKNCJRvnmfcwraxBYzEQ/AlC0 N8ZgxSFEYClGxnQsX3rGbH722yPa3AaZ586WVc2gODL+Edn7dG3hErpDtWOXzL+bE5 aBgH0d9WSd2Ni/GePyYeAx7lvNT5XYfui8KgxGfE69oCuyHeBQ8MaeoMJZYX/SZj9f HKhRjKu/p+sFpkT364DRGMYv2jzN7vzy0VgpwduTjP9rLhVfaeGtneo5ApEl3arqsz say5ThVDp1GP98YY73xdRYIFS4QX+gsK3byT0r2IrrgXzpcbpt4ib+oy1u1U/5jQFx +xnJyJNbZAgbQ== From: Kalle Valo To: cgel.zte@gmail.com Cc: luciano.coelho@intel.com, davem@davemloft.net, kuba@kernel.org, trix@redhat.com, johannes.berg@intel.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Minghao Chi , Zeal Robot Subject: Re: [PATCH] dvm: use struct_size over open coded arithmetic References: <20220128080206.1211452-1-chi.minghao@zte.com.cn> Date: Fri, 28 Jan 2022 11:01:54 +0200 In-Reply-To: <20220128080206.1211452-1-chi.minghao@zte.com.cn> (cgel zte's message of "Fri, 28 Jan 2022 08:02:06 +0000") Message-ID: <87o83wi67x.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org cgel.zte@gmail.com writes: > From: Minghao Chi (CGEL ZTE) > > Replace zero-length array with flexible-array member and make use > of the struct_size() helper in kmalloc(). For example: > > struct iwl_wipan_noa_data { > ... > u8 data[]; > }; > > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes. > > Reported-by: Zeal Robot > Signed-off-by: Minghao Chi (CGEL ZTE) > --- > drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) The prefix should be "iwlwifi: dvm:". -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches