Re: [PATCH v2 0/17] staging: qlge: Fix rx stall in case of allocation failures

2019-10-04 Thread Greg Kroah-Hartman
On Fri, Sep 27, 2019 at 07:11:54PM +0900, Benjamin Poirier wrote:
> qlge refills rx buffers from napi context. In case of allocation failure,
> allocation will be retried the next time napi runs. If a receive queue runs
> out of free buffers (possibly after subsequent allocation failures), it
> drops all traffic, no longer raises interrupts and napi is no longer
> scheduled; reception is stalled until manual admin intervention.
> 
> This patch series adds a fallback mechanism for rx buffer allocation. If an
> rx buffer queue becomes empty, a workqueue is scheduled to refill it from
> process context where allocation can block until mm has freed some pages
> (hopefully). This approach was inspired by the virtio_net driver (commit
> 3161e453e496 "virtio: net refill on out-of-memory").
> 
> I've compared this with how some other devices with a similar allocation
> scheme handle this situation:
> mlx4 relies on a periodic watchdog, sfc uses a timer, e1000e and fm10k rely
> on periodic hardware interrupts (IIUC). In all cases, they use this to
> schedule napi periodically at a fixed interval (10-250ms) until allocations
> succeed. This kind of approach simplifies allocations because only one
> context may refill buffers, however it is inefficient because of the fixed
> interval: either the interval was too short, the allocation fails again and
> work was done without forward progress; or the interval was too long,
> buffers could've been allocated earlier and rx restarted earlier, instead
> traffic was dropped while the system was idle.
> 
> Note that the qlge driver (and device) uses two kinds of buffers for
> received data, so-called "small buffers" and "large buffers". The two are
> arranged in ring pairs, the sbq and lbq. Depending on frame size, protocol
> content and header splitting, data can go in either type of buffers.
> Because of buffer size, lbq allocations are more likely to fail and lead to
> stall, however I've reproduced the problem with sbq as well. The problem
> was originally found when running jumbo frames. In that case, qlge uses
> order-1 allocations for the large buffers. Although the two kinds of
> buffers are managed similarly, the qlge driver duplicates most data
> structures and code for their handling. In fact, even a casual look at the
> qlge driver shows it to be in a state of disrepair, to put it kindly...
> 
> Patches 1-14 are cleanups that remove, fix and deduplicate code related to
> sbq and lbq handling. Regarding those cleanups, patches 2 ("Remove
> irq_cnt") and 8 ("Deduplicate rx buffer queue management") are the most
> important. Finally, patches 15-17 fix the actual problem of rx stalls in
> case of allocation failures by implementing the fallback of allocations to
> a workqueue.
> 
> I've tested these patches using two different approaches:
> 1) A sender uses pktgen to send udp traffic. The receiver has a large swap,
> a large net.core.rmem_max, runs a program that dirties all free memory in a
> loop and runs a program that opens as many udp sockets as possible but
> doesn't read from them. Since received data is all queued in the sockets
> rather than freed, qlge is allocating receive buffers as quickly as
> possible and faces allocation failures if the swap is slower than the
> network.
> 2) A sender uses super_netperf. Likewise, the receiver has a large swap, a
> large net.core.rmem_max and runs a program that dirties all free memory in
> a loop. After the netperf send test is started, `killall -s SIGSTOP
> netserver` on the receiver leads to the same situation as above.

As this code got moved to staging with the goal to drop it from the
tree, why are you working on fixing it up?  Do you want it moved back
out of staging into the "real" part of the tree, or are you just fixing
things that you find in order to make it cleaner before we delete it?

confused,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 01/20] staging: wfx: add infrastructure for new driver

2019-10-04 Thread Greg Kroah-Hartman
On Thu, Sep 19, 2019 at 02:25:36PM +, Jerome Pouiller wrote:
> From: Jérôme Pouiller 
> 
> Instantiate build infrastructure WFx driver. This driver provides support
> for Wifi chipset Silicon Labs WF200 and further:
> 
>https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf
> 
> This chip support SPI and SDIO bus.
> 
> SDIO interface has two particularities:
> 1. Some parameters may be useful for end user (I will talk about
>gpio_wakeup later).
> 2. The SDIO VID and PID of WF200 are :0001 which are too much
>generic to rely on.
> 
> So, current code checks VID/PID and looks for a node in DT (since WF200
> targets embedded platforms, I don't think it is a problem to rely on
> DT). DT can also be used to define to parameters for driver. Currently,
> if no node is found, a warning is emitted, but it could be changed in
> error.
> 
> Signed-off-by: Jérôme Pouiller 

Personally, I think you are going to find that this is going to take
more work to get this cleaned up in the staging tree and then out of it
into the "real" part of the kernel, instead of just doing the needed
work out of the tree now and then submitting it "properly" to the right
part of the tree.

But hey, who am I to judge people who like to do extra work!  :)

I'll go queue this up now, good luck!

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 0/17] staging: qlge: Fix rx stall in case of allocation failures

2019-10-04 Thread Benjamin Poirier
On 2019/10/04 10:19, Greg Kroah-Hartman wrote:
> On Fri, Sep 27, 2019 at 07:11:54PM +0900, Benjamin Poirier wrote:
[...]
> 
> As this code got moved to staging with the goal to drop it from the
> tree, why are you working on fixing it up?  Do you want it moved back
> out of staging into the "real" part of the tree, or are you just fixing
> things that you find in order to make it cleaner before we delete it?
> 
> confused,
> 

I expected one of two possible outcomes after moving the qlge driver to
staging:
1) it gets the attention of people looking for something to work on and
the driver is improved and submitted for normal inclusion in the future
2) it doesn't get enough attention and the driver is removed

I don't plan to do further work on it and I'm admittedly not holding my
breath for others to rush in but I already had those patches; it wasn't
a big effort to submit them as a first step towards outcome #1.

If #2 is a foregone conclusion, then there's little point in applying
the patches. The only benefit I can think of that if the complete
removal is reverted in the future, this specific problem will at least
be fixed.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 3/6] media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers

