History log of /linux-master/drivers/mailbox/mailbox-xgene-slimpro.c
Revision Date Author Comments
# 1c7532c9 07-Sep-2021 Cai Huoqing <caihuoqing@baidu.com>

mailbox: xgene-slimpro: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# 9d2e8b93 12-Mar-2021 Tom Saeger <tom.saeger@oracle.com>

mailbox: fix various typos in comments

Fix trivial typos in mailbox driver comments.

s/Intergrated/Integrated/
s/extenstion/extension/
s/atleast/at least/
s/commnunication/communication/
s/assgined/assigned/
s/commnunication/communication/
s/recevied/received/
s/succeded/succeeded/
s/implmentation/implementation/
s/definiation/definition/
s/traget/target/
s/wont/won't/

Cc: trivial@kernel.org
Signed-off-by: Tom Saeger <tom.saeger@oracle.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# 1ccea77e 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not see http www gnu org licenses

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details [based]
[from] [clk] [highbank] [c] you should have received a copy of the
gnu general public license along with this program if not see http
www gnu org licenses

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 355 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190519154041.837383322@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0b7f5fe8 20-Dec-2018 Thierry Reding <treding@nvidia.com>

mailbox: xgene-slimpro: Use device-managed registration API

Get rid of some boilerplate driver removal code by using the newly added
device-managed registration API.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# 3512a18c 25-Jul-2018 Gustavo A. R. Silva <gustavo@embeddedor.com>

mailbox: xgene-slimpro: Fix potential NULL pointer dereference

There is a potential execution path in which function
platform_get_resource() returns NULL. If this happens,
we will end up having a NULL pointer dereference.

Fix this by replacing devm_ioremap with devm_ioremap_resource,
which has the NULL check and the memory region request.

This code was detected with the help of Coccinelle.

Cc: stable@vger.kernel.org
Fixes: f700e84f417b ("mailbox: Add support for APM X-Gene platform mailbox driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# 8ce33c6f 05-Jan-2017 Bhumika Goyal <bhumirks@gmail.com>

mailbox: constify mbox_chan_ops structures

Check for mbox_chan_ops structures that are only stored in the ops field
of a mbox_controller structure. This field is of type const struct
mbox_chan_ops *, so mbox_chan_ops structures having this property can be
declared as const.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
struct mbox_chan_ops i@p = {...};

@ok1@
identifier r1.i;
struct hi6220_mbox mbox;
struct slimpro_mbox ctx;
position p;
@@
(
mbox.controller.ops=&i@p
|
ctx.mb_ctrl.ops=&i@p
)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct mbox_chan_ops i;

File size details:

text data bss dec hex filename
2310 248 0 2558 9fe drivers/mailbox/hi6220-mailbox.o
2366 192 0 2558 9fe drivers/mailbox/hi6220-mailbox.o

1500 248 0 1748 6d4 mailbox/mailbox-xgene-slimpro.o
1556 192 0 1748 6d4 mailbox/mailbox-xgene-slimpro.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# a61b37ea 21-Mar-2016 Axel Lin <axel.lin@ingics.com>

mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

devm_kzalloc() returns NULL on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# 14d653af 25-Feb-2016 Dan Carpenter <dan.carpenter@oracle.com>

mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL

devm_ioremap() returns NULL, it never returns an ERR_PTR.

Fixes: f700e84f417b ('mailbox: Add support for APM X-Gene platform mailbox driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>


# f700e84f 12-Feb-2016 Duc Dang <dhdang@apm.com>

mailbox: Add support for APM X-Gene platform mailbox driver

X-Gene mailbox controller provides 8 mailbox channels, with
each channel has a dedicated interrupt line.

Signed-off-by: Feng Kan <fkan@apm.com>
Signed-off-by: Duc Dang <dhdang@apm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>