From: Ivan Safonov <insafonov@gmail.com>
To: devel@driverdev.osuosl.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Vaishali Thakkar" <vthakkar1994@gmail.com>,
"Jakub Sitnicki" <jsitnicki@gmail.com>,
"Anish Bhatt" <anish@gatech.edu>, "Joe Perches" <joe@perches.com>,
"Ivan Safonov" <insafonov@gmail.com>,
"Nicholas Mc Guire" <der.herr@hofr.at>,
"Alexey Khoroshilov" <khoroshilov@ispras.ru>,
"Rémy Oudompheng" <remyoudompheng@gmail.com>,
"Sudip Mukherjee" <sudipm.mukherjee@gmail.com>,
"Shraddha Barke" <shraddha.6596@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 02/12] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function
Date: Sun, 8 Nov 2015 13:37:25 +0700 [thread overview]
Message-ID: <20151108063725.GA1073@alpha.sfu-kras.ru> (raw)
Ideally the function should not change the variables outside of its body.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
drivers/staging/rtl8188eu/hal/fw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index 4d72537..5b569ef 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -75,14 +75,14 @@ static void _rtl88e_fw_block_write(struct adapter *adapt,
usb_write8(adapt, write_address, byte_buffer[i]);
}
-static void _rtl88e_fill_dummy(u8 *pfwbuf, u32 *pfwlen)
+static u32 _rtl88e_fill_dummy(u8 *pfwbuf, u32 pfwlen)
{
u32 i;
- for (i = *pfwlen; i < roundup(*pfwlen, 4); i++)
+ for (i = pfwlen; i < roundup(pfwlen, 4); i++)
pfwbuf[i] = 0;
- *pfwlen = i;
+ return i;
}
static void _rtl88e_fw_page_write(struct adapter *adapt,
@@ -103,7 +103,7 @@ static void _rtl88e_write_fw(struct adapter *adapt, u8 *buffer, u32 size)
u32 page_no, remain;
u32 page, offset;
- _rtl88e_fill_dummy(buf_ptr, &size);
+ size = _rtl88e_fill_dummy(buf_ptr, size);
page_no = size / FW_8192C_PAGE_SIZE;
remain = size % FW_8192C_PAGE_SIZE;
--
2.4.10
next reply other threads:[~2015-11-08 6:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 6:37 Ivan Safonov [this message]
2015-11-08 10:11 ` Andy Shevchenko
2015-11-08 11:26 ` Ivan Safonov
2015-11-08 20:24 ` Andy Shevchenko
2015-11-10 9:24 ` Ivan Safonov
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=20151108063725.GA1073@alpha.sfu-kras.ru \
--to=insafonov@gmail.com \
--cc=anish@gatech.edu \
--cc=der.herr@hofr.at \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=jsitnicki@gmail.com \
--cc=khoroshilov@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=remyoudompheng@gmail.com \
--cc=shraddha.6596@gmail.com \
--cc=sudipm.mukherjee@gmail.com \
--cc=vthakkar1994@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®