2019-10-04 Thread Hans Verkuil
On 9/29/19 10:00 PM, Jernej Skrabec wrote:
> These helpers are used by stateless codecs when they support multiple
> slices per frame and hold capture buffer flag is set. It's expected that
> all such codecs will use this code.
> 
> Signed-off-by: Jernej Skrabec 
> ---
>  drivers/media/v4l2-core/v4l2-mem2mem.c | 35 ++
>  include/media/v4l2-mem2mem.h   |  4 +++
>  2 files changed, 39 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c 
> b/drivers/media/v4l2-core/v4l2-mem2mem.c
> index 19937dd3c6f6..2677a07e4c9b 100644
> --- a/drivers/media/v4l2-core/v4l2-mem2mem.c
> +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
> @@ -1154,6 +1154,41 @@ int v4l2_m2m_ioctl_try_decoder_cmd(struct file *file, 
> void *fh,
>  }
>  EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_try_decoder_cmd);
>  
> +int v4l2_m2m_ioctl_stateless_try_decoder_cmd(struct file *file, void *fh,
> +  struct v4l2_decoder_cmd *dc)
> +{
> + if (dc->cmd != V4L2_DEC_CMD_FLUSH)
> + return -EINVAL;
> +
> + dc->flags = 0;
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_stateless_try_decoder_cmd);
> +
> +int v4l2_m2m_ioctl_stateless_decoder_cmd(struct file *file, void *priv,
> +  struct v4l2_decoder_cmd *dc)
> +{
> + struct v4l2_fh *fh = file->private_data;
> + struct vb2_v4l2_buffer *out_vb, *cap_vb;
> + int ret;
> +
> + ret = v4l2_m2m_ioctl_stateless_try_decoder_cmd(file, priv, dc);
> + if (ret < 0)
> + return ret;
> +
> + out_vb = v4l2_m2m_last_src_buf(fh->m2m_ctx);
> + cap_vb = v4l2_m2m_last_dst_buf(fh->m2m_ctx);

I think this should be v4l2_m2m_next_dst_buf. If multiple capture buffers were
queued up, then it can only be the first capture buffer that can be 'HELD'.

This might solve the race condition you saw with ffmpeg.

Regards,

Hans

> +
> + if (out_vb)
> + out_vb->flags &= ~V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF;
> + else if (cap_vb && cap_vb->is_held)
> + v4l2_m2m_buf_done(cap_vb, VB2_BUF_STATE_DONE);
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_stateless_decoder_cmd);
> +
>  /*
>   * v4l2_file_operations helpers. It is assumed here same lock is used
>   * for the output and the capture buffer queue.
> diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
> index c9fa96c8eed1..8ae2f56c7fa3 100644
> --- a/include/media/v4l2-mem2mem.h
> +++ b/include/media/v4l2-mem2mem.h
> @@ -714,6 +714,10 @@ int v4l2_m2m_ioctl_try_encoder_cmd(struct file *file, 
> void *fh,
>  struct v4l2_encoder_cmd *ec);
>  int v4l2_m2m_ioctl_try_decoder_cmd(struct file *file, void *fh,
>  struct v4l2_decoder_cmd *dc);
> +int v4l2_m2m_ioctl_stateless_try_decoder_cmd(struct file *file, void *fh,
> +  struct v4l2_decoder_cmd *dc);
> +int v4l2_m2m_ioctl_stateless_decoder_cmd(struct file *file, void *priv,
> +  struct v4l2_decoder_cmd *dc);
>  int v4l2_m2m_fop_mmap(struct file *file, struct vm_area_struct *vma);
>  __poll_t v4l2_m2m_fop_poll(struct file *file, poll_table *wait);
>  
> 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [Outreachy kernel] [PATCH] staging: vc04_services: Avoid typedef

2019-10-04 Thread Nachammai Karuppiah
On Thu, Oct 3, 2019 at 5:04 PM Julia Lawall  wrote:
>
>
>
> On Thu, 3 Oct 2019, Nachammai Karuppiah wrote:
>
> > Avoid typedefs to maintain kernel coding style. Issue found by
> > checkpatch.pl
> >
> > Replace the enum typedef VCHIQ_REASON_T with vchiq_reason.
>
> Would it be possible to get rid of them all?  They seem to all go
> together, since they start with the same prefix, and they all don't look
> nice at all.
>
> The changes so far seem to be going in the right direction.
>

Sure. I will work on removing all other typedefs.

Thanks,
Nachammai

> julia
>
> >
> > Signed-off-by: Nachammai Karuppiah 
> > ---
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c   | 8 
> > 
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c  | 4 ++--
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h| 6 +++---
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h | 2 +-
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c  | 2 +-
> >  5 files changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
> > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > index b1595b1..280e237 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > @@ -516,7 +516,7 @@ vchiq_blocking_bulk_transfer(VCHIQ_SERVICE_HANDLE_T 
> > handle, void *data,
> >  
> > ***/
> >
> >  static VCHIQ_STATUS_T
> > -add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason,
> > +add_completion(VCHIQ_INSTANCE_T instance, enum vchiq_reason reason,
> >  struct vchiq_header *header, struct user_service *user_service,
> >  void *bulk_userdata)
> >  {
> > @@ -583,7 +583,7 @@ add_completion(VCHIQ_INSTANCE_T instance, 
> > VCHIQ_REASON_T reason,
> >  
> > ***/
> >
> >  static VCHIQ_STATUS_T
> > -service_callback(VCHIQ_REASON_T reason, struct vchiq_header *header,
> > +service_callback(enum vchiq_reason reason, struct vchiq_header *header,
> >VCHIQ_SERVICE_HANDLE_T handle, void *bulk_userdata)
> >  {
> >   /* How do we ensure the callback goes to the right client?
> > @@ -1666,7 +1666,7 @@ vchiq_compat_ioctl_queue_bulk(struct file *file,
> >  }
> >
> >  struct vchiq_completion_data32 {
> > - VCHIQ_REASON_T reason;
> > + enum vchiq_reason reason;
> >   compat_uptr_t header;
> >   compat_uptr_t service_userdata;
> >   compat_uptr_t bulk_userdata;
> > @@ -2271,7 +2271,7 @@ vchiq_videocore_wanted(struct vchiq_state *state)
> >  }
> >
> >  static VCHIQ_STATUS_T
> > -vchiq_keepalive_vchiq_callback(VCHIQ_REASON_T reason,
> > +vchiq_keepalive_vchiq_callback(enum vchiq_reason reason,
> >   struct vchiq_header *header,
> >   VCHIQ_SERVICE_HANDLE_T service_user,
> >   void *bulk_user)
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
> > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> > index 56a23a2..b0e0653 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> > @@ -355,7 +355,7 @@ mark_service_closing(struct vchiq_service *service)
> >  }
> >
> >  static inline VCHIQ_STATUS_T
> > -make_service_callback(struct vchiq_service *service, VCHIQ_REASON_T reason,
> > +make_service_callback(struct vchiq_service *service, enum vchiq_reason 
> > reason,
> > struct vchiq_header *header, void *bulk_userdata)
> >  {
> >   VCHIQ_STATUS_T status;
> > @@ -1230,7 +1230,7 @@ notify_bulks(struct vchiq_service *service, struct 
> > vchiq_bulk_queue *queue,
> >   spin_unlock(&bulk_waiter_spinlock);
> >   } else if (bulk->mode ==
> >   VCHIQ_BULK_MODE_CALLBACK) {
> > - VCHIQ_REASON_T reason = (bulk->dir ==
> > + enum vchiq_reason reason = (bulk->dir 
> > ==
> >   VCHIQ_BULK_TRANSMIT) ?
> >   ((bulk->actual ==
> >   VCHIQ_BULK_ACTUAL_ABORTED) ?
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h 
> > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
> > index c23bd10..f911612 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h
> > @@ -15,7 +15,7 @@
> >  #define VCHIQ_GET_SERVICE_USERDATA(service) 
> > vchiq_get_service_userdata(service)
> >  #define VCHIQ_GET_SERVICE_FOURCC(service)   
> > vchiq_get_service_f

[staging:staging-testing 41/59] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 0096214a59a72b3c3c943e27bd03307324d3ce0f [41/59] staging: wfx: add 
support for I/O access

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


coccinelle warnings: (new ones prefixed by >>)

>> drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after 
>> initialization to constant on line 42

vim +47 drivers/staging/wfx/main.c

30  
31  struct gpio_desc *wfx_get_gpio(struct device *dev, int override, const 
char *label)
32  {
33  struct gpio_desc *ret;
34  char label_buf[256];
35  
36  if (override >= 0) {
37  snprintf(label_buf, sizeof(label_buf), "wfx_%s", label);
38  ret = ERR_PTR(devm_gpio_request_one(dev, override, 
GPIOF_OUT_INIT_LOW, label_buf));
39  if (!ret)
40  ret = gpio_to_desc(override);
41  } else if (override == -1) {
  > 42  ret = NULL;
43  } else {
44  ret = devm_gpiod_get(dev, label, GPIOD_OUT_LOW);
45  }
46  if (IS_ERR(ret) || !ret) {
  > 47  if (!ret || PTR_ERR(ret) == -ENOENT)
48  dev_warn(dev, "gpio %s is not defined\n", 
label);
49  else
50  dev_warn(dev, "error while requesting gpio 
%s\n", label);
51  ret = NULL;
52  } else {
53  dev_dbg(dev, "using gpio %d for %s\n", 
desc_to_gpio(ret), label);
54  }
55  return ret;
56  }
57  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd)

2019-10-04 Thread Julia Lawall
Hello,

Is an unlock needed on line 53?

julia

-- Forwarded message --
Date: Fri, 4 Oct 2019 19:14:33 +0800
From: kbuild test robot 
To: kbu...@01.org
Cc: Julia Lawall 
Subject: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8:
preceding lock on line 38

CC: kbuild-...@01.org
CC: de...@driverdev.osuosl.org
TO: "Jérôme Pouiller" 
CC: "Greg Kroah-Hartman" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 4f8b7fabb15df3658564a98971fc67029be1815d [50/59] staging: wfx: allow to 
send commands to chip
:: branch date: 2 hours ago
:: commit date: 2 hours ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 
Reported-by: Julia Lawall 

>> drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38

# 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=4f8b7fabb15df3658564a98971fc67029be1815d
git remote add staging 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 4f8b7fabb15df3658564a98971fc67029be1815d
vim +53 drivers/staging/wfx/hif_tx.c

4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  23
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  24  int wfx_cmd_send(struct wfx_dev 
*wdev, struct hif_msg *request, void *reply, size_t reply_len, bool async)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  25  {
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  26   const char *mib_name = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  27   const char *mib_sep = "";
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  28   int cmd = request->id;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  29   int vif = request->interface;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  30   int ret;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  31
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  32   WARN(wdev->hif_cmd.buf_recv && 
wdev->hif_cmd.async, "API usage error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  33
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  34   // Do not wait for any reply if 
chip is frozen
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  35   if (wdev->chip_frozen)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  36   return -ETIMEDOUT;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  37
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @38   mutex_lock(&wdev->hif_cmd.lock);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  39   WARN(wdev->hif_cmd.buf_send, 
"data locking error");
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  40
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  41   // Note: call to complete() 
below has an implicit memory barrier that
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  42   // hopefully protect buf_send
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  43   wdev->hif_cmd.buf_send = 
request;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  44   wdev->hif_cmd.buf_recv = reply;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  45   wdev->hif_cmd.len_recv = 
reply_len;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  46   wdev->hif_cmd.async = async;
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  47   complete(&wdev->hif_cmd.ready);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  48
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  49   wfx_bh_request_tx(wdev);
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  50
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  51   // NOTE: no timeout is catched 
async is enabled
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  52   if (async)
4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @53   return 0;

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 59/59] drivers/staging/wfx/sta.c:244:1-7: alloc with no test, possible model on line 260

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1 [59/59] staging: wfx: 
implement the rest of mac80211 API

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


coccinelle warnings: (new ones prefixed by >>)

>> drivers/staging/wfx/sta.c:244:1-7: alloc with no test, possible model on 
>> line 260

vim +244 drivers/staging/wfx/sta.c

   212  
   213  void wfx_update_filtering(struct wfx_vif *wvif)
   214  {
   215  int ret;
   216  bool is_sta = wvif->vif && NL80211_IFTYPE_STATION == 
wvif->vif->type;
   217  bool filter_bssid = wvif->filter_bssid;
   218  bool fwd_probe_req = wvif->fwd_probe_req;
   219  struct hif_mib_bcn_filter_enable bf_ctrl;
   220  struct hif_mib_bcn_filter_table *bf_tbl;
   221  struct hif_ie_table_entry ie_tbl[] = {
   222  {
   223  .ie_id= WLAN_EID_VENDOR_SPECIFIC,
   224  .has_changed  = 1,
   225  .no_longer= 1,
   226  .has_appeared = 1,
   227  .oui = { 0x50, 0x6F, 0x9A},
   228  }, {
   229  .ie_id= WLAN_EID_HT_OPERATION,
   230  .has_changed  = 1,
   231  .no_longer= 1,
   232  .has_appeared = 1,
   233  }, {
   234  .ie_id= WLAN_EID_ERP_INFO,
   235  .has_changed  = 1,
   236  .no_longer= 1,
   237  .has_appeared = 1,
   238  }
   239  };
   240  
   241  if (wvif->state == WFX_STATE_PASSIVE)
   242  return;
   243  
 > 244  bf_tbl = kmalloc(sizeof(struct hif_mib_bcn_filter_table) + 
 > sizeof(ie_tbl), GFP_KERNEL);
   245  memcpy(bf_tbl->ie_table, ie_tbl, sizeof(ie_tbl));
   246  if (wvif->disable_beacon_filter) {
   247  bf_ctrl.enable = 0;
   248  bf_ctrl.bcn_count = 1;
   249  bf_tbl->num_of_info_elmts = 0;
   250  } else if (!is_sta) {
   251  bf_ctrl.enable = HIF_BEACON_FILTER_ENABLE | 
HIF_BEACON_FILTER_AUTO_ERP;
   252  bf_ctrl.bcn_count = 0;
   253  bf_tbl->num_of_info_elmts = 2;
   254  } else {
   255  bf_ctrl.enable = HIF_BEACON_FILTER_ENABLE;
   256  bf_ctrl.bcn_count = 0;
   257  bf_tbl->num_of_info_elmts = 3;
   258  }
   259  
 > 260  ret = hif_set_rx_filter(wvif, filter_bssid, fwd_probe_req);
   261  if (!ret)
   262  ret = hif_set_beacon_filter_table(wvif, bf_tbl);
   263  if (!ret)
   264  ret = hif_beacon_filter_control(wvif, bf_ctrl.enable, 
bf_ctrl.bcn_count);
   265  if (!ret)
   266  ret = wfx_set_mcast_filter(wvif, &wvif->mcast_filter);
   267  if (ret)
   268  dev_err(wvif->wdev->dev, "update filtering failed: 
%d\n", ret);
   269  kfree(bf_tbl);
   270  }
   271  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 46/59] drivers/staging/wfx/bh.c:76:3: note: in expansion of macro 'le16_to_cpus'

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: b0998f0c040daf798d2f847d9588d57f2e2ade69 [46/59] staging: wfx: add IRQ 
handling
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b0998f0c040daf798d2f847d9588d57f2e2ade69
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:5:0,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:5,
from drivers/staging/wfx/bh.c:8:
   drivers/staging/wfx/bh.c: In function 'rx_helper':
>> include/uapi/linux/byteorder/big_endian.h:97:37: warning: passing argument 1 
>> of '__swab16s' makes pointer from integer without a cast [-Wint-conversion]
#define __le16_to_cpus(x) __swab16s((x))
^
>> include/linux/byteorder/generic.h:115:22: note: in expansion of macro 
>> '__le16_to_cpus'
#define le16_to_cpus __le16_to_cpus
 ^~
>> drivers/staging/wfx/bh.c:76:3: note: in expansion of macro 'le16_to_cpus'
  le16_to_cpus(hif->len);
  ^~~~
   In file included from include/linux/swab.h:5:0,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:5,
from drivers/staging/wfx/bh.c:8:
   include/uapi/linux/swab.h:230:20: note: expected '__u16 * {aka short 
unsigned int *}' but argument is of type 'uint16_t {aka short unsigned int}'
static inline void __swab16s(__u16 *p)
   ^

vim +/le16_to_cpus +76 drivers/staging/wfx/bh.c

   > 8  #include 
 9  #include 
10  
11  #include "bh.h"
12  #include "wfx.h"
13  #include "hwio.h"
14  #include "hif_api_cmd.h"
15  
16  static void device_wakeup(struct wfx_dev *wdev)
17  {
18  if (!wdev->pdata.gpio_wakeup)
19  return;
20  if (gpiod_get_value(wdev->pdata.gpio_wakeup))
21  return;
22  
23  gpiod_set_value(wdev->pdata.gpio_wakeup, 1);
24  if (wfx_api_older_than(wdev, 1, 4)) {
25  if (!completion_done(&wdev->hif.ctrl_ready))
26  udelay(2000);
27  } else {
28  // completion.h does not provide any function to wait
29  // completion without consume it (a kind of
30  // wait_for_completion_done_timeout()). So we have to 
emulate
31  // it.
32  if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, 
msecs_to_jiffies(2) + 1))
33  complete(&wdev->hif.ctrl_ready);
34  else
35  dev_err(wdev->dev, "timeout while wake up 
chip\n");
36  }
37  }
38  
39  static void device_release(struct wfx_dev *wdev)
40  {
41  if (!wdev->pdata.gpio_wakeup)
42  return;
43  
44  gpiod_set_value(wdev->pdata.gpio_wakeup, 0);
45  }
46  
47  static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf)
48  {
49  struct sk_buff *skb;
50  struct hif_msg *hif;
51  size_t alloc_len;
52  size_t computed_len;
53  int release_count;
54  int piggyback = 0;
55  
56  WARN_ON(read_len < 4);
57  WARN(read_len > round_down(0xFFF, 2) * sizeof(u16),
58   "%s: request exceed WFx capability", __f

[RESEND TRIVIAL 3/3] treewide: arch: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^/\t/' -i */Kconfig

Signed-off-by: Krzysztof Kozlowski 
---
 arch/Kconfig   |  4 ++--
 arch/alpha/Kconfig |  2 +-
 arch/arm/Kconfig.debug |  4 ++--
 arch/arm/mach-ep93xx/Kconfig   |  8 
 arch/arm/mach-hisi/Kconfig |  2 +-
 arch/arm/mach-ixp4xx/Kconfig   | 16 
 arch/arm/mach-mmp/Kconfig  |  2 +-
 arch/arm/mach-omap1/Kconfig| 14 +++---
 arch/arm/mach-prima2/Kconfig   |  6 +++---
 arch/arm/mach-s3c24xx/Kconfig  |  4 ++--
 arch/arm/mach-s3c64xx/Kconfig  |  6 +++---
 arch/arm/plat-samsung/Kconfig  |  2 +-
 arch/arm64/Kconfig |  6 +++---
 arch/arm64/Kconfig.debug   |  2 +-
 arch/h8300/Kconfig |  4 ++--
 arch/h8300/Kconfig.cpu |  4 ++--
 arch/m68k/Kconfig.bus  |  2 +-
 arch/m68k/Kconfig.debug| 16 
 arch/m68k/Kconfig.machine  |  8 
 arch/nds32/Kconfig.cpu | 18 +-
 arch/openrisc/Kconfig  | 26 +-
 arch/powerpc/Kconfig.debug | 18 +-
 arch/powerpc/platforms/Kconfig.cputype |  2 +-
 arch/riscv/Kconfig.socs|  2 +-
 arch/sh/boards/Kconfig |  2 +-
 arch/sh/mm/Kconfig |  2 +-
 arch/um/Kconfig|  2 +-
 arch/x86/Kconfig   | 18 +-
 28 files changed, 101 insertions(+), 101 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 5f8a5d84dbbe..8d4f77bbed29 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -76,7 +76,7 @@ config JUMP_LABEL
depends on HAVE_ARCH_JUMP_LABEL
depends on CC_HAS_ASM_GOTO
help
- This option enables a transparent branch optimization that
+This option enables a transparent branch optimization that
 makes certain almost-always-true or almost-always-false branch
 conditions even cheaper to execute within the kernel.
 
@@ -84,7 +84,7 @@ config JUMP_LABEL
 scheduler functionality, networking code and KVM have such
 branches and include support for this optimization technique.
 
- If it is detected that the compiler has support for "asm goto",
+If it is detected that the compiler has support for "asm goto",
 the kernel will compile such branches with just a nop
 instruction. When the condition flag is toggled to true, the
 nop will be converted to a jump instruction to execute the
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index ef179033a7c2..30a6291355cb 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -545,7 +545,7 @@ config NR_CPUS
default "4" if !ALPHA_GENERIC && !ALPHA_MARVEL
help
  MARVEL support can handle a maximum of 32 CPUs, all the others
-  with working support have a maximum of 4 CPUs.
+ with working support have a maximum of 4 CPUs.
 
 config ARCH_DISCONTIGMEM_ENABLE
bool "Discontiguous Memory Support"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8bcbd0cd739b..0e5d52fbddbd 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -274,7 +274,7 @@ choice
select DEBUG_UART_8250
help
  Say Y here if you want the debug print routines to direct
-  their output to the CNS3xxx UART0.
+ their output to the CNS3xxx UART0.
 
config DEBUG_DAVINCI_DA8XX_UART1
bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
@@ -828,7 +828,7 @@ choice
select DEBUG_UART_8250
help
  Say Y here if you want kernel low-level debugging support
-  on Rockchip RV1108 based platforms.
+ on Rockchip RV1108 based platforms.
 
config DEBUG_RV1108_UART1
bool "Kernel low-level debugging messages via Rockchip RV1108 
UART1"
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index f2db5fd38145..bf81dfab7f1b 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -126,10 +126,10 @@ config MACH_MICRO9S
  Contec Micro9-Slim board.
 
 config MACH_SIM_ONE
-bool "Support Simplemachines Sim.One board"
-help
-  Say 'Y' here if you want your kernel to support the
-  Simplemachines Sim.One board.
+   bool "Support Simplemachines Sim.One board"
+   help
+ Say 'Y' here if you want your kernel to support the
+ Simplemachines Sim.One board.
 
 config MACH_SNAPPER_CL15
bool "Support Bluewater Systems Snapper CL15 Module"
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hi

[RESEND TRIVIAL 1/3] treewide: drivers: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^/\t/' -i */Kconfig

Signed-off-by: Krzysztof Kozlowski 
---
 drivers/acpi/Kconfig  |  8 +-
 drivers/ata/Kconfig   | 12 +--
 drivers/auxdisplay/Kconfig| 14 +--
 drivers/base/firmware_loader/Kconfig  |  2 +-
 drivers/block/Kconfig | 28 +++---
 drivers/block/mtip32xx/Kconfig|  2 +-
 drivers/char/Kconfig  |  6 +-
 drivers/char/agp/Kconfig  |  2 +-
 drivers/char/hw_random/Kconfig| 10 +-
 drivers/char/ipmi/Kconfig | 20 ++--
 drivers/clk/Kconfig   |  2 +-
 drivers/clk/mediatek/Kconfig  | 10 +-
 drivers/clk/versatile/Kconfig |  2 +-
 drivers/clocksource/Kconfig   | 20 ++--
 drivers/cpufreq/Kconfig.x86   |  6 +-
 drivers/cpuidle/Kconfig   |  8 +-
 drivers/cpuidle/Kconfig.arm   | 16 ++--
 drivers/crypto/Kconfig|  4 +-
 drivers/crypto/caam/Kconfig   | 14 +--
 drivers/crypto/chelsio/Kconfig| 30 +++---
 drivers/crypto/stm32/Kconfig  |  6 +-
 drivers/crypto/ux500/Kconfig  | 16 ++--
 drivers/devfreq/Kconfig   |  6 +-
 drivers/dma/Kconfig   | 46 -
 drivers/edac/Kconfig  |  2 +-
 drivers/firmware/Kconfig  |  4 +-
 drivers/firmware/efi/Kconfig  |  2 +-
 drivers/hid/Kconfig   |  2 +-
 drivers/hwmon/Kconfig | 14 +--
 drivers/i2c/busses/Kconfig| 16 ++--
 drivers/i2c/muxes/Kconfig | 18 ++--
 drivers/iio/gyro/Kconfig  |  8 +-
 drivers/infiniband/hw/bnxt_re/Kconfig | 12 +--
 drivers/input/keyboard/Kconfig|  8 +-
 drivers/input/mouse/Kconfig   |  6 +-
 drivers/input/tablet/Kconfig  | 20 ++--
 drivers/input/touchscreen/Kconfig |  2 +-
 drivers/iommu/Kconfig |  2 +-
 drivers/irqchip/Kconfig   | 10 +-
 drivers/isdn/hardware/mISDN/Kconfig   |  2 +-
 drivers/macintosh/Kconfig |  6 +-
 drivers/md/Kconfig| 54 +--
 drivers/media/Kconfig |  6 +-
 drivers/media/radio/si470x/Kconfig|  4 +-
 drivers/memstick/core/Kconfig | 18 ++--
 drivers/memstick/host/Kconfig |  4 +-
 drivers/misc/Kconfig  | 16 ++--
 drivers/mtd/nand/onenand/Kconfig  | 12 +--
 drivers/nfc/nfcmrvl/Kconfig   |  2 +-
 drivers/pci/Kconfig   | 24 ++---
 drivers/pci/controller/dwc/Kconfig|  6 +-
 drivers/pci/hotplug/Kconfig   |  2 +-
 drivers/perf/Kconfig  | 14 +--
 drivers/phy/hisilicon/Kconfig |  6 +-
 drivers/pinctrl/Kconfig   | 18 ++--
 drivers/pinctrl/freescale/Kconfig | 12 +--
 drivers/pinctrl/qcom/Kconfig  | 34 +++
 drivers/platform/chrome/Kconfig   |  6 +-
 drivers/platform/mellanox/Kconfig |  4 +-
 drivers/platform/x86/Kconfig  | 48 +-
 drivers/power/avs/Kconfig | 12 +--
 drivers/power/supply/Kconfig  | 30 +++---
 drivers/regulator/Kconfig |  8 +-
 drivers/rpmsg/Kconfig |  2 +-
 drivers/rtc/Kconfig   |  6 +-
 drivers/scsi/Kconfig  | 22 ++---
 drivers/scsi/aic7xxx/Kconfig.aic7xxx  | 14 +--
 drivers/scsi/pcmcia/Kconfig   |  2 +-
 drivers/scsi/qedf/Kconfig |  4 +-
 drivers/scsi/smartpqi/Kconfig |  8 +-
 drivers/soc/fsl/Kconfig   |  8 +-
 drivers/soc/qcom/Kconfig  | 22 ++---
 drivers/soc/rockchip/Kconfig  | 18 ++--
 drivers/spi/Kconfig   | 18 ++--
 drivers/staging/fbtft/Kconfig | 12 +--
 drivers/staging/fwserial/Kconfig  |  6 +-
 drivers/staging/most/Kconfig  |  8 +-
 drivers/staging/nvec/Kconfig  | 10 +-
 drivers/staging/pi433/Kconfig | 24 ++---
 drivers/staging/uwb/Kconfig   | 42 
 .../vc04_services/bcm2835-audio/Kconfig   | 12 +--
 drivers/staging/wusbcore/Kconfig  |  2 +-
 drivers/tty/Kconfig   | 26 ++---
 drivers/tty/hvc/Kconfig   |  4 +-
 drivers/tty/serial/8250/Kconfig   |  2 +-
 drivers/tty/serial/Kconfig   

[RESEND TRIVIAL 2/3] treewide: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^/\t/' -i */Kconfig

Signed-off-by: Krzysztof Kozlowski 
---
 certs/Kconfig  | 14 ++---
 init/Kconfig   | 28 +-
 kernel/trace/Kconfig   |  8 
 lib/Kconfig|  2 +-
 lib/Kconfig.debug  | 36 +-
 lib/Kconfig.kgdb   |  8 
 mm/Kconfig | 28 +-
 samples/Kconfig|  2 +-
 security/apparmor/Kconfig  |  2 +-
 security/integrity/Kconfig | 24 +++
 security/integrity/ima/Kconfig | 12 ++--
 security/safesetid/Kconfig | 24 +++
 12 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/certs/Kconfig b/certs/Kconfig
index c94e93d8bccf..0358c66d3d7c 100644
--- a/certs/Kconfig
+++ b/certs/Kconfig
@@ -6,14 +6,14 @@ config MODULE_SIG_KEY
default "certs/signing_key.pem"
depends on MODULE_SIG
help
- Provide the file name of a private key/certificate in PEM format,
- or a PKCS#11 URI according to RFC7512. The file should contain, or
- the URI should identify, both the certificate and its corresponding
- private key.
+Provide the file name of a private key/certificate in PEM format,
+or a PKCS#11 URI according to RFC7512. The file should contain, or
+the URI should identify, both the certificate and its corresponding
+private key.
 
- If this option is unchanged from its default "certs/signing_key.pem",
- then the kernel will automatically generate the private key and
- certificate as described in 
Documentation/admin-guide/module-signing.rst
+If this option is unchanged from its default "certs/signing_key.pem",
+then the kernel will automatically generate the private key and
+certificate as described in 
Documentation/admin-guide/module-signing.rst
 
 config SYSTEM_TRUSTED_KEYRING
bool "Provide system-wide ring of trusted keys"
diff --git a/init/Kconfig b/init/Kconfig
index b4daad2bac23..e1a6f31da281 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -169,10 +169,10 @@ config BUILD_SALT
string "Build ID Salt"
default ""
help
-  The build ID is used to link binaries and their debug info. Setting
-  this option will use the value in the calculation of the build id.
-  This is mostly useful for distributions which want to ensure the
-  build is unique between builds. It's safe to leave the default.
+ The build ID is used to link binaries and their debug info. Setting
+ this option will use the value in the calculation of the build id.
+ This is mostly useful for distributions which want to ensure the
+ build is unique between builds. It's safe to leave the default.
 
 config HAVE_KERNEL_GZIP
bool
@@ -1327,9 +1327,9 @@ menuconfig EXPERT
select DEBUG_KERNEL
help
  This option allows certain base kernel options and settings
-  to be disabled or tweaked. This is for specialized
-  environments which can tolerate a "non-standard" kernel.
-  Only use this if you really know what you are doing.
+ to be disabled or tweaked. This is for specialized
+ environments which can tolerate a "non-standard" kernel.
+ Only use this if you really know what you are doing.
 
 config UID16
bool "Enable 16-bit UID system calls" if EXPERT
@@ -1439,11 +1439,11 @@ config BUG
bool "BUG() support" if EXPERT
default y
help
-  Disabling this option eliminates support for BUG and WARN, reducing
-  the size of your kernel image and potentially quietly ignoring
-  numerous fatal conditions. You should only consider disabling this
-  option for embedded systems with no facilities for reporting errors.
-  Just say Y.
+ Disabling this option eliminates support for BUG and WARN, reducing
+ the size of your kernel image and potentially quietly ignoring
+ numerous fatal conditions. You should only consider disabling this
+ option for embedded systems with no facilities for reporting errors.
+ Just say Y.
 
 config ELF_CORE
depends on COREDUMP
@@ -1459,8 +1459,8 @@ config PCSPKR_PLATFORM
select I8253_LOCK
default y
help
-  This option allows to disable the internal PC-Speaker
-  support, saving some memory.
+ This option allows to disable the internal PC-Speaker
+ support, saving some memory.
 
 config BASE_FULL
default y
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index e08527f50d2a..0393003f102f 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -76,7 +76,7 @

Re: [PATCH v2 0/17] staging: qlge: Fix rx stall in case of allocation failures

2019-10-04 Thread Greg Kroah-Hartman
On Fri, Oct 04, 2019 at 06:15:45PM +0900, Benjamin Poirier wrote:
> On 2019/10/04 10:19, Greg Kroah-Hartman wrote:
> > On Fri, Sep 27, 2019 at 07:11:54PM +0900, Benjamin Poirier wrote:
> [...]
> > 
> > As this code got moved to staging with the goal to drop it from the
> > tree, why are you working on fixing it up?  Do you want it moved back
> > out of staging into the "real" part of the tree, or are you just fixing
> > things that you find in order to make it cleaner before we delete it?
> > 
> > confused,
> > 
> 
> I expected one of two possible outcomes after moving the qlge driver to
> staging:
> 1) it gets the attention of people looking for something to work on and
> the driver is improved and submitted for normal inclusion in the future
> 2) it doesn't get enough attention and the driver is removed
> 
> I don't plan to do further work on it and I'm admittedly not holding my
> breath for others to rush in but I already had those patches; it wasn't
> a big effort to submit them as a first step towards outcome #1.
> 
> If #2 is a foregone conclusion, then there's little point in applying
> the patches. The only benefit I can think of that if the complete
> removal is reverted in the future, this specific problem will at least
> be fixed.

That makes more sense, I'll go queue these up now, as I don't want to
waste the work you did on this.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 53/59] drivers/staging/wfx/hif_tx_mib.h:139:2: note: in expansion of macro 'cpu_to_le32s'

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: c7ff39dd8b5393c55b0a8a5dedb5ba13f4c838a8 [53/59] staging: wfx: setup 
initial chip configuration
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c7ff39dd8b5393c55b0a8a5dedb5ba13f4c838a8
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:5:0,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/staging/wfx/main.c:13:
   drivers/staging/wfx/hif_tx_mib.h: In function 'hif_set_mfp':
>> include/uapi/linux/byteorder/big_endian.h:94:37: error: passing argument 1 
>> of '__swab32s' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
#define __cpu_to_le32s(x) __swab32s((x))
^
>> include/linux/byteorder/generic.h:112:22: note: in expansion of macro 
>> '__cpu_to_le32s'
#define cpu_to_le32s __cpu_to_le32s
 ^~
>> drivers/staging/wfx/hif_tx_mib.h:139:2: note: in expansion of macro 
>> 'cpu_to_le32s'
 cpu_to_le32s(&val);
 ^~~~
   In file included from include/linux/swab.h:5:0,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/staging/wfx/main.c:13:
   include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int 
*}' but argument is of type 'struct hif_mib_protected_mgmt_policy *'
static __always_inline void __swab32s(__u32 *p)
^
   cc1: some warnings being treated as errors

