From: Kalle Valo <kvalo@codeaurora.org>
To: "Tomislav Požega" <pozega.tomislav@gmail.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
Date: Tue, 24 Sep 2019 08:30:19 +0300 [thread overview]
Message-ID: <87d0fq5kic.fsf@codeaurora.org> (raw)
In-Reply-To: <1569268165-1639-5-git-send-email-pozega.tomislav@gmail.com> ("Tomislav \=\?utf-8\?Q\?Po\=C5\=BEega\=22's\?\= message of "Mon, 23 Sep 2019 21:49:25 +0200")
Tomislav Požega <pozega.tomislav@gmail.com> writes:
> Drop unneeded lines by moving skb data in both main and 10x WMI
> pull service ready event operations.
>
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
> ---
> drivers/net/wireless/ath/ath10k/wmi.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index 59d2d2a..8ab178c 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
> ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
> struct wmi_svc_rdy_ev_arg *arg)
> {
> - struct wmi_service_ready_event *ev;
> + struct wmi_service_ready_event *ev = (void *)skb->data;
> size_t i, n;
>
> if (skb->len < sizeof(*ev))
> return -EPROTO;
>
> - ev = (void *)skb->data;
Actually I prefer the original style, so that we first check the data in
skb is valid and only then assign the data to ev.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: "Tomislav Požega" <pozega.tomislav@gmail.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
Date: Tue, 24 Sep 2019 08:30:19 +0300 [thread overview]
Message-ID: <87d0fq5kic.fsf@codeaurora.org> (raw)
In-Reply-To: <1569268165-1639-5-git-send-email-pozega.tomislav@gmail.com> ("Tomislav \=\?utf-8\?Q\?Po\=C5\=BEega\=22's\?\= message of "Mon, 23 Sep 2019 21:49:25 +0200")
Tomislav Požega <pozega.tomislav@gmail.com> writes:
> Drop unneeded lines by moving skb data in both main and 10x WMI
> pull service ready event operations.
>
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
> ---
> drivers/net/wireless/ath/ath10k/wmi.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index 59d2d2a..8ab178c 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
> ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
> struct wmi_svc_rdy_ev_arg *arg)
> {
> - struct wmi_service_ready_event *ev;
> + struct wmi_service_ready_event *ev = (void *)skb->data;
> size_t i, n;
>
> if (skb->len < sizeof(*ev))
> return -EPROTO;
>
> - ev = (void *)skb->data;
Actually I prefer the original style, so that we first check the data in
skb is valid and only then assign the data to ev.
--
Kalle Valo
next prev parent reply other threads:[~2019-09-24 5:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
2019-09-23 19:49 ` Tomislav Požega
2019-09-23 19:49 ` [PATCH 2/5] ath10k: print service ready returned channel range Tomislav Požega
2019-09-23 19:49 ` Tomislav Požega
2019-09-23 19:49 ` [PATCH 3/5] ath10k: print supported MCS rates within service ready event Tomislav Požega
2019-09-23 19:49 ` Tomislav Požega
2019-09-23 19:49 ` [PATCH 4/5] ath10k: change sw version print format to hex Tomislav Požega
2019-09-23 19:49 ` Tomislav Požega
2019-09-23 19:49 ` [PATCH 5/5] ath10k: pull_svc_rdy code-style fix Tomislav Požega
2019-09-23 19:49 ` Tomislav Požega
2019-09-24 5:30 ` Kalle Valo [this message]
2019-09-24 5:30 ` Kalle Valo
2019-09-24 7:49 ` Tom Psyborg
2019-09-24 7:49 ` Tom Psyborg
2019-10-04 18:56 ` Jeff Johnson
2019-10-04 18:56 ` Jeff Johnson
2019-10-01 11:15 ` [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Kalle Valo
2019-10-01 11:15 ` Kalle Valo
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=87d0fq5kic.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pozega.tomislav@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.