All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] ath10k: add memory dump support for QCA6174/QCA9377
@ 2018-01-15 10:00 Dan Carpenter
  2018-01-16 14:52 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-01-15 10:00 UTC (permalink / raw)
  To: alanliu; +Cc: ath10k

Hello Alan Liu,

The patch 703f261dd77f: "ath10k: add memory dump support for
QCA6174/QCA9377" from Dec 22, 2017, leads to the following static
checker warning:

	drivers/net/wireless/ath/ath10k/pci.c:1481 ath10k_pci_dump_memory_section()
	warn: unsigned 'mem_region->section_table.size' is never less than zero.

drivers/net/wireless/ath/ath10k/pci.c
  1470  static int ath10k_pci_dump_memory_section(struct ath10k *ar,
  1471                                            const struct ath10k_mem_region *mem_region,
  1472                                            u8 *buf, size_t buf_len)
  1473  {
  1474          const struct ath10k_mem_section *cur_section, *next_section;
  1475          unsigned int count, section_size, skip_size;
  1476          int ret, i, j;
  1477  
  1478          if (!mem_region || !buf)
  1479                  return 0;
  1480  
  1481          if (mem_region->section_table.size < 0)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Impossible condition

  1482                  return 0;
  1483  
  1484          cur_section = &mem_region->section_table.sections[0];
  1485  
  1486          if (mem_region->start > cur_section->start) {
  1487                  ath10k_warn(ar, "incorrect memdump region 0x%x with section start addrress 0x%x.\n",
  1488                              mem_region->start, cur_section->start);
  1489                  return 0;
  1490          }

regards,
dan carpenter

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] ath10k: add memory dump support for QCA6174/QCA9377
  2018-01-15 10:00 [bug report] ath10k: add memory dump support for QCA6174/QCA9377 Dan Carpenter
@ 2018-01-16 14:52 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-01-16 14:52 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: alanliu, ath10k

Dan Carpenter <dan.carpenter@oracle.com> writes:

> Hello Alan Liu,
>
> The patch 703f261dd77f: "ath10k: add memory dump support for
> QCA6174/QCA9377" from Dec 22, 2017, leads to the following static
> checker warning:
>
> 	drivers/net/wireless/ath/ath10k/pci.c:1481 ath10k_pci_dump_memory_section()
> 	warn: unsigned 'mem_region->section_table.size' is never less than zero.
>
> drivers/net/wireless/ath/ath10k/pci.c
>   1470  static int ath10k_pci_dump_memory_section(struct ath10k *ar,
>   1471                                            const struct ath10k_mem_region *mem_region,
>   1472                                            u8 *buf, size_t buf_len)
>   1473  {
>   1474          const struct ath10k_mem_section *cur_section, *next_section;
>   1475          unsigned int count, section_size, skip_size;
>   1476          int ret, i, j;
>   1477  
>   1478          if (!mem_region || !buf)
>   1479                  return 0;
>   1480  
>   1481          if (mem_region->section_table.size < 0)
>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Impossible condition

Should be fixed by the commit below which I applied 20 minutes ago :)

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=95f27a51ee02fdd9e7afc06f090c7171673a79ac

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-16 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 10:00 [bug report] ath10k: add memory dump support for QCA6174/QCA9377 Dan Carpenter
2018-01-16 14:52 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.