Re: [RFC PATCH] iwlwifi: yoyo: don't print failure if debug firmware is missing

2020-07-26 Thread Luciano Coelho
On Sun, 2020-07-26 at 21:11 +0300, Kalle Valo wrote: > Wolfram Sang writes: > > > On Thu, Jun 25, 2020 at 06:52:10PM +0200, Wolfram Sang wrote: > > > Missing this firmware is not fatal, my wifi card still works. Even more, > > > I couldn't find any documentation what it is or where to get it. So,

Re: [PATCH] iwl: fix crash in iwl_dbg_tlv_alloc_trigger

2020-06-12 Thread Luciano Coelho
On Fri, 2020-06-12 at 10:55 +0300, Kalle Valo wrote: > Jiri Slaby writes: > > > The tlv passed to iwl_dbg_tlv_alloc_trigger comes from a loaded firmware > > file. The memory can be marked as read-only as firmware could be > > shared. In anyway, writing to this memory is not expected. So, > > iwl_

Re: [PATCH 02/15] iwlwifi: mvm: fix gcc-10 zero-length-bounds warning

2020-06-10 Thread Luciano Coelho
On Thu, 2020-04-30 at 23:30 +0200, Arnd Bergmann wrote: > gcc-10 complains when a zero-length array is accessed: > > drivers/net/wireless/intel/iwlwifi/mvm/tx.c: In function > 'iwl_mvm_rx_ba_notif': > drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1929:17: warning: array subscript > 9 is outside th

Re: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-06 Thread Luciano Coelho
On Tue, 2020-05-05 at 20:19 -0700, Joe Perches wrote: > On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote: > > This silences the following coccinelle warning: > > > > "WARNING: sum of probable bitmasks, consider |" > > I suggest instead ignoring bad and irrelevant warnings. > > PREFIX_LEN is 3

Re: [PATCH] iwlwifi: mvm: fix old-style declaration

