Skip to content

Commit

Permalink
Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/wo…
Browse files Browse the repository at this point in the history
…rking/fujitsu/integration

Pull mailbox fixes from Jassi Brar:
 "Misc fixes for BCM mailbox driver

   - Fix build warnings by making static functions used within the file.
   - Check for potential NULL before dereferencing
   - Fix link error by defining HAS_DMA dependency"

* 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  fix:mailbox:bcm-pdc-mailbox:mark symbols static where possible
  mailbox: bcm-pdc: potential NULL dereference in pdc_shutdown()
  mailbox: Add HAS_DMA Kconfig dependency to BCM_PDC_MBOX
  • Loading branch information
Linus Torvalds committed Sep 6, 2016
2 parents 6296c41 + a75e4a8 commit 46738ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions drivers/mailbox/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ config XGENE_SLIMPRO_MBOX
config BCM_PDC_MBOX
tristate "Broadcom PDC Mailbox"
depends on ARM64 || COMPILE_TEST
depends on HAS_DMA
default ARCH_BCM_IPROC
help
Mailbox implementation for the Broadcom PDC ring manager,
Expand Down
11 changes: 6 additions & 5 deletions drivers/mailbox/bcm-pdc-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static const struct file_operations pdc_debugfs_stats = {
* this directory for a SPU.
* @pdcs: PDC state structure
*/
void pdc_setup_debugfs(struct pdc_state *pdcs)
static void pdc_setup_debugfs(struct pdc_state *pdcs)
{
char spu_stats_name[16];

Expand All @@ -485,7 +485,7 @@ void pdc_setup_debugfs(struct pdc_state *pdcs)
&pdc_debugfs_stats);
}

void pdc_free_debugfs(void)
static void pdc_free_debugfs(void)
{
if (debugfs_dir && simple_empty(debugfs_dir)) {
debugfs_remove_recursive(debugfs_dir);
Expand Down Expand Up @@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan)
{
struct pdc_state *pdcs = chan->con_priv;

if (pdcs)
dev_dbg(&pdcs->pdev->dev,
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
if (!pdcs)
return;

dev_dbg(&pdcs->pdev->dev,
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
pdc_ring_free(pdcs);
}

Expand Down

0 comments on commit 46738ab

Please sign in to comment.