vim +/cpu_to_le32s +139 drivers/staging/wfx/hif_tx_mib.h

f95a29d40782f4 Jérôme Pouiller 2019-09-19  127  
f95a29d40782f4 Jérôme Pouiller 2019-09-19  128  static inline int 
hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required)
f95a29d40782f4 Jérôme Pouiller 2019-09-19  129  {
f95a29d40782f4 Jérôme Pouiller 2019-09-19  130  struct 
hif_mib_protected_mgmt_policy val = { };
f95a29d40782f4 Jérôme Pouiller 2019-09-19  131  
f95a29d40782f4 Jérôme Pouiller 2019-09-19  132  WARN_ON(required && 
!capable);
f95a29d40782f4 Jérôme Pouiller 2019-09-19  133  if (capable) {
f95a29d40782f4 Jérôme Pouiller 2019-09-19  134  val.pmf_enable 
= 1;
f95a29d40782f4 Jérôme Pouiller 2019-09-19  135  
val.host_enc_auth_frames = 1;
f95a29d40782f4 Jérôme Pouiller 2019-09-19  136  }
f95a29d40782f4 Jérôme Pouiller 2019-09-19  137  if (!required)
f95a29d40782f4 Jérôme Pouiller 2019-09-19  138  
val.unpmf_allowed = 1;
f95a29d40782f4 Jérôme Pouiller 2019-09-19 @139  cpu_to_le32s(&val);
f95a29d40782f4 Jérôme Pouiller 2019-09-19  140  return 
hif_write_mib(wvif->wdev, wvif->id,
f95a29d40782f4 Jérôme Pouiller 2019-09-19  141   
HIF_MIB_ID_PROTECTED_MGMT_POLICY,
f95a29d40782f4 Jérôme Pouiller 2019-09-19  142   
&val, sizeof(val));
f95a29d40782f4 Jérôme Pouiller 2019-09-19  143  }
f95a29d40782f4 Jérôme Pouiller 2019-09-19  144  