2019-08-22 Thread Luciano Coelho
On Fri, 2019-07-26 at 22:18 +0800, YueHaibing wrote: > There expect the 'static' keyword to come first in a > declaration, and we get a warning for this with "make W=1": > > drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning: > 'static' is not at beginning of declaration [-Wold-styl

Re: [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible

2019-08-22 Thread Luciano Coelho
On Wed, 2019-07-24 at 19:27 +0800, Chuhong Yuan wrote: > Instead of using to_pci_dev + pci_get_drvdata, > use dev_get_drvdata to make code simpler. > > Signed-off-by: Chuhong Yuan > --- This patch is not relevant anymore because we have removed all D0i3/runtime PM code. Thanks anyway! -- Cheer

Re: [PATCH][next] iwlwifi: d3: Use struct_size() helper

2019-05-13 Thread Luciano Coelho
On Wed, 2019-04-03 at 11:03 -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, change the following form: > > sizeof(*pa

Re: [PATCH][next] iwlwifi: lib: Use struct_size() helper

2019-05-13 Thread Luciano Coelho
On Wed, 2019-04-03 at 10:59 -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, change the following form: > > sizeof(*pa

Re: [PATCH] iwlwifi: fix 64-bit division

2019-03-05 Thread Luciano Coelho
On Tue, 2019-03-05 at 09:37 +0100, Arnd Bergmann wrote: > On Tue, Mar 5, 2019 at 7:44 AM Luciano Coelho < > luciano.coe...@intel.com> wrote: > > On Mon, 2019-03-04 at 21:38 +0100, Arnd Bergmann wrote: > > This was already fixed with this patch: > > > > https:/

Re: [PATCH] iwlwifi: fix 64-bit division

2019-03-04 Thread Luciano Coelho
Hi Arnd, On Mon, 2019-03-04 at 21:38 +0100, Arnd Bergmann wrote: > do_div() expects unsigned operands and otherwise triggers a warning > like: > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka > 'long long

Re: [PATCH v2] iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_debug_range_resp

2019-02-21 Thread Luciano Coelho
On Thu, 2019-02-21 at 16:13 -0800, Nick Desaulniers wrote: > On Thu, Feb 21, 2019 at 12:08 AM Nathan Chancellor > wrote: > > Clang warns: > > > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: > > warning: > > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka > > 'l

Re: [PATCH] iwlwifi: mvm: Use div64_s64 instead of do_div in iwl_mvm_debug_range_resp

2019-02-20 Thread Luciano Coelho
On Wed, 2019-02-20 at 10:56 -0700, Nathan Chancellor wrote: > On Wed, Feb 20, 2019 at 11:51:34AM +0100, Arnd Bergmann wrote: > > On Tue, Feb 19, 2019 at 7:22 PM Nathan Chancellor > > wrote: > > > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm- > > > initiator.c b/drivers/net/wireless/inte

Re: [PATCH v2 2/2] iwlwifi: Use struct_size() in kzalloc

2019-02-13 Thread Luciano Coelho
On Tue, 2019-01-29 at 11:21 +0800, YueHaibing wrote: > Use struct_size() in kzalloc instead of the 'regd_to_copy' > > Signed-off-by: YueHaibing > --- Applied to our internal tree and it will reach the mainline following our normal upstreaming process. Thanks! -- Luca.

Re: [PATCH v2 1/2] iwlwifi: Use kmemdup instead of duplicating its function

2019-02-13 Thread Luciano Coelho
On Tue, 2019-01-29 at 11:21 +0800, YueHaibing wrote: > Use kmemdup rather than duplicating its implementation > > Signed-off-by: YueHaibing > --- > drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wir

Re: [PATCH] iwlwifi: mvm: remove duplicated include from ops.c

2019-01-22 Thread Luciano Coelho
On Thu, 2019-01-17 at 15:00 +0800, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- Dropped, this is a duplicate. -- Cheers, Luca.

Re: [PATCH] iwlwifi: eeprom-parse: use struct_size() in kzalloc()

2019-01-22 Thread Luciano Coelho
On Tue, 2019-01-08 at 11:17 -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is > finding the > size of a structure that has a zero-sized array at the end, along > with memory > for some number of elements for that array. For example: > > struct foo

Re: [PATCH] iwlwifi: nvm-parse: use struct_size() in kzalloc()

2019-01-22 Thread Luciano Coelho
On Tue, 2019-01-08 at 11:55 -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is > finding the > size of a structure that has a zero-sized array at the end, along > with memory > for some number of elements for that array. For example: > > struct foo

Re: [PATCH][next] iwlwifi: mvm: use struct_size() in kzalloc()

2019-01-22 Thread Luciano Coelho
On Tue, 2019-01-15 at 16:02 -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is > finding the > size of a structure that has a zero-sized array at the end, along > with memory > for some number of elements for that array. For example: > > struct foo

Re: [for next][PATCH] iwlwifi: Fix unmet dependency error for IWLWIFI_LEDS

2019-01-22 Thread Luciano Coelho
On Mon, 2019-01-21 at 23:31 +, Sinan Kaya wrote: > There is an unresolved dependency as follows: > > IWLWIFI_LEDS selects MAC80211_LEDS. > MAC80211_LEDS depends on MAC80211. > > It is possible to choose MAC80211_LEDS (y) but not choose MAC80211 > (n) > > WARNING: unmet direct dependencies de

Re: [PATCH] iwlwifi: mvm: remove duplicated include from ops.c

2018-12-03 Thread Luciano Coelho
On Fri, 2018-11-30 at 19:24 +0800, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- Thanks! I applied this to our internal tree and it will reach the mainline following our normal upstreaming process. -- Cheers, Luca.

Re: [PATCH v1 3/4] iwlwifi: Remove unnecessary include of

2018-07-25 Thread Luciano Coelho
On Wed, 2018-07-25 at 14:52 -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > This part of the iwlwifi driver doesn't need anything provided by > pci-aspm.h, so remove the unnecessary include of it. > > Signed-off-by: Bjorn Helgaas > --- Acked-by: Luca Coelho Thanks! -- Cheers, Luca.

Re: [PATCH 18/20] iwlwifi: fix malformed CONFIG_IWLWIFI_PCIE_RTPM default

2018-02-14 Thread Luciano Coelho
On Mon, 2018-02-05 at 02:21 +0100, Ulf Magnusson wrote: > 'default false' should be 'default n', though they happen to have the > same effect here, due to undefined symbols ('false' in this case) > evaluating to n in a tristate sense. > > Remove the default instead of changing it. bool and tristat

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 10:55 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > > [] > > > This might be more intelligble as separate tests > > > > > &

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > > Change a usage of int in a boolean context to use the bool type > > instead, as it > > makes the intent of the function clearer and helps clarify its > > semantics. > > > > Al

Re: [PATCH 0/3] iwlwifi: cosmetic fixes

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Fix several code style issues, some of which were reported by > checkpatch.pl. > > The changes are: > * One instance of an `int` variable being used in a boolean context, > chaned to > use the more appropriate `bool` type. > * One

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type > instead, as it > makes the intent of the function clearer and helps clarify its > semantics. > > Also eliminate the if/else and just return the boolean result > direct

Re: [PATCH 2/3] wireless: iwlwifi: function definition cosmetic fix

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Separate the function from the previous definition with a newline and > put the `static` keyword on the same line, as it just looks nicer. > > Signed-off-by: Christoph Böhmwalder > --- > drivers/net/wireless/intel/iwlwifi/iwl-phy-d