On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
> fix checkpatch.pl warning:
> * Missing a blank line after declarations
>
> Signed-off-by: Joonhwan Kim
> ---
> drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 +
Always work against the latest development tree s
I was actually OK with v1 on the theory that everything else leaked and
so this didn't really introduce anything new... :P
On Sat, Jun 16, 2018 at 10:01:22AM +0800, Zhouyang Jia wrote:
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1639,8 +1639,
On Fri, Jun 15, 2018 at 01:53:03AM +0300, Kamal Heib wrote:
> @@ -2045,6 +2049,12 @@ static int mtk_add_mac(struct mtk_eth *eth, struct
> device_node *np)
> eth->netdev[id]->base_addr, eth->netdev[id]->irq);
>
> return 0;
> +
> +free_hw_stats:
> + devm_kfree(eth->dev,
On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
> @@ -1656,6 +1659,7 @@ static void atomisp_pause_buffer_event(struct
> atomisp_device *isp)
> /* invalidate. SW workaround for this is to set burst length */
> /* manually to 128 in case of 13MPx snapshot and to 1 otherwise. */
> st
On Sat, Jun 16, 2018 at 11:54:03AM +0300, Dan Carpenter wrote:
> On Fri, Jun 15, 2018 at 01:53:03AM +0300, Kamal Heib wrote:
> > @@ -2045,6 +2049,12 @@ static int mtk_add_mac(struct mtk_eth *eth, struct
> > device_node *np)
> >eth->netdev[id]->base_addr, eth->netdev[id]->irq);
> >
Fix memory leak in error path of mtk_add_mac() by make sure to free
the allocated netdev.
Fixes: e3cbf478f846 ('staging: mt7621-eth: add the drivers core files')
Signed-off-by: Kamal Heib
---
Changes from v1:
No need to free the hw_stats.
drivers/staging/mt7621-eth/mtk_eth_soc.c | 14 ++
Thank you for attention :)
I knew what I forgot before doing contribute
I updated it 'TODAY' and I'll never repeat this mistake again!
Sincerely,
JoonHwan
2018-06-16 18:06 GMT+09:00 Dan Carpenter :
> On Sat, Jun 16, 2018 at 01:30:48PM +0900, JoonHwan.Kim wrote:
>> @@ -1656,6 +1659,7 @@ static v
On Sat, Jun 16, 2018 at 07:20:54PM +0900, 김준환 wrote:
> Thank you for attention :)
>
> I knew what I forgot before doing contribute
>
> I updated it 'TODAY' and I'll never repeat this mistake again!
>
No rush.
This is a tiny mistake and doesn't affect runtime at all and we're all
human. The th
The driver currently only uses DMA linked mode and the upstream
driver does the same, so remove the basic mode code.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 88 +++--
1 file changed, 32 insertions(+), 56 deletions(-)
dif
The macro msdc_fifo_write32 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 98bcb0fe6f40..9e00f86a0398 100644
--- a
The define RALINK_MSDC_BASE is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index e639ceb2ba85..101ceca2ee4c 100644
---
The current code uses a macro (sdr_read32) for reading from hardware,
but it is only a readl, so replace it to get nearer to upstream code.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 1 -
drivers/staging/mt7621-mmc/sd.c| 98 +---
The macro msdc_fifo_read8 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 4a69bc84bbd2..98bcb0fe6f40 100644
--- a/d
The macro sdr_write8 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h
b/drivers/staging/mt7621-mmc/mt6575_sd.h
index adccabe32660..375cb109
The variable num in msdc_dma_setup is only used for a BUG_ON
statement, so it can be removed by inlining the condition.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-mmc
The field mode of struct msdc_dma has no remaining use, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 1 -
drivers/staging/mt7621-mmc/sd.c| 5 +
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-
The macro sdr_read8 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h
b/drivers/staging/mt7621-mmc/mt6575_sd.h
index 29e2ede6816b..adccabe3266
The macro msdc_retry is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 13 -
1 file changed, 13 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 01a925ae662e..0e94bb0d5927 1006
The macro msdc_fifo_read32 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 9e00f86a0398..0f9cba918586 100644
--- a/
Current code has structures for all the registers of the device, but
these are never used and there are also masks for all of them, so
these structures do not contain any useful information.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 411 ---
The BUG_ON() removed by this patch is just a duplicate of a prior
BUG_ON() statement. There the condition is just clearer, it checks
weather sglen > MAX_BD_NUM and MAX_BD_NUM is equal MAX_BD_PER_GPD. So
this statement can be safely removed.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/st
Here are the next cleanups for the mt7621-mmc driver. Again much of
unused code is removed and the IO is cleaned up. The next major step
will be the complete refactoring of the tuning, because it does not
use the tuning capabilities of sd-core, but kind of re-implements that.
Changes since v1:
-
The MSDC_MODE_* defines are all never used and do not contain any
information about the device, so remove them.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h
b/
The define MAX_PHY_SGMTS is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 31ee9c533f35..45d9b62f4a58 100644
--- a/dr
The enum msdc_mode is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/dbg.h | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
index 5a25a69b00c9..2f2c56b73987 100644
--- a
The response type of the MMC_SEND_OP_COND command is correctly
determined using the mmc_resp_type macro, because the only use of that
opcode, mmc_send_op_cond, correctly places MMC_RSP_R3 in cmd.flags.
So there is no need to treat that opcode separately.
Signed-off-by: Christian Lütke-Stetzkamp
Currently the base address for all io operations is hidden behind a
macro, REG_ADD. This macro uses the symbol "base" as the base address
and all functions set base = host->base. This is hard to read, so the
whole wrapping is removed and host->base is directly inserted in the
io access.
Signed-off
The macro is_card_present is unused and also a duplicate of a macro in
mmc, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 45
The response type of the SD_APP_OP_COND command is correctly
determined using the mmc_resp_type macro, because the only use of that
opcode, mmc_send_app_op_cond, correctly places MMC_RSP_R3 in cmd.flags.
So there is no need to treat that opcode separately.
Signed-off-by: Christian Lütke-Stetzkamp
Currently msdc_command_start does multiple things and is hard to read,
so factor out the finding of the response type.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 40 +---
1 file changed, 25 insertions(+), 15 deletions(-)
di
The argument tune of msdc_do_command is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index cfe7517f
Current code uses two functions for dma setup, msdc_dma_config and
msdc_dma_setup. By now msdc_dma_setup is nearly empty and mainly calls
msdc_dma_config, so the later one can be inline into the first
one. While doing this there is also some refactoring done.
Signed-off-by: Christian Lütke-Stetzka
The define IRQ_SDC is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 101ceca2ee4c..31ee9c533f35 100644
--- a/driver
The field sglen from struct msdc_dma is once set and never read, so
remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 2 --
drivers/staging/mt7621-mmc/sd.c| 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/mt657
The macro msdc_fifo_write8 is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 7cfadb41a53d..4a69bc84bbd2 100644
--- a/
The variable resp in msdc_command_resp is once set and never read,
delete it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 648a2dd1436e..7
The field sg from struct msdc_dma is once set and never read, so
remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 1 -
drivers/staging/mt7621-mmc/sd.c| 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.
The macro msdc_rxfifocnt is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index c6aced0c0a6a..78a681a72f11 100644
--- a/
The current code uses a macro (sdr_write32) for writing to hardware,
but it is only a writel with switched arguments, so replace it to get
nearer to upstream code.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 1 -
drivers/staging/mt7621-mmc/sd.c|
The macro msdc_txfifocnt is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 0f9cba918586..c6aced0c0a6a 100644
--- a/dr
In the current code, msdc_clr_fifo is a macro and just busy waits for
a limited amount of time for the fifo clear to finish. That is not
correct, the programming manual hits, that the user should wait until
the bit is cleared by hardware and not a limited amount of time.
So the code is changed to
The variable cmd in the function msdc_tune_request is set but never
used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index e99a12
The macro MAX_BD_PER_GPD is never used, so remove it.
Signed-off-by: Christian Lütke-Stetzkamp
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 0e94bb0d5927..e99a12002646 100644
--- a/dr
When usb_alloc_urb fails, the lack of error-handling code may
cause unexpected results.
This patch adds error-handling code after calling usb_alloc_urb,
and fixes memory leaks in error paths.
Signed-off-by: Zhouyang Jia
---
v1->v2:
- Fix memory leak.
v2->v3:
- Release memory in error path.
v3->v
I humble request your lucrative assistant for a business proposal. For complete
elaboration kindly reply for more details via email: magerateh0...@gmail.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailm
On Tue, 12 Jun 2018 18:21:53 +0200
Karim Eshapa wrote:
> Use sign_extend32 kernel function instead of code duplication,
> Safe also for 16 bit. and remove declaration of bits variable not needed.
>
> Signed-off-by: Karim Eshapa
Please consider how a patch is applied and resend as a v3 which ca
On Tue, 12 Jun 2018 18:48:38 +0200
Karim Eshapa wrote:
> Use sign_extend32 kernel function instead of code duplication.
> This function is also safe for 16 bits.
>
> Signed-off-by: Karim Eshapa
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with
On Sat, 16 Jun 2018 15:00:31 +0900, Hyunil Kim said:
> *fix checkpatch.pl warnings:
> WARNING: line over 80 characters
> + if (((ieee->wpa_ie[0] == 0xdd) &&
> + (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie, 4))) ||
> + ((ieee->wpa_ie[0] == 0x30) &&
> +
On Sat, 2018-06-16 at 15:22 -0400, valdis.kletni...@vt.edu wrote:
> On Sat, 16 Jun 2018 15:00:31 +0900, Hyunil Kim said:
> > *fix checkpatch.pl warnings:
> > WARNING: line over 80 characters
> > + if (((ieee->wpa_ie[0] == 0xdd) &&
> > + (!memcmp(&(ieee->wpa_ie[14]), ccmp_ie
On Sat, 2018-06-16 at 15:03 +0900, Joonhwan Kim wrote:
> Merge two condition of if statements in
> r8712_surveydone_event_callback()
Are you sure you are not changing the logic here?
I think it'd be nicer to refactor the code instead.
Something like:
---
drivers/staging/rtl8712/rtl871x_mlme.c |
This currently fixes the remaining dtb warnings:
Node /pcie@1e14/pcie0 has a reg or ranges property, but no unit name
Node /pcie@1e14/pcie1 has a reg or ranges property, but no unit name
Node /pcie@1e14/pcie2 has a reg or ranges property, but no unit name
Node /pcie@1e14/pcie0 node
The rate section lookup is a large switch statement in the middle of
'phy_get_tx_pwr_lmt()'; refactor this statement into it's own function
for increased readability.
Signed-off-by: Quytelda Kahja
---
.../staging/rtl8723bs/hal/hal_com_phycfg.c| 109 --
1 file changed, 47 inse
Rename camel-case 'PHY_GetTxPowerLimit()' to 'phy_get_tx_pwr_lmt()'.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +++---
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c| 2 +-
drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 2 +-
3 files chan
Two conditionals that set 'channel' based on 'band_type' in
'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/driv
This else-if conditional block does nothing; remove it.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 5d
Fix 'braces {} should be used on all arms of this statement' coding
style problem in 'phy_get_tx_pwr_lmt()'.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_co
Factoring out the conditional lookup of bandwidth index into the power
limit table into it's own function simplifies the logic of
'phy_get_tx_pwr_lmt()'.
Signed-off-by: Quytelda Kahja
---
.../staging/rtl8723bs/hal/hal_com_phycfg.c| 26 ---
1 file changed, 17 insertions(+), 9
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 6d8a07ac7bb3..dd097df86fa3 100644
--- a/drive
Change camel-case names to snake-case names; to avoid variable name
conflicts, rename table index variables to idx_*.
Signed-off-by: Quytelda Kahja
---
.../staging/rtl8723bs/hal/hal_com_phycfg.c| 200 +-
1 file changed, 105 insertions(+), 95 deletions(-)
diff --git a/drivers
Two if statements that carry out the same operation can be combined with
a logical OR.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
b/drive
Wrap lines longer than 80 characters where possible, delete double
newlines, and fix alignment per the kernel coding style guidelines.
Signed-off-by: Quytelda Kahja
---
.../staging/rtl8723bs/hal/hal_com_phycfg.c| 110 ++
1 file changed, 59 insertions(+), 51 deletions(-)
diff
The if conditionals used to work around wrong TX power limit indices
can be condensed into a single if/else-if statement for more concise
expression.
Signed-off-by: Quytelda Kahja
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
d
62 matches
Mail list logo