:: The code at line 139 was first introduced by commit
:: f95a29d40782f4f0052a692a822de3ba044b19ff staging: wfx: add HIF commands 
helpers

:: TO: Jérôme Pouiller 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 55/59] drivers/staging/wfx/data_tx.c:619:16: note: in expansion of macro 'cpu_to_le16'

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e [55/59] staging: wfx: allow to 
send 802.11 frames
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 9bca45f3d6924f19f29c0d019e961af3f41bdc9e
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:5:0,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/net/mac80211.h:16,
from drivers/staging/wfx/data_tx.c:8:
   drivers/staging/wfx/hif_tx_mib.h: In function 'hif_set_mfp':
   include/uapi/linux/byteorder/big_endian.h:94:37: error: passing argument 1 
of '__swab32s' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
#define __cpu_to_le32s(x) __swab32s((x))
^
   include/linux/byteorder/generic.h:112:22: note: in expansion of macro 
'__cpu_to_le32s'
#define cpu_to_le32s __cpu_to_le32s
 ^~
   drivers/staging/wfx/hif_tx_mib.h:139:2: note: in expansion of macro 
'cpu_to_le32s'
 cpu_to_le32s(&val);
 ^~~~
   In file included from include/linux/swab.h:5:0,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/net/mac80211.h:16,
