mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[Bluetooth]: Fix sparse warnings (__nocast type)
This patch fixes the sparse warnings "implicit cast to nocast type" for the priority or gfp_mask parameters of the memory allocations. Signed-off-by: Victor Fusco <[email protected]> Signed-off-by: Domen Puncer <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3a5e903c09
commit
2eb25a6c34
9 changed files with 10 additions and 9 deletions
|
|
@ -372,7 +372,7 @@ static struct proto l2cap_proto = {
|
|||
.obj_size = sizeof(struct l2cap_pinfo)
|
||||
};
|
||||
|
||||
static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, int prio)
|
||||
static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
|
||||
{
|
||||
struct sock *sk;
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d)
|
|||
d->rx_credits = RFCOMM_DEFAULT_CREDITS;
|
||||
}
|
||||
|
||||
struct rfcomm_dlc *rfcomm_dlc_alloc(int prio)
|
||||
struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio)
|
||||
{
|
||||
struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio);
|
||||
if (!d)
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ static struct proto rfcomm_proto = {
|
|||
.obj_size = sizeof(struct rfcomm_pinfo)
|
||||
};
|
||||
|
||||
static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, int prio)
|
||||
static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
|
||||
{
|
||||
struct rfcomm_dlc *d;
|
||||
struct sock *sk;
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ static inline void rfcomm_set_owner_w(struct sk_buff *skb, struct rfcomm_dev *de
|
|||
skb->destructor = rfcomm_wfree;
|
||||
}
|
||||
|
||||
static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, int priority)
|
||||
static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, unsigned int __nocast priority)
|
||||
{
|
||||
if (atomic_read(&dev->wmem_alloc) < rfcomm_room(dev->dlc)) {
|
||||
struct sk_buff *skb = alloc_skb(size, priority);
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ static struct proto sco_proto = {
|
|||
.obj_size = sizeof(struct sco_pinfo)
|
||||
};
|
||||
|
||||
static struct sock *sco_sock_alloc(struct socket *sock, int proto, int prio)
|
||||
static struct sock *sco_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
|
||||
{
|
||||
struct sock *sk;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue