Thread (29 messages) 29 messages, 3 authors, 2015-08-20

Re: [PATCH v2 1/7] brcmfmac: Add support for host platform NVRAM loading.

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2015-08-20 15:59:53

On 19 August 2015 at 23:21, Arend van Spriel [off-list ref] wrote:
subject changed to v2. So let's go over your beef.
I really hope none of my comment was mean or anything :)

On 07/11/2015 07:09 PM, Rafał Miłecki wrote:
quoted
On 10 July 2015 at 20:31, Arend van Spriel [off-list ref] wrote:
quoted
+               data_len = fw->size;
+               raw_nvram = false;
+       } else {
+               data = bcm47xx_nvram_get_contents(&data_len);
+               if (!data && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
+                       goto fail;
+               raw_nvram = true;
+       }

-       if (fw) {
-               nvram = brcmf_fw_nvram_strip(fw->data, fw->size,
&nvram_length,
+       if (data) {
+               nvram = brcmf_fw_nvram_strip(data, data_len,
&nvram_length,
                                              fwctx->domain_nr,
fwctx->bus_nr);
-               release_firmware(fw);
-               if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
-                       goto fail;
+               if (raw_nvram)
+                       bcm47xx_nvram_release_contents(data);

This is cosmetical but maybe you could move above 2 lines next to the
release_firmware? So we have all freeing code at one please? Do you
think it would improve readability?
Nothing important thought. Feel free to ignore me here.

confused! The release_firmware call is removed here, right?
Yes, you removed it from the "if (data) {" condition body but also
re-added right after it. AFAIR I got an impression it may make more
sense to have something like:
if (raw_nvram)
        bcm47xx_nvram_release_contents(data);
if (fw)
        release_firmware(fw);
but you can just ignore it if it doesn't sound clear.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help