From: Pavel Machek <pavel@ucw.cz>
To: Trivial patch monkey <trivial@kernel.org>
Cc: "Marcel Holtmann" <marcel@holtmann.org>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Miguel Oliveira" <cmroliv@gmail.com>,
gulsah.1004@gmail.com, peter.p.waskiewicz.jr@intel.com,
kristina.martsenko@gmail.com, linux-kernel@vger.kernel.org,
trivial@kernel.org
Subject: [PATCH] bluetooth: avoid using __uX types
Date: Sun, 10 Aug 2014 09:34:50 +0200 [thread overview]
Message-ID: <20140810073450.GD19735@amd.pavel.ucw.cz> (raw)
In-Reply-To: <20140807202407.GC6060@kroah.com>
__u8/16 types should not be neccessary inside kernel, u8/16 should
be enough.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 373000d..1176e67 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -58,8 +58,8 @@
#define BT_SECURITY 4
struct bt_security {
- __u8 level;
- __u8 key_size;
+ u8 level;
+ u8 key_size;
};
#define BT_SECURITY_SDP 0
#define BT_SECURITY_LOW 1
@@ -76,7 +76,7 @@ struct bt_security {
#define BT_POWER 9
struct bt_power {
- __u8 force_active;
+ u8 force_active;
};
#define BT_POWER_FORCE_ACTIVE_OFF 0
#define BT_POWER_FORCE_ACTIVE_ON 1
@@ -110,7 +110,7 @@ struct bt_power {
#define BT_VOICE 11
struct bt_voice {
- __u16 setting;
+ u16 setting;
};
#define BT_VOICE_TRANSPARENT 0x0003
@@ -170,7 +170,7 @@ static inline const char *state_to_string(int state)
/* BD Address */
typedef struct {
- __u8 b[6];
+ u8 b[6];
} __packed bdaddr_t;
/* BD Address type */
@@ -178,7 +178,7 @@ typedef struct {
#define BDADDR_LE_PUBLIC 0x01
#define BDADDR_LE_RANDOM 0x02
-static inline bool bdaddr_type_is_valid(__u8 type)
+static inline bool bdaddr_type_is_valid(u8 type)
{
switch (type) {
case BDADDR_BREDR:
@@ -190,7 +190,7 @@ static inline bool bdaddr_type_is_valid(__u8 type)
return false;
}
-static inline bool bdaddr_type_is_le(__u8 type)
+static inline bool bdaddr_type_is_le(u8 type)
{
switch (type) {
case BDADDR_LE_PUBLIC:
@@ -260,15 +260,15 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
/* Skb helpers */
struct l2cap_ctrl {
- __u8 sframe:1,
+ u8 sframe:1,
poll:1,
final:1,
fcs:1,
sar:2,
super:2;
- __u16 reqseq;
- __u16 txseq;
- __u8 retries;
+ u16 reqseq;
+ u16 txseq;
+ u8 retries;
};
struct hci_dev;
@@ -282,10 +282,10 @@ struct hci_req_ctrl {
};
struct bt_skb_cb {
- __u8 pkt_type;
- __u8 incoming;
- __u16 expect;
- __u8 force_active;
+ u8 pkt_type;
+ u8 incoming;
+ u16 expect;
+ u8 force_active;
struct l2cap_chan *chan;
struct l2cap_ctrl control;
struct hci_req_ctrl req;
@@ -336,7 +336,7 @@ out:
return NULL;
}
-int bt_to_errno(__u16 code);
+int bt_to_errno(u16 code);
int hci_sock_init(void);
void hci_sock_cleanup(void);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2014-08-10 7:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 10:27 [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 11:34 ` Pavel Machek
2014-05-30 11:52 ` Marcel Holtmann
2014-05-30 12:30 ` Pavel Machek
2014-05-30 15:59 ` Greg KH
2014-05-30 16:15 ` Pali Rohár
2014-05-30 16:36 ` Greg KH
2014-08-06 20:56 ` Marcel Holtmann
2014-08-06 21:30 ` Pavel Machek
2014-08-07 0:25 ` Greg KH
2014-08-07 8:13 ` [PATCH] staging: nokia_h4: use more consistent name for intermediate object Pavel Machek
2014-08-07 20:24 ` Greg KH
2014-08-09 15:48 ` Pavel Machek
2014-08-10 7:29 ` [PATCH 1/3] staging: nokia_h4: switch to right types and use bdaddr_t Pavel Machek
2014-08-10 7:31 ` [PATCH 2/3] staging: nokia_h4: avoid __uX types Pavel Machek
2014-08-10 7:33 ` [PATCH 3/3] staging: use inlines where it makes sense Pavel Machek
2014-08-10 7:34 ` Pavel Machek [this message]
2014-08-07 9:07 ` [PATCH] staging: nokia_h4: merge firmware together so that we can reduce ammount of exports Pavel Machek
2014-08-07 9:36 ` Pavel Machek
2014-08-07 14:48 ` Marcel Holtmann
2014-08-09 15:47 ` Pavel Machek
2014-05-30 12:15 ` [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 12:35 ` Pavel Machek
2014-05-30 12:58 ` Miguel Oliveira
2014-05-30 16:01 ` Greg KH
2014-05-30 16:05 ` Miguel Oliveira
2014-05-30 16:13 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140810073450.GD19735@amd.pavel.ucw.cz \
--to=pavel@ucw.cz \
--cc=cmroliv@gmail.com \
--cc=gulsah.1004@gmail.com \
--cc=kristina.martsenko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=pali.rohar@gmail.com \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®