from drivers/staging/wfx/data_tx.c:8:
   include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int 
*}' but argument is of type 'struct hif_mib_protected_mgmt_policy *'
static __always_inline void __swab32s(__u32 *p)
^
   In file included from include/linux/byteorder/big_endian.h:5:0,
from arch/sparc/include/uapi/asm/byteorder.h:5,
from arch/sparc/include/asm/bitops_64.h:16,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:19,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/net/mac80211.h:16,
from drivers/staging/wfx/data_tx.c:8:
   drivers/staging/wfx/data_tx.c: In function 'wfx_tx_inner':
   include/uapi/linux/byteorder/big_endian.h:35:26: warning: large integer 
implicitly truncated to unsigned type [-Woverflow]
#define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
 ^
   include/linux/byteorder/generic.h:90:21: note: in expansion of macro 
'__cpu_to_le16'
#define cpu_to_le16 __cpu_to_le16
^
>> drivers/staging/wfx/data_tx.c:619:16: note: in expansion of macro 
>> 'cpu_to_le16'
 hif_msg->id = cpu_to_le16(HIF_REQ_ID_TX);
   ^~~
   cc1: some warnings being treated as errors

vim +/cpu_to_le16 +619 drivers/staging/wfx/data_tx.c

   581  
   582  static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta 
