Message ID | 99d0ff42e57d5f62560e72d926b4d69d5d7c418b.1479974100.git.kirtika@chromium.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
On 24 November 2016 at 09:01, Kirtika Ruchandani <kirtika.ruchandani@gmail.com> wrote: > Commit ca996ec56608 (ath10k: implement wmi-tlv backend) > introduced ath10k_wmi_tlv_op_gen_vdev_start() where > 'struct wmi_p2p_noa_descriptor *noa' is defined and set but not used. > Compiling with W=1 gives the following warning, fix it. > drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function ‘ath10k_wmi_tlv_op_gen_vdev_start’: > drivers/net/wireless/ath/ath10k/wmi-tlv.c:1647:33: warning: variable ‘noa’ set but not used [-Wunused-but-set-variable] > > Fixes: ca996ec56608 ("ath10k: implement wmi-tlv backend") > Cc: Michal Kazior <michal.kazior@tieto.com> > Cc: Kalle Valo <kvalo@qca.qualcomm.com> > Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> > --- > drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c > index e64f593..0e4bd29 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c > +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c > @@ -1644,7 +1644,6 @@ ath10k_wmi_tlv_op_gen_vdev_start(struct ath10k *ar, > { > struct wmi_tlv_vdev_start_cmd *cmd; > struct wmi_channel *ch; > - struct wmi_p2p_noa_descriptor *noa; > struct wmi_tlv *tlv; > struct sk_buff *skb; > size_t len; > @@ -1702,7 +1701,6 @@ ath10k_wmi_tlv_op_gen_vdev_start(struct ath10k *ar, > tlv = ptr; > tlv->tag = __cpu_to_le16(WMI_TLV_TAG_ARRAY_STRUCT); > tlv->len = 0; > - noa = (void *)tlv->value; > > /* Note: This is a nested TLV containing: > * [wmi_tlv][wmi_p2p_noa_descriptor][wmi_tlv].. I would rather keep this one as it serves as documentation. Would "(void) noa;" be enough satisfy the compiler? Michał
Kirtika Ruchandani <kirtika.ruchandani@gmail.com> wrote: > Commit ca996ec56608 (ath10k: implement wmi-tlv backend) > introduced ath10k_wmi_tlv_op_gen_vdev_start() where > 'struct wmi_p2p_noa_descriptor *noa' is defined and set but not used. > Compiling with W=1 gives the following warning, fix it. > drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function ‘ath10k_wmi_tlv_op_gen_vdev_start’: > drivers/net/wireless/ath/ath10k/wmi-tlv.c:1647:33: warning: variable ‘noa’ set but not used [-Wunused-but-set-variable] > > Fixes: ca996ec56608 ("ath10k: implement wmi-tlv backend") > Cc: Michal Kazior <michal.kazior@tieto.com> > Cc: Kalle Valo <kvalo@qca.qualcomm.com> > Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> No response to Michal's comment by the author Patch set to Changes Requested.
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index e64f593..0e4bd29 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1644,7 +1644,6 @@ ath10k_wmi_tlv_op_gen_vdev_start(struct ath10k *ar, { struct wmi_tlv_vdev_start_cmd *cmd; struct wmi_channel *ch; - struct wmi_p2p_noa_descriptor *noa; struct wmi_tlv *tlv; struct sk_buff *skb; size_t len; @@ -1702,7 +1701,6 @@ ath10k_wmi_tlv_op_gen_vdev_start(struct ath10k *ar, tlv = ptr; tlv->tag = __cpu_to_le16(WMI_TLV_TAG_ARRAY_STRUCT); tlv->len = 0; - noa = (void *)tlv->value; /* Note: This is a nested TLV containing: * [wmi_tlv][wmi_p2p_noa_descriptor][wmi_tlv]..
Commit ca996ec56608 (ath10k: implement wmi-tlv backend) introduced ath10k_wmi_tlv_op_gen_vdev_start() where 'struct wmi_p2p_noa_descriptor *noa' is defined and set but not used. Compiling with W=1 gives the following warning, fix it. drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function ‘ath10k_wmi_tlv_op_gen_vdev_start’: drivers/net/wireless/ath/ath10k/wmi-tlv.c:1647:33: warning: variable ‘noa’ set but not used [-Wunused-but-set-variable] Fixes: ca996ec56608 ("ath10k: implement wmi-tlv backend") Cc: Michal Kazior <michal.kazior@tieto.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 -- 1 file changed, 2 deletions(-) -- 2.8.0.rc3.226.g39d4020