Hi Sasha,

Thanks for the patch.

> We know 'firmware' is non-NULL from the beginning of mwifiex_prog_fw_w_helper,
> remove all !firmware paths from the rest of the function.

After removing all !firmware paths the function 'mwifiex_get_fw_data' becomes 
an orphan.

Could you please remove that function as well and resend a v2 patch?

Thanks,
Bing

> 
> Signed-off-by: Sasha Levin <sasha.le...@oracle.com>
> ---
>  drivers/net/wireless/mwifiex/usb.c | 15 +++------------
>  1 file changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwifiex/usb.c 
> b/drivers/net/wireless/mwifiex/usb.c
> index 63ac9f2..8bd7098 100644
> --- a/drivers/net/wireless/mwifiex/usb.c
> +++ b/drivers/net/wireless/mwifiex/usb.c
> @@ -836,23 +836,14 @@ static int mwifiex_prog_fw_w_helper(struct 
> mwifiex_adapter *adapter,
>                       dlen = 0;
>               } else {
>                       /* copy the header of the fw_data to get the length */
> -                     if (firmware)
> -                             memcpy(&fwdata->fw_hdr, &firmware[tlen],
> -                                    sizeof(struct fw_header));
> -                     else
> -                             mwifiex_get_fw_data(adapter, tlen,
> -                                                 sizeof(struct fw_header),
> -                                                 (u8 *)&fwdata->fw_hdr);
> +                     memcpy(&fwdata->fw_hdr, &firmware[tlen],
> +                            sizeof(struct fw_header));
> 
>                       dlen = le32_to_cpu(fwdata->fw_hdr.data_len);
>                       dnld_cmd = le32_to_cpu(fwdata->fw_hdr.dnld_cmd);
>                       tlen += sizeof(struct fw_header);
> 
> -                     if (firmware)
> -                             memcpy(fwdata->data, &firmware[tlen], dlen);
> -                     else
> -                             mwifiex_get_fw_data(adapter, tlen, dlen,
> -                                                 (u8 *)fwdata->data);
> +                     memcpy(fwdata->data, &firmware[tlen], dlen);
> 
>                       fwdata->seq_num = cpu_to_le32(fw_seqnum);
>                       tlen += dlen;
> --
> 1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to