From: Kalle Valo <kvalo@kernel•org>
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 <chi.minghao@zte•com.cn>,
Zeal Robot <zealci@zte•com.cn>
Subject: Re: [PATCH] dvm: use struct_size over open coded arithmetic
Date: Fri, 28 Jan 2022 11:01:54 +0200 [thread overview]
Message-ID: <87o83wi67x.fsf@kernel.org> (raw)
In-Reply-To: <20220128080206.1211452-1-chi.minghao@zte.com.cn> (cgel zte's message of "Fri, 28 Jan 2022 08:02:06 +0000")
cgel.zte@gmail•com writes:
> From: Minghao Chi (CGEL ZTE) <chi.minghao@zte•com.cn>
>
> 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 <zealci@zte•com.cn>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte•com.cn>
> ---
> 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
next prev parent reply other threads:[~2022-01-28 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 8:02 [PATCH] dvm: use struct_size over open coded arithmetic cgel.zte
2022-01-28 9:01 ` Kalle Valo [this message]
2022-01-28 9:31 ` [PATCH v2] iwlwifi: " cgel.zte
2022-01-28 12:34 ` Coelho, Luciano
2022-01-28 21:03 ` [PATCH] " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o83wi67x.fsf@kernel.org \
--to=kvalo@kernel$(echo .)org \
--cc=cgel.zte@gmail$(echo .)com \
--cc=chi.minghao@zte$(echo .)com.cn \
--cc=davem@davemloft$(echo .)net \
--cc=johannes.berg@intel$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=luciano.coelho@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=trix@redhat$(echo .)com \
--cc=zealci@zte$(echo .)com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox