Skip to content

Commit 23e8845

Browse files
nathanchanceVudentz
authored andcommitted
Bluetooth: btmtk: Mark all stub functions as inline
Several recent patches added static stubs to btmtk.h without the inline keyword, which causes instances of -Wunused-function when those stubs are not used anywhere in a file that includes the header: In file included from drivers/bluetooth/btusb.c:28: drivers/bluetooth/btmtk.h:254:13: warning: 'btmtk_fw_get_filename' defined but not used [-Wunused-function] 254 | static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id, | ^~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:249:12: warning: 'btmtk_process_coredump' defined but not used [-Wunused-function] 249 | static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:243:12: warning: 'btmtk_register_coredump' defined but not used [-Wunused-function] 243 | static int btmtk_register_coredump(struct hci_dev *hdev, const char *name, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:233:12: warning: 'btmtk_setup_firmware' defined but not used [-Wunused-function] 233 | static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname, | ^~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:227:12: warning: 'btmtk_setup_firmware_79xx' defined but not used [-Wunused-function] 227 | static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Add inline to all the stubs in btmtk.h (even ones that do not currently have any warnings associated with them) to ensure there are never unused function warnings from these stubs, as is customary for the kernel. Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 84f9288 commit 23e8845

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

drivers/bluetooth/btmtk.h

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -224,70 +224,73 @@ static inline int btmtk_set_bdaddr(struct hci_dev *hdev,
224224
return -EOPNOTSUPP;
225225
}
226226

227-
static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
228-
wmt_cmd_sync_func_t wmt_cmd_sync)
227+
static inline int btmtk_setup_firmware_79xx(struct hci_dev *hdev,
228+
const char *fwname,
229+
wmt_cmd_sync_func_t wmt_cmd_sync)
229230
{
230231
return -EOPNOTSUPP;
231232
}
232233

233-
static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
234-
wmt_cmd_sync_func_t wmt_cmd_sync)
234+
static inline int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
235+
wmt_cmd_sync_func_t wmt_cmd_sync)
235236
{
236237
return -EOPNOTSUPP;
237238
}
238239

239-
static void btmtk_reset_sync(struct hci_dev *hdev)
240+
static inline void btmtk_reset_sync(struct hci_dev *hdev)
240241
{
241242
}
242243

243-
static int btmtk_register_coredump(struct hci_dev *hdev, const char *name,
244-
u32 fw_version)
244+
static inline int btmtk_register_coredump(struct hci_dev *hdev,
245+
const char *name, u32 fw_version)
245246
{
246247
return -EOPNOTSUPP;
247248
}
248249

249-
static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
250+
static inline int btmtk_process_coredump(struct hci_dev *hdev,
251+
struct sk_buff *skb)
250252
{
251253
return -EOPNOTSUPP;
252254
}
253255

254-
static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
255-
u32 fw_ver, u32 fw_flavor)
256+
static inline void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
257+
u32 fw_ver, u32 fw_flavor)
256258
{
257259
}
258260

259-
static int btmtk_usb_subsys_reset(struct hci_dev *hdev, u32 dev_id)
261+
static inline int btmtk_usb_subsys_reset(struct hci_dev *hdev, u32 dev_id)
260262
{
261263
return -EOPNOTSUPP;
262264
}
263265

264-
static int btmtk_usb_recv_acl(struct hci_dev *hdev, struct sk_buff *skb)
266+
static inline int btmtk_usb_recv_acl(struct hci_dev *hdev, struct sk_buff *skb)
265267
{
266268
return -EOPNOTSUPP;
267269
}
268270

269-
static struct urb *alloc_mtk_intr_urb(struct hci_dev *hdev, struct sk_buff *skb,
270-
usb_complete_t tx_complete)
271+
static inline struct urb *alloc_mtk_intr_urb(struct hci_dev *hdev,
272+
struct sk_buff *skb,
273+
usb_complete_t tx_complete)
271274
{
272275
return ERR_PTR(-EOPNOTSUPP);
273276
}
274277

275-
static int btmtk_usb_resume(struct hci_dev *hdev)
278+
static inline int btmtk_usb_resume(struct hci_dev *hdev)
276279
{
277280
return -EOPNOTSUPP;
278281
}
279282

280-
static int btmtk_usb_suspend(struct hci_dev *hdev)
283+
static inline int btmtk_usb_suspend(struct hci_dev *hdev)
281284
{
282285
return -EOPNOTSUPP;
283286
}
284287

285-
static int btmtk_usb_setup(struct hci_dev *hdev)
288+
static inline int btmtk_usb_setup(struct hci_dev *hdev)
286289
{
287290
return -EOPNOTSUPP;
288291
}
289292

290-
static int btmtk_usb_shutdown(struct hci_dev *hdev)
293+
static inline int btmtk_usb_shutdown(struct hci_dev *hdev)
291294
{
292295
return -EOPNOTSUPP;
293296
}

0 commit comments

Comments
 (0)