*sta, struct sk_buff *skb)
   583  {
   584  struct hif_msg *hif_msg;
   585  struct hif_req_tx *req;
   586  struct wfx_tx_priv *tx_priv;
   587  struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
   588  struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
   589  struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
   590  int queue_id = tx_info->hw_queue;
   591  size_t offset = (size_t) skb->data & 3;
   592  int wmsg_len = sizeof(struct 

Re: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd)

2019-10-04 Thread Jerome Pouiller
On Friday 4 October 2019 13:18:16 CEST Julia Lawall wrote:
> Hello,
> 
> Is an unlock needed on line 53?
> 
> julia
> 
> -- Forwarded message --
> Date: Fri, 4 Oct 2019 19:14:33 +0800
> From: kbuild test robot 
> To: kbu...@01.org
> Cc: Julia Lawall 
> Subject: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8:
> preceding lock on line 38
[...]
> # 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=4f8b7fabb15df3658564a98971fc67029be1815d
> git remote add staging 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> git remote update staging
> git checkout 4f8b7fabb15df3658564a98971fc67029be1815d
> vim +53 drivers/staging/wfx/hif_tx.c
> 
[...]
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @38   
> mutex_lock(&wdev->hif_cmd.lock);
[...]
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  51   // NOTE: no timeout is 
> catched async is enabled
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19  52   if (async)
> 4f8b7fabb15df3 Jérôme Pouiller 2019-09-19 @53   return 0;

Hello Julia,

No, when async is enabled, unlock is done in hif_generic_confirm()
(hif_rx.c:53).

Note that async is never true in current driver code. Indeed, it implies
to unlock mutex from a different context and lockdep does not seem
to like that.

-- 
Jérôme Pouiller

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing 55/59] data_tx.c:(.text+0x310): multiple definition of `tx_policy_init'; drivers/net/wireless/st/cw1200/txrx.o:txrx.c:(.text+0x1960): first defined here

2019-10-04 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e [55/59] staging: wfx: allow to 
send 802.11 frames
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout 9bca45f3d6924f19f29c0d019e961af3f41bdc9e
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   ld: drivers/staging/wfx/data_tx.o: in function `tx_policy_init':
>> data_tx.c:(.text+0x310): multiple definition of `tx_policy_init'; 
>> drivers/net/wireless/st/cw1200/txrx.o:txrx.c:(.text+0x1960): first defined 
>> here

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: vt6655: Fix memory leak in vt6655_probe

2019-10-04 Thread Navid Emamdoost
In vt6655_probe, if vnt_init() fails the cleanup code needs to be called
like other error handling cases. The call to device_free_info() is
added.

Fixes: 67013f2c0e58 ("staging: vt6655: mac80211 conversion add main mac80211 
functions")
Signed-off-by: Navid Emamdoost 
---
 drivers/staging/vt6655/device_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/device_main.c 
b/drivers/staging/vt6655/device_main.c
index c6bb4aaf9bd0..082302944c37 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1748,8 +1748,10 @@ vt6655_probe(struct pci_dev *pcid, const struct 
pci_device_id *ent)
 
priv->hw->max_signal = 100;
 
-   if (vnt_init(priv))
+   if (vnt_init(priv)) {
+   device_free_info(priv);
return -ENODEV;
+   }
 
device_print_info(priv);
pci_set_drvdata(pcid, priv);
-- 
2.17.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: don't use wdev while setting tx power

2019-10-04 Thread Adham.Abozaeid
From: Adham Abozaeid 

WILC doesn't support per-vif tx power, and hence, wdev will always be
null in calls to set_tx_power.
Instead, wiphy should be used to execute the operation

Signed-off-by: Adham Abozaeid 
---
 .../staging/wilc1000/wilc_wfi_cfgoperations.c| 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 3882c90dc3fb..cc56abc2fe37 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1685,9 +1685,22 @@ static int set_tx_power(struct wiphy *wiphy, struct 
wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
 {
int ret;
+   int srcu_idx;
s32 tx_power = MBM_TO_DBM(mbm);
-   struct wilc_vif *vif = netdev_priv(wdev->netdev);
+   struct wilc *wl = wiphy_priv(wiphy);
+   struct wilc_vif *vif;
 
+   if (!wl->initialized)
+   return -EIO;
+
+   srcu_idx = srcu_read_lock(&wl->srcu);
+   vif = wilc_get_wl_to_vif(wl);
+   if (IS_ERR(vif)) {
+   srcu_read_unlock(&wl->srcu, srcu_idx);
+   return -EINVAL;
+   }
+
+   netdev_info(vif->ndev, "Setting tx power %d\n", tx_power);
if (tx_power < 0)
tx_power = 0;
else if (tx_power > 18)
@@ -1695,6 +1708,7 @@ static int set_tx_power(struct wiphy *wiphy, struct 
wireless_dev *wdev,
ret = wilc_set_tx_power(vif, tx_power);
if (ret)
netdev_err(vif->ndev, "Failed to set tx power\n");
+   srcu_read_unlock(&wl->srcu, srcu_idx);
 
return ret;
 }
-- 
2.17.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel